-
Notifications
You must be signed in to change notification settings - Fork 34.9k
Closed
Labels
Description
Refs: microsoft/vscode-jupyter#5607
- macOS @isidorn
- linux @gregvanl
- windows @bamurtaugh
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
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
- Click the RBL button
- It should stop execution on the first code line, the RBL button should change to
Run Next Line
, and another button calledContinue Execution
should appear next to it
- Clicking
Run Next Line
should step into the next line, stepping into functions defined in the same cell, but not stepping into anything else (functions in other cells, other python files, other python packages, etc.) - Clicking
Continue Execution
should stop RBL, and continue executing the cell where it left off - Interrupting or Restarting the kernel should also stop RBL
More Testing
- Use the cell toolbar on both positions, check that the Run by Line button doesn't move when you press it
- Check on the panel, that
Jupyter: Variables
comes up and that your variables get updated after each step - Try using it only with the key bindings (each button shows how to do it)
Filing issues
File issues on the jupyter repo using the link above. Include the log from the Jupyter output channel
Known Issues
- Pop up appears after clicking RBL immediately after
Run All
(Stuck VS Code window when starting RBL when other cells are already running vscode-jupyter#7638). If you repro, please add logs, environment and repro steps (if they are different) - Can't check for ipykernel 6 on remote (Can't check for ipykernel 6 on remote kernel vscode-jupyter#7576)
- If you delete a cell (and then bring it back with
ctrl + z
) while its running, it thinks its still running