question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

impossible to exit debugger traces

See original GitHub issue

I like to set traces, and from what I understand from the docs, The Right Way is to use TerminalPdb. However, I can not find out how to quit the TerminalPdb debugger—maybe I’m just daft. Say I set a trace in a long loop:

from IPython.terminal.debugger import TerminalPdb
pdb = TerminalPdb()

while True:
    pdb.set_trace()

The only way to exit this program that I found is to kill it.

My questions are:

  • Is TerminalPdb the best way to set traces?
  • Is this expected behavior?
  • How do I quit?

Thanks!

(I’m on IPython 5.1.0)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
alex-git-rdcommented, Aug 5, 2018

I’m on IPython 6.4, Python 3.6.6 and I’m still getting this issue. Specifically, if I do any .groupby("col").apply(f) in pandas for some function f that has a set_trace(), ipdb doesn’t let me quit by typing q but rather keeps re-running to the next iteration.

1reaction
sizhkycommented, Jun 20, 2019

Use exit()

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to exit pdb and allow program to continue? - Stack Overflow
from pdb, just type disable N, where N is the breakpoint number you are stuck on. If you don't know the number of...
Read more >
Time Travel Debugging - Troubleshooting - Windows drivers
Debugging a trace file without an index file, or with a corrupted or incomplete index file, is possible, but is not recommended.
Read more >
Debugging in the browser - The Modern JavaScript Tutorial
Debugging in the browser · The “Sources” panel · Console · Breakpoints · The command “debugger” · Pause and look around · Tracing...
Read more >
Chapter 11 Debugging R code
Use where to print a stack trace; Use c to leave the debugger and continue execution; Use Q to exit the debugger and...
Read more >
pdb — The Python Debugger — Python 3.11.1 documentation
After post-mortem debugging (or after normal exit of the program), pdb will ... This is useful to hard-code a breakpoint at a given...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found