Skip to content

Test: Run By Line in Jupyter notebooks #129467

@roblourens

Description

@roblourens

Refs: #126431, #128582

Complexity: 3

Authors: @roblourens, @DavidKutu

Create Issue


  • Install ipykernel 6 or newer, which has debugging support
pip install ipykernel
python3 -m ipykernel install --user
or
pip install ipykernel --upgrade
  • Make sure you have the latest version of the Jupyter extension installed in VS Code Insiders

  • Set the experiment setting to enable Run by Line "jupyter.experimental.debugging": true

  • Open a .ipynb notebook file

  • Pick a kernel, make sure you pick the one where you installed ipykernel 6

  • Click the Run by Line button in the cell toolbar

image

The button takes a bit to appear, as it's checking that you have ipykernel 6

  • A debugging session should start, without the status bar changing, without the debug widget and without revealing the debug sidebar automatically
  • Press the same button to advance to the next line, or the stop button to end the session
  • Once you've stepped to the end of the cell, you have to press the stop button in the cell toolbar

More testing

  • It should not step into another cell or file
  • Note: the flow above is the only entrypoint. launch.json is not relevant here.
  • Test run by line in an untitled notebook
  • You should never see an error that looks something like "Unable to open ..." with some tmp file path
  • Test run by line in two notebooks simultaneously

Known issues

  • The run by line button takes a second to appear on notebook with valid kernels, it will be cached for the final release.
  • The jupyter variables view is not enabled yet.
  • There are two stop buttons visible (the normal cancel button and the RBL stop button in the cell toolbar) but these will be merged

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions