Today I learned how to use the VS Code debugger in code from “other” modules.
Sometimes you may want to use the VS Code debugger and also trace into code from “other” modules, 3rd party modules you are using.
To do this, you need to disable the option justMyCode
, which you must set to false
:
"justMyCode": false
However, you need to do this in the correct place and then you need to run your debugger correctly.
Here are the steps you need to follow:
"launch"
section with an option "configurations"
that is a list (which may or may not be empty)1;{
"name": "Python: Current File but not just my code",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": false
}
"name"
to something you can identify;That's it for now! Stay tuned and I'll see you around!
the file opened may be settings.json
– in which case the list "configurations"
is inside the dictionary "launch"
– or it may be the file launch.json
– in which case the list "configurations"
is at the top level of the JSON. Either way, the JSON shown above goes inside the list "configurations"
. ↩
The next cohort of the Intermediate Python Course starts soon.
Grab your spot now and learn the Python skills you've been missing!