How do you use debuggers?

This thread is already quite long but I can’t resist to add my two cents.

I personally have also something like 20 years of coding experience, learned dozens of languages (of course only a few of them really well) and what I can say is a basically a general statement about tools and their usability:

I use them [debuggers] when they feel comfortable/natural to use, i.e. are easily accessible.

Eg. when I worked with Visual Studio (C++) or Eclipse (Java) a few years ago on a daily basis (I was forced to have some adventures on Windows), I used the debugger literally all the time, because it was easy to point and click on lines to set breakpoints to see when a piece of code is called, step through the code via the F-keys, inspect and manipulate variables on the go etc.

However, I normally code in VIM inside tmux sessions and I still have not developed a fluid workflow for using gdb, pdb, jdb, or whatever. They just feel awkward to me and are most of the time outperformed by very basic debugging techniques like printing or isolating in REPL/notebooks/etc.

For me, debugging simply depends on the editor/IDE I use. I also gave WebStorm, PyCharm, and Atom for Julia a try and loved their debugging features (including Gallium), however I can’t live without my VIM/tmux workflow, so all those IDEs are no replacements for me. I occasionally fire them up if I really need an actual debugger and don’t want to mess around with *db in the terminal.

Also having a good unit test coverage makes debugging a bit more obsolete imo.

2 Likes