Skip to content

1.1.0-insiders3: Setup commands do not work when attaching #6417

@ryanpholt

Description

@ryanpholt

See launch config:

    "configurations": [
        {
            "name": "attach to main",
            "type": "cppdbg",
            "processId":"${command:pickProcess}",
            "request": "attach",
            "program": "${workspaceFolder}/main",
            "MIMode": "gdb",
            "logging": {
                "engineLogging": true
            },
            "setupCommands": [
                {
                    "description": "add dir",
                    "text": "directory /home/ryanholt/debug_test/add_this_folder",
                    "ignoreFailures": true
                }
            ],
            "miDebuggerPath": "/usr/bin/gdb"
        }

    ]

In 1.1.0-insiders3, the "setupCommands" do not execute (only when attaching?). However, in previous versions they do. In 1.0.1, for example, if I enable engineLogging, I see:

1: (2525) <-1002-interpreter-exec console "directory /home/ryanholt/debug_test/add_this_folder"
1: (2526) ->~"Source directories searched: /home/ryanholt/debug_test/add_this_folder:$cdir:$cwd\n"

However, in 1.1.0-insiders3, I do not see this in the logs. Running -exec show directories confirms that the setup command did not run.

This is a problem for me because we build with -fdebug-prefix-map which means I need to manually set the source path directory.

This repros on any project. However, I attached my very small repro. Use the debug config above and observe that the setupCommands do not work.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions