After opening an interactive console while debugging using
code.interact(local=locals())
How can I resume code execution. I have checked the docs for the 'code' module and search stack overflow but cannot find anything.
It's the same way you exit any Python interpreter session: send an end-of-file character.
That's Ctrl-D on Linux or Ctrl-Z Enter on Windows.
If like me you always forget to hit Ctrl-D, you can wrap up your prompt in a try/except block:
try:
code.interact(local=locals())
except SystemExit:
pass
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With