Websites, apps & code / Coding & debugging
Step-by-step debugging
The program misbehaves and you can't tell which line is wrong.
1Fill in your details
Leave blank to use the example. Names are remembered for other prompts too (stored only on your device).
3Copy the prompt
My code has a bug; help me find the cause step by step. Expected: Total should add 6% tax after I click calculate. Actual: The total does not change and there is no error Requirements: - first ask which part of the code to look at and have me paste it (no passwords or API keys) - give 3 likely causes, easiest to check first - for each, tell me the smallest way to confirm it; do not change many things at once - only write the fix after the cause is confirmed, and say which line changed - fit the kind of code - Teach me browser dev tools and console.log. - Use only the details I give you. Do not invent anything. If something is missing, leave it as [ ] or ask me. Output format: Questions, then checks, and only then the fix. [Make it sound human] - Explain in plain words; no pleasantry openers or empty summaries. - Only necessary, short, practical code comments; the simplest working approach, no over-engineering. - Interface text (buttons, hints, error messages) should sound like a person wrote it; no "seamless", "empower", "unlock". [Quality] Code must run as is and handle common errors; tell me how to test it and confirm it works; ask first if a requirement is unclear; never put passwords or API keys in the code.
Paste it into ChatGPT, Gemini, Claude or Meta AI.
Test result
What we noticed
It asked, requested three small snippets, listed 3 causes and taught only step 1 (console.log). It did not imagine the code.
See what the AI actually wrote
Three questions first:
- What is the page written in: plain HTML and JavaScript, or something like React or Vue?
- Is "calculate" a button, or does it recalculate whenever an input changes?
- Is the 6% tax hard-coded, or kept in a setting?
Please paste these pieces (swap passwords and API keys first):
- The HTML of the "calculate" button (with its id or onclick)
- The JavaScript function that runs when it is pressed
- The line of HTML that shows the total
No need for the whole file.
3 possible causes, easiest to check first:
- The function never runs: the button is not wired to it, or the name is misspelled. With no error message this is the most common cause.
- The function runs but updates a different variable: the total with tax is computed but not written back, so the page still shows the old one.
- The tax is not added in the calculation: for example total * 0.06 (tax only) instead of total * 1.06; or text concatenation, "100" + 6 becoming "1006", or NaN.
Smallest action to confirm each (one at a time):
Step 1, confirm the function runs:
- Press F12 (Command + Option + I on a Mac), open Developer Tools, click "Console".
- On the first line of the calculation function add: console.log("calculate ran").
- Press "calculate" and see if the message appears in Console.
- Yes: cause 1 is ruled out, go to step 2.
- No: the function is not connected; paste the button's HTML.
I change only that one line. Tell me what you see when done.
Only after the cause is confirmed do I write the fix and say which line changed, never many at once.
Reminder: when debugging, do not paste customer data, passwords or API keys; paste the code and a fake-number example, like 100 should give 106.
AI tools that suit this
- ChatGPT Suggested tool Free plan
The most widely used AI chat, for writing, questions and images
- Claude Suggested tool Free plan
Strong at long documents, editing and code
- Claude Code Suggested tool Free plan
AI that writes code directly on your computer
Recommendations only, not sponsored. Check each site for what the free plan includes.
This site is made by FullMark Tech
Want your own website, or your shop spreadsheets automated? FullMark Tech builds business websites and custom Excel tools.