Tests & debugging

Understand a running program

Breakpoints, stack frames, variables, source maps and launch versus attach.

In this guideChoose the runtime and prepare the projectPause where it mattersLaunch and attach are different

Choose 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.

  1. Open Debugger and choose the runtime and profile.
  2. For browser debugging, start the web server first. For TypeScript, check that source maps match the compiled code.
  3. Add a breakpoint in the editor gutter and start the session.
  4. When paused, inspect stack frames, variables and expressions before continuing.
The Windows app’s debugger panel.Code Weaver · Windows beta

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.

KeysAction
F5Continue
F10Step over
F11Step into
Shift+F11Step out
Shift+F5Stop

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.

Open original image ↗