Skip to content
Advertisement

How to exit pdb and allow program to continue?

I’m using the pdb module to debug a program. I’d like to understand how I can exit pdb and allow the program to continue onward to completion. The program is computationally expensive to run, so I don’t want to exit without the script attempting to complete. continue doesn’t seems to work. How can I exit pdb and continue with my program?

Advertisement

Answer

continue should “Continue execution, only stop when a breakpoint is encountered”, so you’ve got a breakpoint set somewhere. To remove the breakpoint (if you inserted it manually):

JavaScript

Or, if you’re using pdb.set_trace(), you can try this (although if you’re using pdb in more fancy ways, this may break things…)

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement