-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Only support restart command in pdb when it's a command line usage #123756
Comments
Rather than allow_restart, I'd add an enum for the ways that pdb can be invoked. That could be useful for other things. |
Do you mean an indicator for whether |
Yes |
In that case, do you think we should have an Besides |
It can be None by default, and for each situation make None behave like it used to. |
Feature or enhancement
Proposal:
Now when we have a
breakpoint()
in the source code and enter pdb, we can dorestart
and raise aRestart
exception - which in most cases will just stop the program with an exception. For other rare cases, it might be even worse.It simply does not make sense to allow a
restart
command if pdb is not brought up from command line - that exception is only caught in command line usage. So, we should only allowrestart
in command line usage and do nothing (except for an error) in other cases.Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
The text was updated successfully, but these errors were encountered: