-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Python Debugger is overiding PYTHONPATH #2509
Comments
I can't remember if we supported this in the old debugger (if we did then this is a regression). Otherwise I think of any reason off the top of my head to not append |
Thank you for the quick reply. Hopefully this can be resolved. |
@tkuraku |
@DonJayamanne |
I'm having the same issue and it used to work a couple of days ago. running my script in either ipython or python in the terminal works as expected. when running the debugger with these settings
shows that the PYTHONPATH is being overwritten to |
adding individual softlinks to
|
I believe the solution is not to invoke PTVSD as a package, but to run a python file that'll launch PTVSD with the path setup (e.g. @brettcannon changing labels as this is a break from previous (old debugger) behavior. |
My PYTHONPATH is a global environment variable. I think that once the script has started that anything added with |
@brettcannon |
@DonJayamanne are we running a separate process to get |
No we aren't running a separate process. |
My PYTHONPATH is a global environment variable as well (set in .bashrc) |
After the recent upgrade, I have noticed the same issue on Linux (CentOS 7, Python 3.4, VS Code Version 1.12.1)
{
"name": "Python: run_tests.py",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/src/run_tests.py",
"console": "integratedTerminal",
}
The same code run from a command line works fine:
-- |
@dmitriyrepin FYI that the terminal in VS Code is a fresh terminal and shell (i.e. a separate process and such), so the fact the terminal picks up |
FYI: I re-installed VS Code 1.26.1 + plugins in my container - same issue. |
Yes, I try to roll back to before version, i can start debugging code |
I was able to verify that my PYTHONPATH env var shows up in |
Environment data
Actual behavior
When I debug a python file in vscode my PYTHONPATH variable is overridden.
here is the relevant line shown on the terminal.
set "PYTHONPATH=c:\Users\username.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd"
Expected behavior
I would expect the PYTHONPATH to be appended to not overridden.
Steps to reproduce:
You should not see the path that you set in the PYTHONPATH
The text was updated successfully, but these errors were encountered: