-
-
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
pdb raises BdbQuit on 'quit' when started with set_trace #60650
Comments
Also, the two oldest frames of the stack are identical (sic), $ python3 foo.py
> /tmp/foo.py(3)<module>()
-> x = 1
(Pdb) import sys; print(sys.version)
3.2.2 (default, Dec 27 2011, 17:35:55)
[GCC 4.3.2]
(Pdb) list
1 import pdb
2 pdb.set_trace()
3 -> x = 1
4
[EOF]
(Pdb) quit
Traceback (most recent call last):
File "foo.py", line 3, in <module>
x = 1
File "foo.py", line 3, in <module>
x = 1
File "/usr/local/lib/python3.2/bdb.py", line 46, in trace_dispatch
return self.dispatch_line(frame)
File "/usr/local/lib/python3.2/bdb.py", line 65, in dispatch_line
if self.quitting: raise BdbQuit
bdb.BdbQuit
$ |
See how this is fixed at |
I also bumped into this problem on both 2.7 and 3.3. It is very annoying. |
I took Xavier's patch and ported in on the 2.7. It'll probably go as is for 3.2. The functionality seems to be working and tests pass. |
There is an error in my patch (already fixed in pdb-clone) and in Jyrki's patch. $ python quit.py
--Return--
> /tmp/quit.py(4)bar()->None
-> pdb.Pdb().set_trace()
(Pdb) quit
Traceback (most recent call last):
File "quit.py", line 11, in <module>
foo()
File "quit.py", line 7, in foo
bar()
ZeroDivisionError: integer division or modulo by zero This problem does not occur when bpo-17277 is fixed. |
The patch changes the semantics of the quit command: quit behaves like the gdb |
Would be nice to have this commited as without this change - if self.quitting:
- return # None
+ if not self.botframe:
+ self.botframe = frame it's not possible to quit Bdb (and the code it's executing) as it just returns and doesn't raise BdbQuit. |
Yes the patch does change the semantics of the quit command:
Sorry, I should have documented that behavior change. |
I don't think currently we are planning to change the semantics of |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: