Custom launch and debug configuration fields

nRF Connect for VS Code

tags
nRF Connect for VS Code

The following table lists configuration fields specific to the extension that you can use to customize the launch and actions of Debug in the launch.json file.

Field Description Variable type
"type": "nrf-debug" The debug type for the extension. This field is required to use the extension's debugger. The legacy nrf-connect value is deprecated. String
config Path of the build configuration to debug, or ${activeConfig}. Leave blank to select a configuration. String
deviceId Serial number of the board to debug. You can provide a partial serial number or use * wildcards. If more than one device matches, the extension asks you to select one. String
debugServerAddress Address and port of the GDB server. For localhost or 127.0.0.1, the extension starts west debugserver. For any other host, the extension connects to an already running server. Defaults to 127.0.0.1:${port}. String
serverLaunchTimeout Time in milliseconds that the extension waits after starting the local debug server before connecting GDB. Defaults to 1000. Number
inferiors ELF files to load in the GDB session and optional entry points at which to stop. See inferiors fields for details. This field is available for the nrf-debug type. Array of objects
setupCommands GDB commands to execute while setting up the debugger. Use the format described in the Customizing GDB or LLDB section of the Visual Studio Code documentation. Array of objects
postRemoteConnectCommands GDB commands to execute after the debugger connects to the target. Use the same format as for setupCommands. Array of objects
svdPath Path of the SVD file describing the device. Leave blank to select it automatically. String
logging Debug Console logging level. Use default to log requests and responses or verbose to also log debugger communication. Defaults to default. String
gdbPath Path of the GDB executable. String
flash Flash the device before the debug session. This field only applies to launch requests. Boolean
flashBreakpoints Enable flash breakpoints. Defaults to true. Boolean
memorySections Start address for a custom memory section in the Memory Explorer. Accepts either an integer or a hex string (for example, 0xfff) can be used. See the Memory Explorer guide page for more details. Array
justMyCode Hide internal Zephyr and nRF Connect SDK functions in the call stack. Defaults to false. Boolean
skipFunctions Function names to skip when stepping through code during debugging. Specify names in plain text without parentheses (for example, "get", "set"). Array
skipFiles File names to skip when stepping through code during debugging. Specify file names with their extension (for example, "get.h", "set.c"). Array