Create beginner Works with: Any AI

VS Code Debugging Configuration Walkthrough for a Beginner

Structured brief

Understand launch.json and set up breakpoints for a small program.

The Open buttons send the prompt text as currently shown below to that site only when you click. Fill in the placeholders first.

[VERIFY] is an editorial flag, not a blank to fill. Wherever the prompt shows [VERIFY], check that item against a reliable source before you use it.

Rate this prompt

Loading ratings…

Help me learn to debug in Visual Studio Code, teaching the method so I can debug the next problem alone rather than simply fixing my code. Language and runtime: [LANGUAGE]. How I run the program now: [RUN_COMMAND]. The bug or behaviour I want to understand: [BUG_DESCRIPTION]. A short code excerpt with secrets removed: [CODE_EXCERPT].

Explain in plain words what a debugger does, then walk through setting a breakpoint, a conditional breakpoint, stepping over, into and out, watching variables, the call stack, and the debug console. Draft a launch.json for my case and explain every field, marking field names and values to check [VERIFY]. Show where I would place the first breakpoint in my excerpt and what to look for. Add an exercise with invented code containing a small bug (an off-by-one error in a loop) with the steps to find it and the variable values expected at each step. List common problems: breakpoints that do not hit, wrong working directory, and environment variables. Never paste secrets into the debug console or commit them in launch configurations.

Fill in before use

Optional: type your details and the prompt above updates. Nothing is saved or sent.

Replace each bracketed placeholder with your own details, then paste into Any AI or another assistant.

Related prompts