microsoft / microsoft/vscode-cpptools

Debug: Compound - Python / Attach C Process doesn't work

Open
#5,917 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debugger
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Type: Debugger

Describe the bug

  • OS and Version: Windows 1909
  • VS Code Version: 1.48-insder
  • C/C++ Extension Version: v0.29.0
  • Other extensions you installed: Python extension

To Reproduce

  1. Open folder in VS Code
  2. Create a new python file:
print("hello world")
  1. Add launch.json config:
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [

        {
            "name": "C: Attach to Process",
            "type": "cppvsdbg",
            "request": "attach",
            "processId": "${command:pickProcess}",
            "visualizerFile": ""
        },
        {
            "name":"Python: Current File",
            "type":"python",
            "request":"launch",
            "program":"${file}",
            "console":"integratedTerminal",
            "stopOnEntry": true
        },
    ],
    "compounds":
    [
        {
          "name": "C: Current Python File",
          "configurations": ["Python: Current File", "C: Attach to Process"],
        },
    ]
}
  1. Select the compound launch in the debugger and start it (F5)
  2. See the error Message

image

When you launch the python and c launch task separately it works:

image

Root Issue:
https://github.com/microsoft/vscode/issues/104174

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the compound launch from the provided launch.json on the listed Windows, VS Code, and C/C++ extension versions. Read the linked VS Code issue 104174 alongside the six comments; done means the Python and C attach configurations launch together successfully through the compound configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, python, typescript
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.