I am very much dependent on the debugger when I work. It’s a huge timesaver when it comes to making my own code run properly, and it’s also the only way I can realistically be able to understand other people’s code.
I have adopted Julia 0.6 even without the debugger, but it’s frustrating when I move beyond toy projects. Every time something goes wrong, an index out of bounds, or my vectors all turn to NaN
s, it’s a slog to identify the often tiny mistakes that cause this. Then I squint and print, and add plot statements, endlessly reloading Julia and trying to re-create the workspace as it was.
A bug that takes half a minute to track down in the debugger suddenly costs me half a workday or more. It is inconceivable that I could develop anything bigger than a couple of hundred loc without a debugger.
Without a debugger I also find myself frequently frustrated in figuring out how Julia itself works. To understand the behaviour of somefunction
I call @less somfunction(someinput)
, only to find that it is translated to somefunction(identity, someinput)
, which calls _somefunction(io, identity, someinput)
, which goes to _blah_mapreduce__(identity, someinput, :compact, helloworld())
, each time sending me back to the prompt trying to @less
my way down the rabbithole. Then I give up.
With a debugger, it’s ‘step-in, step-in, step-over, step-in’ and voila! I understand what’s going on. I am one with the code and the program state, and everything becomes clear.
No-one ever trained me to do that, and when I try, it feels like crawling, blindfolded and hung over through a cactus field with both arms tied on my back.
Still, I vastly prefer Julia over Matlab, even with the latter’s awesome debugger.