Debugging - DataSpell
PyCharm IDE has always been my to-go IDE, and it’s debugger is pretty easy to use. In Jupyter notebook there’s a handy breakpoint
that I used a lot.
I’ve tried DataSpell a while ago when it first released, but ultimately went back to Jupyter notebook since it’s plotly
support was lagging.
However the newer version of DataSpell seems to be able to output most of the plotly
plots.
To my surprise, the debugger works almost like a PyCharm debugger except the console
which doesn’t seem to be able to create a python environment, but the debugger seems to work pretty well.
It’s seems to be able to support a few modes of operation.
- Debugging on the current cell.
- Debugging another.
- Debugging another imported modules.
Example script:
from tools import tools_plus_one
def plus_one(a):
a += 1
return a
# Method 1
a = 1
a += 1
# Method 2
plus_one(a)
# Method 3
tools_plus_one(a)
Some examples: 1. Debugging current cell:
- Debugging another function.
Note: That you’ll need to first press debug on the function, although it will jump out immediately, then go to the cell that calls this function and press debug.
- Debugging another imported modules.
Note: Similar to debugging another function, you’ll need to run debug on this other file too with the breakpoint, and it’s fine if this module breaks since it might import another non-existent module, but this will at least activate the breakpoint.