launch attributes¶
These attributes apply when "request": "launch" - the debugger starts a
program for you. See Debug a local program for
a guided walkthrough.
Required: program, unless the CMake Tools
extension is installed and a launch target is selected (then it is used automatically).
Attributes¶
| Attribute | Required | Description |
|---|---|---|
program |
Yes* | Path to the executable to launch (*optional with CMake Tools). |
args |
- | Command-line arguments (string or array). |
cwd |
- | Working directory for the program. |
dbgengPath |
- | Path to dbgeng.dll; auto-resolved when omitted. |
stopAtEntry |
- | Break at the entry point (default false). |
sources |
- | Folders searched for source files. |
symbolPath |
- | Symbol (PDB) search paths. |
trace |
- | Record the DAP session to a file. |
Details¶
program¶
- Type: string · Required (see below)
The path to the executable to launch under the debugger.
program is optional when the CMake Tools extension (ms-vscode.cmake-tools)
is installed: if you omit it, the adapter defaults to CMake Tools' launch
target via ${command:cmake.launchTargetPath}, and VS Code resolves it - building
it and prompting you to pick one if none is selected yet. Without CMake Tools
installed, program is required and the session fails with a message to set it.
args¶
- Type: string or array of strings · Optional
Command-line arguments passed to the program: either a single string written exactly as you would type it on a command line, or an array of individual arguments.
cwd¶
- Type: string · Optional
- Default: the program's directory
The working directory (current directory) for the debugged program. When omitted,
the engine uses the directory containing program. When the program is auto-resolved
from CMake Tools, the working directory defaults to
${command:cmake.launchTargetDirectory} (the launch target's directory).
dbgengPath¶
- Type: string · Optional
The path to the dbgeng.dll debug engine library. You usually do not need to
set this. When omitted, the adapter resolves the engine automatically:
- a
dbgeng.dllbundled next to the adapter, then - the installed Windows SDK Debugging Tools
(
...\Windows Kits\10\Debuggers\<arch>\dbgeng.dll).
Set it only to point at a specific dbgeng.dll. If no engine can be found, the
session fails with a clear error.
stopAtEntry¶
- Type: boolean · Optional
- Default:
false
Break at the program's entry point right after launch.
true- pause at entry before any of your code runs, so you can set breakpoints in very-early code.false- the program runs immediately and stops only at breakpoints you've set (the adapter resumes the target after configuration is done).
sources¶
- Type: array of strings · Optional
- Default:
["${workspaceRoot}"]
Folders to search when resolving source files for your code. List every root that contains code you want to step through.
symbolPath¶
- Type: array of strings · Optional
Symbol (PDB) search paths passed to the engine. Each entry may be a local folder
or a symbol-server string (for example srv*C:\symbols*https://msdl.microsoft.com/download/symbols).
trace¶
- Type: string · Optional (omit to disable)
A file path to record the entire DAP session to, for diagnostics and for
building replay fixtures. Omit this field to record nothing (the default). The
recording is written in the adapter's {version, messages} trace format.
Note
Tracing is opt-in. With no trace set, the adapter buffers nothing - there's
no performance or disk cost.