sagemathinc / cocalc

CoCalc: Collaborative Calculation in the Cloud
https://CoCalc.com
Other
1.17k stars 216 forks source link

cocalc-jupyter: support the interactive debugger protocol #5706

Closed williamstein closed 3 months ago

williamstein commented 2 years ago

See https://jupyterlab.readthedocs.io/en/stable/user/debugger.html

williamstein commented 1 year ago

I realized that cocalc-jupyter actually has a powerful interactive debugger built in, which could be made very useful with just a little work (and which is usable now). To see what I mean:

image

Basically, you just have to open the console (click the Console button) and type %pdb then paste the code that caused the problem, and you get an interactive debugger (and it's actually a pretty good one).

This is only for python based kernels.

This could be easily automated, e.g., when the user gets a traceback, there's a little button or prompt that opens the console, enables pdb mode, then pastes exactly the same code they ran in.

williamstein commented 3 months ago

dupe of #5400