Cpp Debug READMEThis extension integrates MIEngine to support debugging of C/C++ programs using gdb. Since this extension uses the same debug adapter (MIEngine) as RequirementsYou should have FeedbackPlease provide feedback by filing an issue on Gitee Configure C/C++ debuggingA example configurations
Detailed Configurationprogram (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. symbolSearchPathTells the Visual Studio Windows Debugger what paths to search for symbol (.pdb) files. Separate multiple paths with a semicolon. For example: requireExactSourceAn optional flag that tells the Visual Studio Windows Debugger to require current source code to match the pdb. additionalSOLibSearchPathTells GDB or LLDB what paths to search for .so files. Separate multiple paths with a semicolon. For example: externalConsoleUsed only when launching the debuggee. For
avoidWindowsConsoleRedirectionIn order to support Integrated Terminal with gdb on Windows, the extension adds console redirection commands to the debuggee's arguments to have console input and output show up in the integrated terminal. Setting this option to loggingOptional flags to determine what types of messages should be logged to the Debug Console.
visualizerFile
showDisplayStringWhen a Example:
argsJSON array of command-line arguments to pass to the program when it is launched. Example cwdSets the working directory of the application launched by the debugger. environmentEnvironment variables to add to the environment for the program. Example: Example:
MIModeIndicates the debugger that will connect to. Must be set to miDebuggerPathThe path to the debugger (such as gdb). When only the executable is specified, it will search the operating system's PATH variable for a debugger (GDB on Linux and Windows, LLDB on OS X). miDebuggerArgsAdditional arguments to pass to the debugger (such as gdb). For example: specify the code path stopAtEntryIf set to true, the debugger should stop at the entry-point of the target (ignored on attach). Default value is stopAtConnectIf set to true, the debugger should stop after connecting to the target. If set to false, the debugger will continue after connecting. Default value is setupCommandsJSON array of commands to execute in order to set up the GDB or LLDB. Example: customLaunchSetupCommandsIf provided, this replaces the default commands used to launch a target with some other commands. For example, this can be "-target-attach" in order to attach to a target process. An empty command list replaces the launch commands with nothing, which can be useful if the debugger is being provided launch options as command-line options. Example: launchCompleteCommandThe command to execute after the debugger is fully set up in order to cause the target process to run. Allowed values are "exec-run", "exec-continue", "None". The default value is "exec-run". Example:
symbolLoadInfo
dumpPathIf you want to debug a Windows dump file, set this to the path to the dump file to start debugging in the coreDumpPathFull path to a core dump file to debug for the specified program. Set this to the path to the core dump file to start debugging in the miDebuggerServerAddressNetwork address of the debugger server (for example, gdbserver) to connect to for remote debugging (example: localhost:1234). Example Configuration
debugServerPathFull path to debug server to launch. debugServerArgsArguments for the debugger server. serverStartedServer-started pattern to look for in the debug server output. Regular expressions are supported. filterStdoutIf set to true, search stdout stream for server-started pattern and log stdout to debug output. Default value is true. filterStderrIf set to true, search stderr stream for server-started pattern and log stderr to debug output. Default value is false. serverLaunchTimeoutTime in milliseconds, for the debugger to wait for the debugServer to start up. Default is 10000. pipeTransportFor information about attaching to a remote process, such as debugging a process in a Docker container, see the Pipe transport settings article. hardwareBreakpointsIf provided, this explicitly controls hardware breakpoint behavior for remote targets. If require is set to true, always use hardware breakpoints. Default value is false. limit is an optional limit on the number of available hardware breakpoints to use which is only enforced when require is true and limit is greater than 0. Defaults value is 0. Example: "hardwareBreakpoints": { require: true, limit: 6 }. processIdDefaults to ${command:pickProcess} which will display a list of available processes the debugger can attach to. We recommend that you leave this default, but the property can be explicitly set to a specific process ID for the debugger to attach to. requestIndicates whether the configuration section is intended to targetArchitectureDeprecated, This option is no longer needed as the target architecture is automatically detected. typeIndicates the underlying debugger being used. Must be sourceFileMapThis allows mapping of the compile-time paths for source to local source locations. It is an object of key/value pairs and will resolve the first string-matched path. (example: |