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

Usage with Python Test Explorer #1

Closed jnjaeschke closed 3 years ago

jnjaeschke commented 3 years ago

Is there any way of using this extension in combination with the python test explorer? The idea would be that I could debug a test using the UI and instead of launching "python -m pytest mytest" it immediately attaches the c++ debugger to it.

benibenj commented 3 years ago

The python test explorer looks for a configuration of type 'python' and starts the debugger with those setting, if it doesn't find such a configuration it just uses the default configurations. So this means we can't make it start with our debugging settings as we have another debug type. It would be great if we could explicitly select which debugger to use, however, they don't support that currently.

bilderbuchi commented 2 years ago

It would be great if we could explicitly select which debugger to use, however, they don't support that currently.

I also think that this could be quite useful for debugging tests - is there an issue tracking this?

benibenj commented 2 years ago

There is no issue tracking this currently which I know of. As the VSCode devs were working on their own testing features/panel, I hoped they would introduce this possibility.