-
-
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 magic does not work repeatably for untitled files #16417
Comments
Hi @madphysicist, Thanks for reporting, I was able to reproduce this issue. @impact27, do you know why this is happening? |
@steff456 Thanks for confirming. I always have a lingering doubt that I missed something stupid in the docs or configuration when I post bug reports. |
It looks like the breakpoints are broken for unsaved files. Can you reproduced for a saved file? |
@impact27 the file was saved in this example. I used the name I initially started posting the issue because the file wouldn't debug after I modified the function, saved, and reran the cell. But it quickly became apparent that there was no need to do all that. The debugging inline magic breaks even with a completely intact source. |
I can't reproduce with the latest 5.x |
To solve this for unsaved files, we could remove the last two lines of https://github.com/spyder-ide/spyder-kernels/blob/master/spyder_kernels/customize/namespace_manager.py , but that would mean the files stay cached forever |
@ccordoba12 Thank you! |
@impact27 was the one who really fixed this. |
@impact27 thank you for the fix. I look forward to using it |
What steps reproduce the problem?
Create a simple file with a single cell with like this:
Execute the file using the green arrow:
Place a breakpoint in line 4:
Run a
%debug
magic onfoo
with any argument:Enters debugging normally:
Quit debugging (or step through) and try again
Only "s" appears to work, and pressing "c" ignores the breakpoint entirely:
Expected Behavior
I expect
%debug
to work twice, especially when I don't modify the file.Attempted solutions:
Does not work
foo
in the console:Does not work.
Comment
The reason that I mention cells in the example is that ideally, I would like to reload my code by running the cell rather than the entire file. The files I have at the moment are sort of like notebooks that I am using the cell functionality to run. I would love not to have to reload the entire file (mush less the kernel), every time I made a change just to the function I'm trying to debug.
Versions
Dependencies
The text was updated successfully, but these errors were encountered: