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-connect" The debug type for the extension. This field is required to use the extension's debugger. String
gdbServer Configuration for the J-Link GDB Server. See gdbServer fields for details. This field replaces the deprecated serverArgs field. Object
serverpath Path of the JLinkGDBServerCL executable. Set to null to not launch a new server. This requires that an existing GDB server is already running at the address indicated by serverAddress. Deprecated: use gdbServer.path instead. String or null
setupCommands Provide a list of GDB commands to be used for setting up the underlying debugger. Use the format described in the Customizing GDB or LLDB section of the Visual Studio Code documentation. JSON array of objects
serverArgs Override the arguments to pass to the GDB Server. Has four variables available. See below. Deprecated and removed: use gdbServer.args instead. String
serverAddress Address and port for the GDB server. Use ${port} to insert the auto-selected port passed to the GDB Server. Defaults to 127.0.0.1:${port}. Deprecated and removed: use gdbServer.address instead. String
svdPath Path of the .svd file describing the device. Leave blank to auto select. String
logging Emit program output. Defaults to true. Has four boolean variables available. See below. Object
gdbPath Path of the GDB executable. String
runToEntryPoint If set, the debugger runs until the start of the given function. String
flash If set, the device is flashed before each debug session. Boolean
snr The serial number of the board to debug on. If the serial number is incomplete or blank, a list of all connected devices matching the given serial number is shown. Number or string
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
flashBreakpoints Enable flash breakpoints. Defaults to true. Boolean
postRemoteConnectCommands Provide a list of GDB commands to be executed after the debugger has connected to the target. Use the same format as for setupCommands. JSON array of objects
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