Skip to main content

Configuration Overview

mcu-debug is configured via .vscode/launch.json. This file is VS Code's standard debug configuration file, extended with mcu-debug-specific properties.

launch.json is the Single Source of Truth

The same launch.json works in VS Code and in the mcu-debug CLI tool. There is no separate config file for the CLI. If your launch config works in VS Code, it works in the CLI — with the exception of a few VS Code-specific variable types (see Variable Substitution).

Configuration Topics

TopicDescription
launch.json OverviewFile structure, required fields, and a complete example
Variable SubstitutionUsing ${workspaceFolder}, ${env:VAR}, envFile, and other variables
All PropertiesReference listing of every supported property, organized by category

Quick Reference

The minimum viable launch.json for mcu-debug:

{
"version": "0.2.0",
"configurations": [
{
"type": "mcu-debug",
"request": "launch",
"name": "My Config",
"servertype": "openocd",
"executable": "${workspaceFolder}/build/firmware.elf",
"configFiles": ["interface/stlink.cfg", "target/stm32f4x.cfg"]
}
]
}

VS Code IntelliSense provides inline documentation and autocompletion for all properties when editing launch.json. Hover over any property name to see its description and valid values.