4 ms·
Really depends on your compile->deploy->launch iteration time. Printf'ing your way to victory works but I'm easily 5x faster with a debugger.
by vvanders 7y ago
Really depends on your compile->deploy->launch iteration time.
Printf'ing your way to victory works but I'm easily 5x faster with a debugger.
- toolslive 7y agoYou're right. But you need to have been exposed to a good debugger before you understand this. Preferably you also have had a colleague that was proficient in it to get you started.
- jcelerier 7y agoTo give an opposite metric, on one of the C++ software I develop the "add printf, compile, and run" takes in average 1/2s while it take sometimes up to a minute to load it in gdb or lldb. Which sucks because a lot of things are incredibly easier with a debugger.
- pjc50 7y agoThat's very unusual, is it an embedded environment? I'm used to C++ taking much longer than other languages to compile, which in turn discourages printf debugging.
- jcelerier 7y agonot at all, standard Qt desktop software - when split correctly into object files and shared libraries the incremental build time in C++ can be very fast (also, being on linux and using lld as a linker helps tremendously, building on windows is on average 3-5 times slower for me, and lld links in the bat of an eye compared to bfd (GNU ld) and gold)