max
max

Reputation: 52235

python interpreter: interrupt and continue

After I interrupt execution in Python interpreter (using CTRL-BREAK in Windows), can I continue execution?

If not, is there any other way to interactively pause execution (so I can view variable values), and then continue?

I prefer not to use the debugger because it's much slower than normal execution.

Upvotes: 7

Views: 1940

Answers (2)

max
max

Reputation: 52235

I found some useful links that kinda answer my question:

http://blog.devork.be/2009/07/how-to-bring-running-python-program.html

How do I attach a remote debugger to a Python process?

http://wiki.python.org/moin/DebuggingWithGdb

Is there a way to attach a debugger to a multi-threaded Python process?

Overall, it seems winpdb can do what I need (I'm under Windows), but I haven't tested it.

Upvotes: 2

icyrock.com
icyrock.com

Reputation: 28598

I don't know if you mean pdb by debugger, but if you don't (and it might be helpful for others here), you can try:

Here's a nice tutorial btw:

Upvotes: 2

Related Questions