▲ | nananana9 5 days ago | |||||||
But you have to
3. can take quite a while on some projects, and 5. can take quite a while too for long-running programs.And then you see the result of what you printed, figure out you need something else as well, and repeat. Instead you can just trigger a breakpoint and inspect the entire program's state. | ||||||||
▲ | pavon 4 days ago | parent | next [-] | |||||||
For 3, printf debugging is often faster for me because it only requires an incremental rebuild. Whereas with gdb, it is very likely that the release build doesn't show me what I want to see, so I need to do a full debug build from scratch which takes much longer, and sometimes no longer replicates the bug. | ||||||||
| ||||||||
▲ | ranger_danger 4 days ago | parent | prev [-] | |||||||