The extension comes with the nrf-debug debug type that is meant for debugging applications compatible with the nRF Connect SDK using the Visual Studio Code debugger.
There are two default options to start debugging using this debug type:
-
Click Debug in the Actions View.
The debugging toolbar appears at the top of the screen to let you control the debugging process. You also gain access to Debugging Views and the extension-specific nRF Debug panel.Tip
In the More actions... menu for the Debug button, you can find alternative ways of starting the debugging process, for example if you want to avoid resetting the device or attach the debugger to a running application.
-
Click Run and Debug from the Activity Bar if you have added a debugging launch configuration.
With the standard launch configuration, the active build configuration is flashed onto the device and debugging starts. When you start Debug from the Actions View for a sysbuild configuration, the extension asks you to select the processor sessions to start and the images at whose entry points execution must stop. All selected images for one processor are loaded into one GDB session. Selecting several processors starts a separate debug session for each processor.
Note
Make sure to enable debugging for the domain you want to debug.
The device does not start running until the debugger is connected.
Tips
-
The nRF Debug panel is given focus when you start the debugging. To change this behavior, change the
nrf-connect.debugging.focusOnNrfDebugsetting. -
You can use the
nrf-connect.west.verbosesetting to configure the verbosity level of west commands.
For additional information about debugging in Visual Studio Code, read its debugging documentation.