-
Notifications
You must be signed in to change notification settings - Fork 36.9k
Closed
Labels
Description
Refs: microsoft/vscode-jupyter#1652
- macOS @tanhakabir
- linux @joaomoreno
- windows @joyceerhl
Complexity: 3
Authors: @roblourens, @DavidKutu
Setup
- Use VS Code Insiders and the latest jupyter and python extensions
- Make sure that you have python 3.7 or greater installed and on your path as python3 or python
- Set up a python virtualenv:
mkdir jupyter-dbg
cd jupyter-dbg
python3 -m venv ipykernel-env
- Activate the virtual environment
Mac/Linux:
source ipykernel-env/bin/activate
Windows:
ipykernel-env\Scripts\activate.bat
- Install the latest version of ipykernel in the virtual environment, which has debugging support
pip install ipykernel --pre
python3 -m ipykernel install --user
- Open a .ipynb notebook file (You can use this one if you need one)
- Pick the kernel from your virtual env
- Set
"jupyter.logging.level": "verbose"
Testing
- Set a breakpoint on the cell you want to test
- Click
Debug Cellunder the Run button, you should hit the breakpoint and start a normal debugging session

- Try stepping into other cells, other python files, and other python packages as usual
- Finishing the cell should stop debugging
- Interrupting or Restarting the kernel should also stop Debugging
- While debugging, the run by line button should be disabled
- You should never get a temp file opened that reads:
Could not load source ...
More Testing
- Check on the panel, that
Jupyter: Variablesgets updated after each step
Filing issues
File issues on the jupyter repo using the link above. Include the log from the Jupyter output channel
Known Issues
- Can't check for ipykernel 6 on remote (Can't check for ipykernel 6 on remote kernel vscode-jupyter#7576)
- If while debugging, you change a cell that was already ran, then step into it, we stop in it. We should open a file that stops on the actual code in the kernel (Show source for changed or deleted cells vscode-jupyter#7532)
- The restart button does not work