Detect Kernel Restart inside extension

There is some recent discussion about kernel hooks (Kernel actions hooks · Issue #10501 · jupyterlab/jupyterlab · GitHub) and implementation of restart commands (Implemented Restart and debug by JohanMabille · Pull Request #10462 · jupyterlab/jupyterlab · GitHub) which appears related.

Currently debugger already reacts to kernel restarts (in a way), but it seems to be listening on kernelChanged instead (see handler.ts). I wonder if this is emitted on restarts too? It would be good to experiment if you are interested in this (I don’t have time right now and cannot guarantee it will succeed but if you really need that it might be worth a try).

1 Like