3 ms·
I am personally also not using debuggers much -- I think within the two last years it was only the backtrace functionality of gdb twice for a crashing C program
by Linux-Fan 3y ago
I am personally also not using debuggers much -- I think within the two last years it was only the backtrace functionality of gdb twice for a crashing C program :)
I still wonder whether it would make sense to learn more about using them, though. My reasons for not using a debugger often are primarily:
* I work with different kinds of systems. Printf or some equivalent is always available, Debuggers always require a system- and programming-language dependent setup and incur an additional learning curve.
* The hardest bugs I have encountered so far were timing-dependent and could not be reproduced when running under a debugger.
Instead I prefer to work with the printfs and some tools which work non-interactively like strace and valgrind. To me, it makes a lot of sense to look at the code when there is a problem and consider the problem in my mind, although I would not go as far as saying that this is in any way fundamentally superior to stepping through the code interactively?
- cogman10 3y agoIt's been years since I dealt with C/C++. But, from what I remember the debuggers and their integration with the IDEs wasn't great. In particular, it seemed like embedded dev with debuggers was really painful. I've found that higher level languages (Java/javascript/python/etc) tend to have a much better integration and experience with debuggers than C/C++ did.
- Linux-Fan 3y agoMaybe I am biased because I work in embedded :) Before that I also encountered similar issues at the other end of the performance spectrum: When working with parallelized C++ code that required more than 64 GiB of RAM the overhead of a debugger can make the difference between being able to run the program or not. I still believe that in almost all cases it is possible to use a debugger even there, but it is always a significant setup required. And in the modern languages like Java and Python there are stack traces which already greatly help with the “debugging” such that even there I rarely missed the option to step through a program. I never worked with any really complicated Java or Python codebases, though.