benibenj / vscode-pythonCpp

A Visual Studio Code Debug Extension for debugging mixed Python and C++ code. The extension starts a Python debug session and attaches the C++ debugger to it. This extension is useful for debugging Python programs that call functions from shared libraries (.so/.dll).
Other
47 stars 7 forks source link

"Please make sure you have a configurations with the names..." #31

Open Linusnie opened 4 months ago

Linusnie commented 4 months ago

Hi, I have a launch.json with the following configurations:

        {
            "name": "pydebug",
            "type": "debugpy",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal"
        },
        {
            "name": "Python C++ Debug",
            "type": "pythoncpp",
            "request": "launch",
            "pythonLaunchName": "pydebug",
            "cppAttachName": "(gdb) Attach",
        },

And I'm trying to run a .py file with a single print statement. However, when I run the Python C++ Debug configuration I get a popup with the following message:

Please make sure you have a configurations with the names 'pydebug' in your launch.json file.

Which is confusing since a configuration with that name does exist. Any idea what the problem could be?

dmyger commented 3 months ago

I have the same issue - can't reuse configs with either pythonLaunchName or cppAttachName.

As workaround I found undocumented options entireCppConfig and entirePythonConfig they requre just copy of your config as value.