Tests & debugging
Understand a running program
Breakpoints, stack frames, variables, source maps and launch versus attach.
In this guide
Choose the runtime and prepare the projectPause where it mattersLaunch and attach are differentChoose the runtime and prepare the project#
The debugger supports Node.js, Edge/Chrome browsers, .NET, Java and PHP/Xdebug. The required SDKs and adapters must be available. Profiles are saved per project and do not start themselves.
- Open Debugger and choose the runtime and profile.
- For browser debugging, start the web server first. For TypeScript, check that source maps match the compiled code.
- Add a breakpoint in the editor gutter and start the session.
- When paused, inspect stack frames, variables and expressions before continuing.
Pause where it matters#
A breakpoint can have a condition, hit counter or logpoint. Conditions use the program’s language. A logpoint writes to the console and continues; evaluated expressions can affect program state.
| Keys | Action |
|---|---|
| F5 | Continue |
| F10 | Step over |
| F11 | Step into |
| Shift+F11 | Step out |
| Shift+F5 | Stop |
Launch and attach are different#
Launch starts a program whose shutdown is managed by Code Weaver. Attach connects to an existing program and leaves it running when disconnected. Debug ports use loopback; remote services need a prepared forward and matching sources.
Java supports Hot Code Replace for compatible changes. With .NET/netcoredbg, restart the session to apply program changes. Always check that the source files match the running program.