Skip to main content

launch.json Properties Reference

This document provides a complete, flattened list of all properties supported in your .vscode/launch.json configuration for the MCU-Debug debug adapter.

Understanding the Table​

  • Property Name / Path: The JSON key path of the configuration property. For nested structures (such as hostConfig or rttConfig), properties are flattened (e.g. hostConfig.enabled).
  • Type: The expected data type(s) (e.g., string, boolean, number, array, or union types).
  • Request Mode: Indicates whether the property applies to a "launch" request, an "attach" request, or "both".
  • Default & Description: The default value (if any) and a description of the property.
Property Name / PathTypeRequest ModeDefault & Description
armToolchainPathstringbothThis setting can be used to override the armToolchainPath user setting for a particular launch configuration.
BMPGDBSerialPortstringbothThe serial port for the Black Magic Probe GDB Server.
boardIdstringbothPyOCD Board Identifier. Needed if multiple compatible boards are connected.
breakAfterResetbooleanbothDefault: false
Applies to Restart/Reset/Launch, halt debugger after a reset. Ignored if runToEntryPoint is used.
chainedConfigurations
  delayMs
numberbothDefault: 5
Default delay in milliseconds.
chainedConfigurations
  detached
booleanbothDefault: false
Related or independent server sessions.
chainedConfigurations
  enabled
booleanbothDefault: true
Enable/Disable entire set of chained configurations
chainedConfigurations
  inherits
arraybothList of properties to inherit from parent.
chainedConfigurations
  launches[]
    delayMs
numberlaunchDefault: 5
Delay in milliseconds.
chainedConfigurations
  launches[]
    detached
booleanlaunchDefault: false
Related or independent server sessions.
chainedConfigurations
  launches[]
    enabled
booleanlaunchDefault: true
Enable/Disable this configuration
chainedConfigurations
  launches[]
    folder
stringlaunchFolder to use for this configuration.
chainedConfigurations
  launches[]
    inherits
arraylaunchList of properties to inherit from parent.
chainedConfigurations
  launches[]
    lifecycleManagedByParent
booleanlaunchDefault: true
Are Reset/Stop/Disconnect shared?
chainedConfigurations
  launches[]
    name
stringlaunchName of launch configuration.
chainedConfigurations
  launches[]
    overrides
objectlaunchValues to override/set in this child configuration.
chainedConfigurations
  launches[]
    waitOnEvent
stringlaunchDefault: postInit
Wait for an event.
chainedConfigurations
  lifecycleManagedByParent
booleanbothDefault: true
Are Reset/Stop/Disconnect shared?
chainedConfigurations
  overrides
objectbothValues to override/set in this child configuration.
chainedConfigurations
  waitOnEvent
stringbothDefault: postInit
Event to wait for.
cliOptions
  liveWatch
    defaultDepth
integerbothDefault: 1
How many levels of a struct, array or pointer !!live-watch add expands when --depth is not given.
cliOptions
  liveWatch
    defaultFormat
stringbothDefault: natural
Format for !!live-watch add without --hex or ',x'. Hex applies to integers only; floats, enums and pointers are unchanged.
cliOptions
  liveWatch
    onStop
stringbothDefault: roots
What to print when the target stops. Watches added with --quiet are not printed at a stop.
cliOptions
  logFile
`stringnull`both
cliOptions
  watch
    defaultDepth
integerbothDefault: 1
How many levels of a struct, array or pointer !!watch add expands when --depth is not given.
cliOptions
  watch
    defaultFormat
stringbothDefault: natural
Format for !!watch add without --hex or ',x'. Hex applies to integers only; floats, enums and pointers are unchanged.
cliOptions
  watch
    onFrameChange
stringbothDefault: none
What to print when you select another frame or thread while stopped (up, down, frame N). Watches are evaluated in the selected frame either way, until the next stop. There is no changes: another frame's values are not changes.
cliOptions
  watch
    onStop
stringbothDefault: changes
What to print when the target stops. Watches added with --quiet are not printed at a stop.
cmsisPackstringbothPath to a CMSIS-Pack file. Use to add extra device support.
configFilesarraybothOpenOCD/PE GDB Server configuration file(s) to use when debugging (OpenOCD -f option)
cpustringbothDefault: cortex-m3
CPU Type Selection - used for QEMU server type
cwdstringbothDirectory to run commands from
debugFlags
  debugDisassembly
booleanbothDefault: false
Show debug output from disassembly operations
debugFlags
  disableGdbTimeouts
booleanbothDefault: false
Disable GDB command timeouts. Helpful for debugging extension
debugFlags
  gdbTraces
booleanbothDefault: false
Enable GDB MI trace output. Copy/Paste friendly.
debugFlags
  gdbTracesParsed
booleanbothDefault: false
Enable parsed GDB MI output. NOT Copy/Paste friendly.
debugFlags
  liveGdbTraces
booleanbothDefault: false
Enable live GDB MI trace output during polling (only applies to built-in liveWatch/RTT). Can be super verbose.
debugFlags
  pathResolution
booleanbothDefault: false
Show path resolution when reading symbols
debugFlags
  rspMux
booleanbothDefault: true
Let the Probe Agent multiplex this session's gdb connection, which is what lets it read target memory alongside GDB. Set false to fall back to plain byte-for-byte forwarding for this session only -- the way to tell whether a problem is the multiplexer's, without restarting the Agent or affecting other sessions.
debugFlags
  rspTier
stringbothDefault: auto
What the Probe Agent may assume this gdb-server can do while the target is running. 'auto' uses what has been measured for this servertype -- so far only OpenOCD, which answers memory reads on the same connection GDB is running on. On every other server the Agent's own features (Agent-side RTT included) wait until the target halts, which for RTT means no data while it runs. Set 'full' to find out whether that caution is necessary on your server; 'unsupported' turns Agent-side features off for this session.
debugFlags
  rspTrace
stringbothDefault: off
Trace every GDB Remote Serial Protocol packet on this session's gdb connection, including the ones the Probe Agent injects itself -- which neither GDB's 'set debug remote' nor the gdb-server's own log can show. 'packets' omits +/- acks; 'all' includes them, which is what an ack-accounting problem needs. Written to its own file beside the proxy log (one per gdb connection), never to the Debug Console; the full path is logged when the file is opened. Per session: the Agent is shared, so this cannot be a command-line option on it.
debugFlags
  timestamps
booleanbothDefault: false
Show timestamps in debug output
debugFlags
  vscodeRequests
booleanbothDefault: false
Enable VSCode Request/Response trace output
debuggerArgsarraybothAdditional arguments to pass to GDB command line
devicestringbothTarget Device Identifier, needed for probe-rs and some other server types. For probe-rs, this can be a chip name (e.g. 'STM32F103C8')
envobjectbothEnvironment variables defined as key, value pairs to set for the GDB Server process.
envFilestringbothPath to a file to read environment variables from for the GDB Server process. The file should have lines in the format KEY=VALUE.
executablestringbothPath of executable for symbols and program information. See also loadFiles, symbolFiles
gdbInterruptModestringbothDefault: exec-interrupt
Whether GDB shall be interrupted using "exec-interrupt" (default) or by signaling "SIGINT"
gdbPathstringbothThis setting can be used to override the GDB path user/workspace setting for a particular launch configuration.
gdbTargetstringbothFor externally (servertype = "external") controlled GDB Servers you must specify the GDB target to connect to.
graphConfigarraybothDescription of how graphing can be done.
hardwareBreakpoints
  limit
numberbothDefault: 0
If limit > 0, enforce a limit on the number of hardware breakpoints that can be used
hardwareBreakpoints
  require
booleanbothDefault: false
If true, forces the use of hardware breakpoints
hardwareWatchpoints
  limit
numberbothDefault: 0
If limit > 0, enforce a limit on the number of hardware watchpoints that can be used
hardwareWatchpoints
  require
booleanbothDefault: false
If true, forces the use of hardware watchpoints
hostConfig`objectboolean`both
hostConfig
  enabled
booleanbothDefault: true
Enable/Disable remote probe support. When true, the gdb-server runs on a host machine that has the USB debug probe attached.
hostConfig
  proxy
    host
stringbothAddress the debug adapter should dial to reach the Probe Agent, from wherever the adapter runs. Examples: "127.0.0.1" for the same machine, "host.docker.internal" from a Docker Desktop container, or a WSL gateway / LAN address. Must be an address the agent is actually bound to — check with mcu-debug proxy --status and look at hosts.
hostConfig
  proxy
    port
numberbothPort the Probe Agent is listening on. Shown as port in mcu-debug proxy --status.
hostConfig
  proxy
    token
stringbothAuthentication token the agent was started with. Prefer "${env:MDBG_PROXY_TOKEN}" over a literal — a token committed to source control is a shared secret in your repository. The agent reads the same MDBG_PROXY_TOKEN variable, so one export configures both ends.
hostConfig
  ssh
    host
stringbothDefault: mylogin@myserver
SSH host, resolved via ~/.ssh/config — so aliases, port, jump hosts and keys are all handled there. Example: "user@lab-server", or an alias defined in ~/.ssh/config.
hostConfig
  ssh
    proxyPort
numberbothDaemon mode: the port a Probe Agent is already listening on at the SSH host. When set, the extension connects to that agent instead of launching one, and the SSH -L tunnel is established from an OS-assigned local port to this one. When omitted, a new Probe Agent is launched per debug session and its port read from the Discovery JSON. Set this when the agent is started manually or managed by a system service on the probe host.
hostConfig
  ssh
    serverPath
stringbothPath to a pre-installed mcu-debug binary on the SSH host (e.g. "/usr/local/bin/mcu-debug"). When set, the extension skips deploying the binary and launches this path directly. Use it when the host has the tool installed already, or when writing to ~/.mcu-debug/bin is not permitted.
hostConfig
  ssh
    token
stringbothAuthentication token of the pre-running agent named by proxyPort. Required with proxyPort, since an agent we did not launch has a token we cannot know. Ignored otherwise — an agent we launch is given a freshly generated token. Prefer "${env:MDBG_PROXY_TOKEN}" over a literal: a token committed to source control is a shared secret in your repository, and the agent reads the same variable.
hostConfig
  syncFiles
    local
stringbothGlob pattern for files to sync, relative to ${cwd}. Example: '*.cfg'.
hostConfig
  syncFiles
    remote
stringbothRemote path to sync the files to. If not specified, the local path is used.
hostConfig
  type
anybothDefault: auto
"auto": extension detects the VS Code remote environment and constructs the correct proxy address automatically. Covers WSL (NAT and Mirrored), Dev Containers, VS Code Remote SSH, and plain local. "ssh": explicit SSH to a separate probe host; requires the ssh object below.
interfacestringbothDefault: swd
Debug Interface type to use for connections (defaults to SWD) - Used for J-Link, ST-LINK and BMP probes.
ipAddressstringbothIP Address for networked J-Link Adapter
jlinkscriptstringbothJ-Link script file - optional input file for customizing J-Link actions.
liveWatch
  enabled
booleanbothDefault: false
Enable/Disable Live Watch.
liveWatch
  samplesPerSecond
numberbothDefault: 2
Maximum number of samples per second.
loadFilesarraybothList of files (hex/bin/elf files) to load/program instead of the executable file.
machinestringbothDefault: lm3s811evb
Machine Type Selection - used for QEMU server type
numberOfProcessorsnumberbothDefault: 1
Number of processors/cores in the target device.
objdumpPathstringbothThis setting can be used to override the objdump path user/workspace setting for a particular launch configuration.
openOCDLaunchCommandsarraylaunchOpenOCD command(s) after configuration files are loaded (-c options)
openOCDPreConfigLaunchCommandsarraylaunchOpenOCD command(s) before configuration files are loaded (-c options)
overrideAttachCommandsarrayattachOverride the commands that are normally executed as part of attaching to a running target. Your replacement must leave the target halted, since everything after the attach sequence assumes that.
overrideGDBServerStartedRegexstringbothYou can supply a regular expression to override the output from the GDB Server that is looked for to determine if the GDB Server has started.
overrideLaunchCommandsarraylaunchOverride the commands that are normally executed as part of flashing and launching the target. Your replacement must leave the target halted, since everything after the launch sequence assumes that.
overridePreEndSessionCommandsarraybothOverride the commands that are normally executed at the start of ending a debug session (e.g. when stopping debugging).
overrideResetCommandsarraybothOverride the commands that are normally executed as part of resetting the target. Your replacement must leave the target halted, since everything after the reset sequence assumes that.
overrideRestartCommandsarraybothDeprecated: Restart is now handled by VSCode. Change to overrideResetCommands if you use the Reset button.
postAttachCommandsarrayattachAdditional GDB commands to be executed after the attach sequence has finished. These must leave the target halted. Resuming and halting again is fine — running past a bootloader is a normal use — but everything after this point assumes a halted target, so finishing while the target runs will break the rest of the session.
postLaunchCommandsarraylaunchAdditional GDB commands to be executed after the launch sequence (flash download and reset) has finished. These must leave the target halted. Resuming and halting again is fine — running past a bootloader is a normal use — but everything after this point assumes a halted target, so finishing while the target runs will break the rest of the session.
postResetCommandsarraybothCommands to be executed after a Reset operation, after the reset is sent to the target. These must leave the target halted. Resuming and halting again is fine — running past a bootloader is a normal use — but everything after this point assumes a halted target, so finishing while the target runs will break the rest of the session.
postResetSessionCommandsarraybothAdditional GDB Commands to be executed at the end of the reset sequence
postRestartCommandsarraybothDeprecated: Restart is now handled by VSCode. Change to postResetCommands if you use the Reset button.
postRestartSessionCommandsarraybothDeprecated: Restart is now handled by VSCode and it is the same as Start. If you are using the Reset button, use postResetSessionCommands instead
postStartSessionCommandsarraybothAdditional GDB Commands to be executed at the end of the start sequence, after a debug session has already started and runToEntryPoint is not specified.
powerOverBMPstringbothPower up the board over Black Magic Probe.
preAttachCommandsarrayattachAdditional GDB commands to be executed at the start of the attach sequence, right after GDB connects to the gdb-server.
preConnectCommandsarraybothAdditional GDB commands to be executed before GDB connects to the gdb-server. There is no connection to the target yet, so these cannot read or write target memory or registers and 'monitor' commands are not available
preLaunchCommandsarraylaunchAdditional GDB commands to be executed at the start of the launch sequence, right after GDB connects to the gdb-server, but before a reset or flash download.
preResetCommandsarraybothCommands to be executed prior to a Reset operation, before the reset is sent to the target.
routeGdbServerOutputToDebugConsolebooleanbothDefault: false
Route GDB server output to debug console
rtosstringbothRTOS being used. For JLink this can be Azure, ChibiOS, embOS, FreeRTOS, NuttX, Zephyr or the path to a custom JLink RTOS Plugin library. For OpenOCD this can be auto (recommended), FreeRTOS, ThreadX, chibios, Chromium-EC, eCos, embKernel, linux, mqx, nuttx, RIOT, uCOS-III, or Zephyr.
rttConfig
  address
stringbothDefault: auto
Address to start searching for the RTT control block.
rttConfig
  clearSearch
booleanbothDefault: true
When true, clears the search-string.
rttConfig
  decoders
arraybothSWO Decoder Configuration
rttConfig
  enabled
booleanbothDefault: false
Enable/Disable RTT
rttConfig
  engine
stringbothDefault: auto
Which implementation reads RTT out of the target. Never two at once: each keeps its own idea of the ring buffer's read pointer, so a pair of them would consume each other's bytes and corrupt the channel. Same ports, same decoders and same terminals whichever one runs. 'auto' never selects 'gdb-server'.
rttConfig
  polling_interval
`numbernull`both
rttConfig
  pre_decoder
    args
arraybothDefault: ["-e","$\{executable\}"]
Arguments to pass to pre-decoder program.
rttConfig
  pre_decoder
    channels
`arraynull`both
rttConfig
  pre_decoder
    cwd
stringbothDefault: $\{workspaceFolder\}
Current working directory for pre-decoder program.
rttConfig
  pre_decoder
    env
objectbothAdditional environment variables for pre-decoder program.
rttConfig
  pre_decoder
    program
stringbothDefault: defmt-print
Path to pre-decoder program.
rttConfig
  rtt_start_retry
numberbothDefault: 1000
Keep trying to start RTT for OpenOCD until it succeeds.
rttConfig
  searchId
stringbothDefault: SEGGER RTT
A string to search for to find the RTT control block.
rttConfig
  searchSize
numberbothDefault: 16
Number of bytes to search for the RTT control block.
rttConfig
  serve
    hostName
stringbothDefault: 127.0.0.1
Host name or address to bind the built-in RTT server to.
rttConfig
  serve
    tcpPort
`numbernull`both
rttConfig
  serve
    tcpPorts
objectbothExact TCP port per RTT channel, keyed by channel number -- for example { "0": 19021, "1": 19022 }. Wins over 'tcpPort' for any channel it names. Channels not named here are allocated normally.
runToEntryPointstringlaunchDefault: main
Applies to Launch/Restart/Reset, ignored for Attach. If enabled the debugger will run until the start of the given function.
runToMainbooleanbothDefault: false
Deprecated: please use 'runToEntryPoint' instead.
searchDirarraybothOpenOCD directories to search for config files and scripts (-s option).
serialConfig
  enabled
booleanbothDefault: false
Enable/Disable serial port bridging. When enabled, the extension creates TCP bridges to physical serial ports for easy access to serial output from the target device.
serialConfig
  ports
arraybothList of serial port bridges to expose as TCP ports. Each entry maps a physical serial device to a TCP port that can be connected to for bidirectional communication.
serialConfig
  ports[]
    baud_rate
numberbothDefault: 115200
Baud rate in bits per second.
serialConfig
  ports[]
    data_bits
numberbothDefault: 8
Number of data bits per frame.
serialConfig
  ports[]
    flow_control
stringbothDefault: none
Flow control mode. "software" = XON/XOFF, "hardware" = RTS/CTS.
serialConfig
  ports[]
    input_mode
stringbothDefault: cooked
Input mode for data sent to the serial port. "raw" = send as-is, immediately, "cooked" = buffer input until Enter is pressed and perform basic line editing (backspace, Ctrl+U to clear line).
serialConfig
  ports[]
    label
stringbothA label for this serial port bridge, used in the extension UI to identify it. E.g. 'Debug UART'. Optional but recommended when multiple ports are configured.
serialConfig
  ports[]
    log_file
stringbothOptional file path to log all serial data (both input and output). If not set, no logging is performed.
serialConfig
  ports[]
    match
stringbothCase-insensitive substring matched against the port's description as reported by the OS (e.g. 'STM32 STLink', 'FTDI'). Used for selection, along with path, serial, or vid/pid. Use 'label' to name the port in the UI.
serialConfig
  ports[]
    parity
stringbothDefault: none
Parity checking mode.
serialConfig
  ports[]
    path
stringbothSerial device path or glob. E.g. /dev/ttyUSB0, /dev/tty.usbserial-, COM3, /dev/serial/by-id/usb-. Optional if serial or vid/pid are specified.
serialConfig
  ports[]
    pid
stringbothUSB product ID in hex (e.g. "0x374b"). Used with vid to identify the device type when serial is unavailable.
serialConfig
  ports[]
    serial
stringbothUSB serial number. Stable across reconnects and reboots — preferred in lab environments with multiple boards of the same type.
serialConfig
  ports[]
    stop_bits
stringbothDefault: one
Number of stop bits.
serialConfig
  ports[]
    vid
stringbothUSB vendor ID in hex (e.g. "0x0483"). Used with pid to identify the device type when serial is unavailable.
serialNumberstringbothJ-Link or ST-LINK Serial Number - only needed if multiple J-Links/ST-LINKs are connected to the computer
serverArgsarraybothAdditional arguments to pass to GDB Server command line
serverpathstringbothThis setting can be used to override the GDB Server path user/workspace setting for a particular launch configuration.
servertypestringbothGDB Server type - supported types are jlink, openocd, probe-rs, pyocd, pe, stlink, stutil, qemu, bmp and external. For "external", please read our Wiki. The executable in your PATH is used by default, to override this use serverpath.
stlinkPathstringbothPath to the ST-LINK_gdbserver executable.
stm32cubeprogrammerstringbothThis path is normally resolved to the installed STM32CubeIDE or STM32CubeProgrammer but can be overridden here.
svdFilestringbothThis is for 'XPERIPHERALS' window provided by 'mcu-debug.peripheral-viewer'.
svdPathstringbothThis is for 'XPERIPHERALS' window provided by 'mcu-debug.peripheral-viewer' and 'Embedded Tools' Extension from Microsoft.
swoConfig
  cpuFrequency
numberbothDefault: 0
Target CPU frequency in Hz; 0 will attempt to automatically calculate.
swoConfig
  decoders
arraybothSWO Decoder Configuration
swoConfig
  enabled
booleanbothDefault: false
Enable SWO decoding.
swoConfig
  source
stringbothDefault: probe
Source for SWO data.
swoConfig
  swoEncoding
stringbothDefault: uart
BMP only: SWO encoding data used at the line level.
swoConfig
  swoFrequency
numberbothDefault: 0
SWO frequency in Hz; 0 will attempt to automatically calculate.
swoConfig
  swoPath
stringbothPath name when source is "file" or "serial".
swoConfig
  swoPort
stringbothWhen server is "external" && source is "socket", port to connect to.
symbolFilesarraybothArray of ELF files to load symbols from instead of the executable file.
symbolFiles[]
  file
stringbothPathname of an ELF file for symbols
symbolFiles[]
  offset
`numberstring`both
symbolFiles[]
  sections[]
    address
`numberstring`both
symbolFiles[]
  sections[]
    name
stringbothSection name
symbolFiles[]
  textaddress
`numberstring`both
targetId`stringnumber`both
targetProcessornumberbothDefault: 0
The processor you want to debug. Zero based integer index. Must be less than 'numberOfProcessors'
toolchainPrefixstringbothThis setting can be used to override the toolchainPrefix user setting for a particular launch configuration. Default = "arm-none-eabi"
v1booleanbothDefault: false
For st-util only. Set this to true if your debug probe is a ST-Link V1.