Skip to content

vscode-cmake-tools default debugger config cmake.debugConfig unable to adapt GDB and lldb simultaneously #3621

Open
@WittonBell

Description

@WittonBell

vscode-cmake-tools has its own debugging configuration in settings.json. When we click the debugging button in the status bar, if we configure our own configuration in settings.json, it will enable our own configuration instead of the default configuration.

Meanwhile, VSCode will determine which debugger to start based on the currently selected compiler. GCC will start GDB, while Clang will start lldb mi or lldb.

Sometimes it may be necessary to configure different startup commands for different debuggers, which can result in the command of another debugger in the configuration not being executed correctly after switching the debuggers, and thus unable to start the debuggers.

for example, cmake.debugConfig in settings.json for lldb:

{
	"cmake.debugConfig": {
		"setupCommands": [
			{
				"text": "settings set target.disable-aslr false",
			}
		],
	},
}

Due to the inability to configure for different debuggers, switching the debugger to GDB, click the debugging button in the status bar:
image

vscode report:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature: debug/launchenhancementan enhancement to the product that is either not present or an improvement to an existing feature

    Type

    No type

    Projects

    Status

    Pending Prioritization

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions