Debugger

JupyterLab 3.0 now ships with a Debugger front-end by default.

This means that notebooks, code consoles and files can now be debugged from JupyterLab directly!

Requirements

For the debugger to be enabled and visible, a kernel with support for debugging is required.

For now xeus-python is the only Jupyter Kernels for Python that supports debugging. However other Jupyter Kernels can also support debugging and be compatible with the JupyterLab debugger by implementing the Jupyter Debugger Protocol.

To install xeus-python in a new conda environment:

conda create -n jupyterlab-debugger -c conda-forge jupyterlab=3 xeus-python
conda activate jupyterlab-debugger

Usage

xeus-python can be selected from the JupyterLab launcher:

../_images/xpython-launcher.png

Alternatively, it is also possible to switch to the xpython kernel using the kernel selection dialog:

../_images/kernel-selection.gif

Enable the debugger, set breakpoints and step into the code:

../_images/step.gif

Tutorial Notebook

There is also a tutorial notebook to try the debugger that is available on the jupyter-ide-demo repo. and can be run on Binder here.

../_images/tutorial-notebook.png