Exiting Python Debugger ipdb

后端 未结 6 1002
被撕碎了的回忆
被撕碎了的回忆 2020-12-25 11:15

I use ipdb fairly often in a way to just jump to a piece of code that is isolated i.e. it is hard to write a real script that uses it. Instead I write a minimal tes

6条回答
  •  生来不讨喜
    2020-12-25 11:43

    I've found these solutions only succeed in breaking your kernel, and then you have to restart and load everything again.

    The problem I was having was in a for loop q will just proceed to the next iteration instead of quitting out of the loop. Eventually I figured out it only happens if your for loop is in a try statement. Remove the try and you can quit out of the debugger again without it continuing the for loop.

提交回复
热议问题