|
|
|
|
|
by amitoz_azad
2192 days ago
|
|
Yes, the jupyter notebook thing, rightly pointed out by you, it does give a quick feedback. One can also start writing code from the beginning in it and push a working cell into a .py file. This way one is very sure from the beginning that how the code will work. The downside of it, which I think, it feels to me that code is written in a very linear fashion. Coming to debugger in python (pdb), in your blog you criticize using debugger to step line by line. But this need not be the case, one can jump to debugger prompt and set a break point from the prompt itself where one feels something is wrong and continue to that break point and repeat this process. So one need not to jump through each line. In such a case it works equivalently to carefully put print statements, i.e judiciously put print statements = judiciously put breakpoints, what do you think? |
|
A professional uses them to trap events and then explore the programs state. And to inject faults and watch how the program explodes, or not. In that debuggers are vastly better than printf debugging.