Configure C/C++ debugging
A launch.json
file is used to configure the debugger in Visual Studio Code.
Visual Studio Code generates a launch.json
(under a .vscode
folder in your project) with almost all of the required information. To get started with debugging you need to fill in the program
field with the path to the executable you plan to debug. This must be specified for both the launch and attach (if you plan to attach to a running instance at any point) configurations.
The generated file contains two sections, one that configures debugging for launch and a second that configures debugging for attach.
Configure VS Code's debugging behavior
Set or change the following options to control VS Code's behavior during debugging:
program (required)
Specifies the full path to the executable the debugger will launch or attach to. The debugger requires this location in order to load debug symbols.