VSC’s Python debugger breaks exercise scripts

Running VSC’s Python debugger doesn’t work when testing scripts.

The debugger ‘breaks’ the file location in VSC in my shell where I am experimenting with exercise scripts - - it reverts the current working directory location to several directories above - - disrupting my CLI workflow. Am I doing something wrong? Or is this a glitch / known issue that can be fixed or is planned to be fixed? Or would this fit more so into the category of feature request?

I am not a power user of VSC for Python (I use VSC mainly for SVG, Go-lang, and mermaid diagramming), but I did find this set of instructions on how to set up a launch config json for the VSC debugger, which might help you set the path you’d like for exercises. Additionally, I found a Python debugging configurations article in the VSC docs, but don’t know if any of the configurations lists would be helpful for your curcumstance.

You can also find general debugging docs for VSC here.

I know that PyTest can be run in a mode that drops you into PDB for debugging when a test fails, but have not experimented with that particular setup outside of using it directly in a terminal shell.

So I hope some of that helps. :slight_smile: