Skip to content
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

[RFC] pdb: display stacktrace on quit? #4293

Closed
blueyed opened this issue Nov 2, 2018 · 3 comments
Closed

[RFC] pdb: display stacktrace on quit? #4293

blueyed opened this issue Nov 2, 2018 · 3 comments
Labels
plugin: debugging related to the debugging builtin plugin

Comments

@blueyed
Copy link
Contributor

blueyed commented Nov 2, 2018

Python itself displays the stacktrace for BdbQuit. Should we also display it, possibly with any test summary?

-> print("hello18")
(Pdb) q
Traceback (most recent call last):
  File "test_pdb.py", line 17, in <module>
    test_1()
  File "test_pdb.py", line 8, in test_1
    print("hello18")
  File "test_pdb.py", line 8, in test_1
    print("hello18")
  File "…/pyenv/3.6.6/lib/python3.6/bdb.py", line 51, in trace_dispatch
    return self.dispatch_line(frame)
  File "…/pyenv/3.6.6/lib/python3.6/bdb.py", line 70, in dispatch_line
    if self.quitting: raise BdbQuit
bdb.BdbQuit

When using Exit or Interrupted it will not display any of those.

  1. should there be an option on Exit (similar to returncode) to display
    traceback and test summary, as with a failed test?

An option (hack?) might be to raise Failed (that's how BdbQuit gets up
handled currently (in master)), and set a flag on the session to stop? (basically exitfirst then)

  1. would Interrupted (from/on Session) be more appropriate here than Exit?

  2. should there be an option for this behavior(s)?
    After all I like that currently on features it exits rather cleanly with
    "Exiting debugger", without stacktrace and "short test summary info" etc.

@blueyed blueyed added the plugin: debugging related to the debugging builtin plugin label Nov 2, 2018
@blueyed blueyed changed the title pdb: display stacktrace on quit? [RFC] pdb: display stacktrace on quit? Nov 3, 2018
@blueyed
Copy link
Contributor Author

blueyed commented Dec 10, 2018

Any input on this? (relevant for #4280)

@blueyed
Copy link
Contributor Author

blueyed commented Apr 3, 2019

Will look into this again, since I've noticed that captured output is not displayed when using "quit" during a test.

@blueyed
Copy link
Contributor Author

blueyed commented May 10, 2019

By now (on features) it gets displayed with EOF (Ctrl-d), but not quit.

@blueyed blueyed closed this as completed May 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: debugging related to the debugging builtin plugin
Projects
None yet
Development

No branches or pull requests

1 participant