Skip to content

[Enhancement] GDB attach config in Linux should not have "program" as a required parameter #5713

Open
@Ranjan163

Description

@Ranjan163

Type: Debugger

Describe the bug

  • OS and Version: Linux (All versions)
  • VS Code Version: 1.46.1
  • C/C++ Extension Version: v0.29.0-insiders
  • Other extensions you installed (and if the issue persists after disabling them): Not Applicable
  • A clear and concise description of what the bug is.

I have been using VS Code with C/C++ Debugger extensively for debugging running applications in Linux
GDB attach config in Linux currently needs path to executable i.e. the "program" parameter in launch.json
This parameter is marked as "required" in the json schema
Standalone GDB can attach to a process using just the "pid".

Can this extension be enhanced to support attach configuration with just a pid / attachQuickPick
If the executable path is necessary, then I suppose it can be queried using proc file system (/proc/'pid'/cmdline or /proc/'pid'/exe)

To Reproduce
Please include a code sample and launch.json configuration.
Steps to reproduce the behavior:

  1. Use the attached "launch.json"
    launch.json.zip

  2. Start this launch config

  3. Select a process to attach the debugger to

  4. A popup is displayed that attach property "program" is missing ("1.png")
    1

)

Additional context
If applicable, please include logging by adding "logging": { "engineLogging": true, "trace": true, "traceResponse": true } in your launch.json
Add any other context about the problem here including log or error messages in your Debug Console or Output windows.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions