question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

debug cell in jupyter notebook never executes or reaches breakpoint

See original GitHub issue

Issue Type: Bug

The debug cell feature has stopped working in jupyter notebooks, while still working in python scripts. I’ve observed this with different breakpoints in different source files.

For jupyter cells, the execution just hangs with the options to step over, step into… etc grayed out. Only options to pause, reset, and disconnect debugger are available. Upon disconnecting, nothing is output from the cell. Screenshot from 2022-03-02 11-43-42

Additionally I’ve noticed that sometimes when the notebook is first opened there is no option to debug the cell. After executing the cell, the option appears. Screenshot from 2022-03-02 12-15-34

VS Code version: Code 1.64.2 (f80445acd5a3dadef24aa209168452a3d97cc326, 2022-02-09T22:02:29.527Z) OS version: Linux x64 5.13.0-30-generic snap Restricted Mode: No Remote OS version: Linux x64 5.4.0-97-generic

System Info
Item Value
CPUs Intel® Core™ i7-8550U CPU @ 1.80GHz (8 x 2000)
GPU Status 2d_canvas: unavailable_software
gpu_compositing: disabled_software
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: disabled_off
rasterization: disabled_software
skia_renderer: enabled_on
video_decode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
Load (avg) 1, 1, 1
Memory (System) 15.52GB (5.42GB free)
Process Argv –no-sandbox --force-user-env --unity-launch --crash-reporter-id 09889aea-dff4-45a4-8c0b-7ecc3bf3592e
Screen Reader no
VM 0%
DESKTOP_SESSION ubuntu
XDG_CURRENT_DESKTOP Unity
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
Item Value
Remote Container 10.0.0.95:5000/ybagdasa/pytorch1.10.0-cuda11.1-cudnn8-devel:detectron2 (ybdetectron2) @ ssh://10.158.62.106
OS Linux x64 5.4.0-97-generic
CPUs AMD EPYC 7302 16-Core Processor (32 x 1463)
Memory (System) 188.77GB (97.93GB free)
VM 0%
Extensions (20)
Extension Author (truncated) Version
jupyter-keymap ms- 1.0.0
remote-containers ms- 0.224.2
remote-ssh ms- 0.74.0
remote-ssh-edit ms- 0.74.0
remote-wsl ms- 0.64.2
vscode-remote-extensionpack ms- 0.21.0
preview-tiff ana 1.0.1
gitkraken-authentication git 1.0.3
kite kit 0.147.0
vscode-docker ms- 1.20.0
anaconda-extension-pack ms- 1.0.1
python ms- 2022.0.1814523869
vscode-pylance ms- 2022.2.4
jupyter ms- 2022.1.1301854968
jupyter-keymap ms- 1.0.0
jupyter-renderers ms- 1.0.6
autodocstring njp 0.6.1
vscode-commons red 0.0.6
vscode-yaml red 1.4.0
pdf tom 1.2.0
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
pythonvspyl392:30443607
pythontb:30283811
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805cf:30301675
pythonvspyt200:30340761
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30433507
vsclayoutctrc:30437038
vsrem710:30416614
dsvsc009:30440023
pythonvsnew555cf:30442237
vsbas813:30436447
vscscmwlcmt:30438805
helix:30440343
vscaac:30438847
vsnot107:30443614

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ybagdasacommented, Apr 10, 2022

@IanMatthewHuff Confirming, that was indeed the issue. Working now with upgraded ipykernel.

1reaction
dmho418commented, Apr 1, 2022

@IanMatthewHuff upgraded to ipykernel 6.11.0, the debugger is working now. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when debugging a jupyter notebook in VSCode when a ...
I have never attempted to use a debugger in th notebook simply because notebooks enable to user to break down each component even...
Read more >
Run and debug Jupyter notebook code cells - JetBrains
Debug code in Jupyter notebooks ... Set the breakpoints in the selected cell and press Alt + Shift + Enter for Windows or...
Read more >
10 reasons why I use VS Code for Jupyter Notebooks
A proper debugger allows you to place breakpoints anywhere in your code, these can be conditional and then let you stop your program...
Read more >
Python Debugging With Pdb
When the line above is executed, Python stops and waits for you to tell it what to do ... By default, breakpoint() will...
Read more >
Appendix B — More on the IPython System - Wes McKinney
In Ch 2: Python Language Basics, IPython, and Jupyter Notebooks we looked at ... and run the script until we reach the breakpoint...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found