Python debugger doesn't import local files in vs code #20416
Unanswered
david26694
asked this question in
Q&A
Replies: 1 comment
-
|
The difference is in how you launched Python in the debugger versus on the command-line. You used And FYI you forgot your |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Repro Steps
mkdir folder_structuremkdir folder_structure/utilstouch folder_structure/utils/tools.pytouch folder_structure/main.pyI'm getting:
I have the following in my launch.json:
{ "version": "0.2.0", "configurations": [ { "name": "Python: Current File", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal", "env": { "PYTHONPATH": "${workspaceRoot}" } } ] }How can I import a local module when using the debugger?
This works for me:
Beta Was this translation helpful? Give feedback.
All reactions