To my understanding, debugger should be built-in when I am using Jupyter Lab now.
However, I couldn’t find any way to use it.
Can someone please explain how I can use debugger?
Thanks
No, absolutely not. The documentation includes an example of how to set up a fresh installation with conda, but there is no need for that. I don’t even have conda installed for my local JupyterLab uses (I use pyenv).
It would probably help if you could hint what are you struggling with. Do you see the bug icon? What kernel (and version of the kernel) are you using? Can you provide a screenshot. What version of JupyterLab displays if you go to Help → About JupyterLab (this can differ from the version you got from pip list if your paths are mis-configured).
@krassowski I am using Jupyter Lab 3.1.18 (in Help->About)
I already have a running notebook and I want to use debugger with its env, if possible.
I dont see a bug icon:
I am using Python3 as the Kernel. I started the session from the terminal tab within my PyCharm, from the venv of an existing project.
Let me clear up some terminology. Python 3 is a language. Kernel is a program wrapping or providing the language interpreter and adding extra functionality (which is characteristic of Jupyter notebooks) on top of it.
There are multiple kernels which provide support for Python 3. You likely use ipykernel; you may have been blissfully unaware of its existence because it did its job so well! However, this time is different; a new feature was added and you would like to make use of it. The documentation explains that:
For Python, both ipykernel (6.0+) and xeus-python support debugging.
Let me highlight that you need to have ipykernel in version 6 or newer to make use of the debugger. This is why I asked for the name and version of the kernel. After upgrading the bug icon should show up. Please let me know if it worked for you.
The listing of versions that you provided in the first post seems to come from pip list (but I cannot ever be sure); if this the case you can confirm that you have ipykernel installed by checking pip list.
@krassowski Great, it worked after upgrading ipykernel from 5.5 to 6+ and now I can use debugger.
I have another question, I don’t see a way to add a new watch (the equivalent to this button of pyCharm).