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
  logFile
`stringnull`both
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
  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
  enabled
booleanbothDefault: false
Enable/Disable remote probe support. When true, the gdb-server runs on a host machine that has the USB debug probe attached.
hostConfig
  sshHost
stringbothDefault: mylogin@myserver
SSH host for type "ssh". Resolved via ~/.ssh/config, so host aliases, port, jump hosts, and keys are all handled there. Example: "user@lab-server" or an alias defined in ~/.ssh/config.
hostConfig
  sshProxyPort
numberbothSSH type only — daemon mode. Port the Probe Agent is already listening on at the lab server. When set, the extension connects to the pre-running agent at this port rather than launching a new one. The SSH -L tunnel is established from a local OS-assigned port to this port. When omitted, the extension launches a new Probe Agent per debug session via SSH and reads the port from its Discovery JSON. Set this when the Probe Agent is started manually or managed by a system service on the probe host.
hostConfig
  sshProxyServerPath
stringbothPath to a pre-installed mcu-debug binary on the remote host (e.g. "/usr/local/bin/mcu-debug" or "~/bin/mcu-debug"). When set, the extension skips the automatic binary deployment step entirely and uses this path to launch the Probe Agent. Use this when macOS Gatekeeper, Windows SmartScreen, or lab policy prevents running a freshly-copied executable, or when the binary has already been installed and granted the necessary permissions by other means.
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
  token
stringbothOverride the token used to authenticate with the Probe Agent. Only needed for daemon mode when the token file (~/.mcu-debug/agent.token) is not accessible, or when a fixed lab-policy token is preferred. When omitted, the extension auto-manages the token: it generates one for extension-launched agents, or reads it from the token file for pre-running daemons. Do NOT commit this value to source control — use VS Code user settings or a secrets manager.
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 sshHost.
hostConfig
  wslProxyPort
numberbothauto type, WSL NAT mode only. Fixed port for the Probe Agent to bind to on the Windows host. Normally not needed: when the Probe Agent runs for the first time, Windows shows a Security Alert — clicking 'Allow access' creates an application-level inbound rule that permits the executable on any port. Set this only if that prompt was dismissed or blocked, or if group policy restricts inbound rules to specific ports. The extension starts the Probe Agent with --port <N> --host 0.0.0.0 so the WSL guest can reach it via the gateway IP. Not needed for WSL Mirrored mode (Windows 11) where loopback is shared. Ignored for all other auto sub-modes (local, Dev Container, Remote SSH).
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.
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.
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 reset-ing the target.
overrideRestartCommandsarraybothDeprecated: Restart is now handled by VSCode. Change to overrideResetCommands if you use the Reset button.
postAttachCommandsarrayattachAdditional GDB Commands to be executed after the main attach sequence has finished.
postLaunchCommandsarraylaunchAdditional GDB Commands to be executed after the main launch sequence has finished.
postResetCommandsarraybothCommands to be executed after a Reset operation, after the reset is sent to the target.
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 main attach sequence (immediately after attaching to target).
preLaunchCommandsarraylaunchAdditional GDB Commands to be executed at the start of the main launch sequence (immediately after attaching to target).
preResetCommandsarraybothCommands to be executed prior to a Reset operation, before the reset is sent to the target.
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
  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
  useBuiltinRTT
    enabled
booleanbothDefault: true
Enable/Disable built-in RTT support
rttConfig
  useBuiltinRTT
    hostName
stringbothDefault: 127.0.0.1
Host name to use for built-in RTT server.
rttConfig
  useBuiltinRTT
    tcpPort
`numbernull`both
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[]
    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.