How do you use debuggers?

There is no need to get cheeky. I do genuinely use print statements. Actually, a little more refined. My C++ code is full of DEBUG level logging and assert statements that check my preconceptions. On a normal build these are completely eliminated by the compiler. If I get an unexpected error, I run a debug build which usually quickly identifies the problem. This also has the benefit of fully documenting what I expect my code to do (useful especially with C++). I actually find this process much faster than stepping through my (often long and complex) simulations in a debugger.

But this isn’t some kind of competition! We were asked for our opinions, so I gave my experience. I definitely think having a great debugger is an asset. It’s just that when reading through the lists of https://discourse.julialang.org/t/list-of-most-desired-features-for-julia-v1-x/4481 I’m a bit disheartened to read so many people wanting just a debugger and static compilation. I’d be much more interested in traits and other nice language features.

2 Likes