3 ms·
Jupyter notebooks are also hilariously debug-unfriendly.
by maest 7y ago
Jupyter notebooks are also hilariously debug-unfriendly.
- BiteCode_dev 7y agoPdb works fine in notebooks though, and that's one of the numerous reasons students should learn it first, before any GUI debugger.
- missjellyfish 7y agoThat implies that students don‘t stop listening as soon as anyone mentions command line. Those who desperately need a debugger to learn are the first ones to not use it because of no GUI.
- prennert 7y agoWait what? Do you know about the %debug magic? It is the best thing ever, particularly when prototyping in the notebook which keeps most of the state. I saw Fernando Pérez use it in a YouTube video. Shame I cannot find it anymore. He was saying he debugs his code only by placing 1/0 in the part of the code he wants to inspect. After the exception is thrown %debug allows you to step into the stack and explore it via a repl. I found that crazy and tried it it. It is life changing. That's how I debug my python code for years now.
- maest 7y agoExpecting users to sprinkle 1/0 through their code is arguably what I mean by "debug unfriendly".