Change PYTHONPATH before debug #21837
-
Hello, I am trying to set the PYTHONPATH and other environment variables before launching the debugger. The PYTHONPATH is being set using a shell script, which I managed to run using a task with the I'm unsure if I could or should achieve this using tasks. What I need is to execute a command that will correctly update my PYTHONPATH before the debugger launches the script, as I have different PYTHONPATH setups that I need to use. Does anyone have an idea about how I could accomplish this? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
You can set environment variables in your See https://code.visualstudio.com/docs/python/debugging for our docs on debugging. |
Beta Was this translation helpful? Give feedback.
As I said, you can use a task to launch the process you want to attach to and then have the debugger connect to that process. Otherwise there isn't a way to use a task to launch the debugger itself that I can think of.