Live data from Hacker News

A Visual Debugger for Jupyter

blog.jupyter.org

31–40 of 74 posts

Re: A Visual Debugger for Jupyter

#31
post #3

I don't see how this debugger is visual, but anyway it's cool to see that jupyter finally has a debugger. This is what I would call a visual debugging experience: https://github.com/hediet/vscode-debug-visualizer/blob/maste... (Disclaimer: I'm the author of that extension)

cool extension but literally every other use of the term visual debugger refers to a graphical interface for something like gdb (where you have to manually type in commands to set break points, step, continue, etc). so I don't think it makes sense to claim that this is not a visual debugger simply because you've decided to redefine the term to suit your needs (publicizing your extension).

I wouldn't blame the person raising the bar for doing so.

Re: A Visual Debugger for Jupyter

#32
post #16

Earlier quoted context omitted.

cool extension but literally every other use of the term visual debugger refers to a graphical interface for something like gdb (where you have to manually type in commands to set break points, step, continue, etc). so I don't think it makes sense to claim that this is not a visual debugger simply because you've decided to redefine the term to suit your needs (publicizing your extension).

I guess, growing up with Delphi IDE, Visual Studio, Browser Dev Tools and finally Visual Studio Code, all calling their "visual debugger" just a "debugger", I got used to debuggers being "visual" by default. As Jupyter has very powerful visualizations, I initially thought they somehow integrated their visualizations into the debugger, just to see that it's an ordinary debugger every modern IDE has. I know a debugger…

You're not wrong, but Jupyter is terrible for everything about programming except in-document HTML/SVG visualizations of expressions (no support for unit testing, laggy Ui response to user input, broken Undo/Redo that throws away data, buggy browser based text editing), yet that one thing is worth all the suffering, so we'll take any improvement we can get.

I don't understand why VisualStudio doesn't have LightTable like expression playground yet, but until it does, Jupyter is what we have -- a fancy REPL and document publishing format being abused as an IDE.

Re: A Visual Debugger for Jupyter

#33
When will jupyter have "highlight and execute" functionality? The cell concept is fine, but I'm constantly copy pasting snippets of code into new cells to get that "incremental" coding approach...

Re: A Visual Debugger for Jupyter

#34

I'm a programmer, mostly not a data scientist nowadays, mostly working with Python. I have tried Jupyter Lab/Notebook on and off over the last 10 years, and I believe I have now firmly settled on my conclusion: Everyone should aim to minimize the amount of work they do in Jupyter Lab / Notebook. It shocks me a bit to find myself saying that, as it is such a beautiful piece of work. Furthermore the people who wrote it…

I don't work in data science but am a physicist working in an engineering field. I very much agree with you. Many of our PhD students learned programming using matlab and it's a mess, they never use version control, everything is in a single script, nobody properly debugs, etc.. I believe this is because matlab encourages that type of programming. I decided very early on to use python instead of matlab, significantly…

In my experience, there's a balance to be stricken. I really like notebooks for documenting the algorithm development process. I used to do a ton of repl driven development and Jupyter is a repl that allows you to persist commands across sessions. It saves a ton of time that I used to spend scrolling through the ipython history after closing and restarting the session. Jupyter also allows you to manage different kernels in the same environment, so it makes tasks like testing code between py2 and py3 trivial. My final point here is that there's also excellent cython integration, so you can do a lot of prototyping of cython code without having to mess with configuration or multiple files. I will agree that there are tasks better suited to IDEs, but jupyter is not just a plotting frontend, it can be used very effectively in algorithm development and the communication/documentation of the development thought process.

Typically, I have a git repo with the final code products, some of the more complex code gets written in notebooks, then transferred to git and thoroughly tested. I've been dreaming of this debugging experience in jupyter because that's still not a task that's suitable for notebooks, but I am hoping that it will come for vanilla python kernels before I can hope to adopt it.

Re: A Visual Debugger for Jupyter

#35
post #23

Earlier quoted context omitted.

there is an extension to provide vim bindings within cells- jupyterlab-vim

yes there is but somehow it is not as good as the codementor extension (iirc you it doesn't play well with cell navigation bindings)

Can you elaborate a little here? I made the switch from classic notebooks to jupyterlab recently and find the bin experience very similar (there's a few subtle differences that I can't remember offhand, but I don't recall having any problems with cell navigation)

Re: A Visual Debugger for Jupyter

#36

I'm a programmer, mostly not a data scientist nowadays, mostly working with Python. I have tried Jupyter Lab/Notebook on and off over the last 10 years, and I believe I have now firmly settled on my conclusion: Everyone should aim to minimize the amount of work they do in Jupyter Lab / Notebook. It shocks me a bit to find myself saying that, as it is such a beautiful piece of work. Furthermore the people who wrote it…

Are there projects to integrate notebooks with version control?

Re: A Visual Debugger for Jupyter

#37
Been wondering about this for a while... How does one "graduate" a notebook to an actual program on a server? Is there an actual standard procedure for that?

I'm pretty sure that if your notebook is big enough to debug what's in it you'd be doing everyone a disservice keeping it contained like that.

Re: A Visual Debugger for Jupyter

#38
post #37

Been wondering about this for a while... How does one "graduate" a notebook to an actual program on a server? Is there an actual standard procedure for that? I'm pretty sure that if your notebook is big enough to debug what's in it you'd be doing everyone a disservice keeping it contained like that.

The fast.ai folks wrote nbdev to help with that. https://github.com/fastai/nbdev

Re: A Visual Debugger for Jupyter

#39

I'm a programmer, mostly not a data scientist nowadays, mostly working with Python. I have tried Jupyter Lab/Notebook on and off over the last 10 years, and I believe I have now firmly settled on my conclusion: Everyone should aim to minimize the amount of work they do in Jupyter Lab / Notebook. It shocks me a bit to find myself saying that, as it is such a beautiful piece of work. Furthermore the people who wrote it…

Speaking as a data scientist and not a software engineer, I think Jupyter is incredibly valuable and I've been excited to see it develop pretty quickly in the few years I've been using it.

I agree with you that it's not a tool for writing software. It's probably best thought of as a really good REPL. And there are tons of uses cases for just that (at least in my discipline): analyzing an experiment, pulling data from a DB and plotting it, sharing boilerplate code, sharing analyses.

Sometimes I use it to test something out in isolation—something that I want to see functioning outside of the larger context of a production system—or to run a local version of an application, but that's not my primary use case.

You correctly observe that it's not a good fit for the tasks you have at hand, but I hope the above illustrates that there are lots of tasks that it's a great tool for.

Re: A Visual Debugger for Jupyter

#40
post #37

Been wondering about this for a while... How does one "graduate" a notebook to an actual program on a server? Is there an actual standard procedure for that? I'm pretty sure that if your notebook is big enough to debug what's in it you'd be doing everyone a disservice keeping it contained like that.

Run https://jupyter.org/hub if you mean sharing the notebook with central administration. Deploying is a whole nother deal.
Post reply on HN