-
-
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
The current file cannot be closed because it is in debug mode. #13189
Comments
PS: with PR #13190, you can always go to the current position |
Hi @impact27 I guess we did this to be more clear about the state of the file, something like "hey, this file is being debugged" (maybe @ccordoba12 can give some more reasons about the new behavior). However, seems like this is affecting any file instead of just the one that is actually being debugged, so we need to at least fix that (I could give it a check). Also, taking into account your feedback, actually such behavior could feel kind of intrusive for some users so should we maybe leave it as an optional feature? |
I will try to replicate this behaviour, I think I used post mortem
I think this is a great suggestion. What do you think the default should be? |
Awesome, thanks for the help @impact27 !
Probably the default could be showing the message indicating that the file is being debugged (and also informing there how to change the behavior in the preferences if needed). What do you thing @ccordoba12 ? |
I really don't think we should add an option in Preferences for this. If you want to close the file, you simply need to stop debugging it. That way the user removes the connection between the debugging console and that file, so they can use it for other purposes. I decided to do things like that because users can have the same file being debugged in different consoles, and being located in different lines in each of them. So when they move to one of those consoles, Spyder will correctly update the blue arrow that indicates the line Pdb is placed in. This is a UX problem most other IDEs don't have (because they use a single console), but I think it's important to maintain the current design in our case. |
I would rather have the file close and the debugging continue. If you want to have the file and the debugging linked, then a better solution in my opinion would be to have a pop-up windows saying: "Closing this file will stop the debugging, are you sure you want to continue?"
You can simply reopen the file when the console changes, which is what already happens if you allow for closing the file.
In my case, the problem I have is that I only need to infrequently check on the file, and that I tend to leave the console open while debugging. It is nice to have the file open but not necessary. It can be frustrating to try to close a file and be told no without a good reason. If closing the file would create a loss of data it makes sense to ask if the file should be closed first. But in this case I want to close the file and I am being told no in a discreet way in the console. I am not necessarily looking at the console when working with the editor. So my point of view is that If I am primarily using the console for debugging, having the file open in the editor is a nice to have, but preventing me from closing it is very frustrating. I don't see a good reason for preventing me from closing it even if I am debugging it. |
Closed in #12134 |
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
When trying to close a file, The file doesn't close, and the following message appears:
The current file cannot be closed because it is in debug mode.
But I am not debugging. Even if I was, I find it annoying to not be allowed to close a file if I want to.
What steps reproduce the problem?
I am not sure, I will update if I find a way.
What is the expected output? What do you see instead?
I expect the file to close when I press the cross.
Paste Traceback/Error Below (if applicable)
Versions
Dependencies
The text was updated successfully, but these errors were encountered: