The extension comes with the nrf-connect 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.
In either case, the active build configuration is flashed onto the device and the debugging starts. If the build configuration includes several images or domains (contexts), the extension asks you to select the image or domain to debug.
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.