Debug Python code thats in a PIP package in VS Code

Viewed 1384

My debugging is setup in VS code, I can hit break points in the file I'm running via the launch.json config, but I can't get breakpoints in packages that are installed with PIP. How do I get breakpoints in these package files?

2 Answers

If you know where you python installation is on your computer do this:

  1. Know where you python packets were installed.
  2. File -> add folder to workspace
  3. Add the breakpoints where necessary.

As an alternative i would advise to create a virtual environment and do the same thing but with the safety of virtual environment. Hope that helps.

In addition to File -> Add folder to workspace I had to add this line to launch.json

"justMyCode": false
Related