Jupyter laptop stuck in pdb mode

I use a Jupyter laptop (IPython), where pdb / ipdb works fine, except for one problem: if I accidentally run the same cell that pdb is in while in pdb mode, the output disappears, the whole laptop gets stuck, and I no longer I can run commands. I also tried to interrupt or restart the kernel; does not work. My only option is to turn off the laptop and restart it.

Does anyone else experience this problem / know a solution? It is very annoying that I have to restart the notebook every time I make this mistake.

Here are screenshots of the problem. Below I am in pdb mode as expected:

enter image description here

If I (accidentally) launch the same cell where pdb is located, the laptop gets stuck trying to start this cell and will not start anything else (for example, the cell below).

enter image description here

+5
source share
1 answer

It looks like you need to restart. Click on the “Kernel” menu, select “Restart” and click on the “Restart” button. Now re-execute your cell.

+1
source

Source: https://habr.com/ru/post/1262533/


All Articles