-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Debug File (Ctrl+F5) does not respect working directory in Run configuration #22496
Comments
I'm experiencing the same issue. "Debug File (Ctrl+F5)" ignores all working directory settings. I have a local module and when I try to debug the module the working directory immediately changes to that of the module where I want it to stay at the currently working directory. "Run (F5)" works as intended as set in the configuration. I'm unable to debug local modules in Spyder 6. This is an issue in 6.0.0 and 6.0.1. |
Same issue, "command line options" are ignored when using the Debugger. I cannot debug with command line options. |
Hi @roteiro thank you for the report! Checking seems like the
I would say no, sorry :/ the closes thing you could do currently is to set the global config to use the |
I think we should pass the working directory to the |
[ The suggested workaround is working: |
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
Consider the following project structure of the folder
testproject
The python interpreter is set to
path/to/testproject/.venv/Scripts/python.exe
. I want to runfoo.py
from the dirtestproject
, therefore, i set the following run configuration underRun->Configuration per File
Content of
foo.py
What steps reproduce the problem?
I tried two different ways of running the file:
a) Run foo.py with F5
b) Debug foo.py with Ctrl+F5
What is the expected output? What do you see instead?
a)
I expect to to automatically enter the debugger due to the run configuration and the deliberate ValueError. This basically happens, except for the unexpected
*** NameError: name '_pdbcmd_print_frame_status' is not defined
Full output of a)
b) I expect the execution with the wdir set to the project root and the lauch of the debugger. However, the Working directory settings seem to be ignored for
Ctrl+F5
, since the working directory is changed to the folderscripts
Full output of b)
Bonus Question
Is it correct that at the moment, there is no possibility to set the global run configuration such that the wdir is relative to the currently opened Spyder project?
Versions
Dependencies
The text was updated successfully, but these errors were encountered: