Skip to content

Suggestion: add debugger "Compound" support #1134

Description

Hello everyone!

Brief Issue Summary

I want to cover compound system in vscode feature here.

To point to a binary generated by cmake, one can use

"program": "${command:cmake.launchTargetPath}",

as stated in the documentation.

However when debugging multiple binaries at the same time (e.g: client/server system), it is not possible to use cmake.launchTargetPath anymore because we need to select 2 targets to compile.

This is my current launch.json, with 2 cmake targets (respectively named client and server):

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Launch server",
            "type": "cppdbg",
            "request": "launch",
            "program": "${config:cmake.buildDirectory}/server_debinfo",
           .
           .
           .
            ]
        },
        {
            "name": "(gdb) Launch client",
            "type": "cppdbg",
            "request": "launch",
            "program": "${config:cmake.buildDirectory}/client_debinfo",
            .
            .
            .
        }
    ],
    "compounds": [
        {
          "name": "Server/Client",
          "configurations": ["(gdb) Launch client", "(gdb) Launch server"],
        }
      ]
}

The problem is when the configuration is changed (for example, go for release) and the binaries names change, we have to go in launch.json and modify the paths to the binaries by hand each time.

Suggestion:

A nice addition to this plugin would be to have a special variable allowing to point to the binary of a given target, e.g:

"program": "${command:cmake.launchTargetPath(client)}",

and

"program": "${command:cmake.launchTargetPath(server)}",

so compound can be used very easily.

Other Notes/Information

Thank you so much for this wonderful plugin, it is really a daily pleasure to use it!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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 featuremore votes neededWe currently are de-prioritizing this issue until more community up-votes are providedstale-exemptto use with close-stale-issues and close-old-issues bot

    Type

    No type

    Projects

    • Status
      Pending Prioritization

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions