3 ms·
Get a better debugger. rr (rr-project.org) can record your program and let you run it both backwards and forwards as you investigate the problem. This is incred
by db48x 6y ago
Get a better debugger. rr (rr-project.org) can record your program and let you run it both backwards and forwards as you investigate the problem. This is incredibly powerful. Suppose you've discovered that a variable in memory has the wrong value. With rr you can set a watchpoint on the memory location and run the program backwards until it stops at the exact point in the code where that value was written to memory. You can use this to trace all incorrect values back to their source.
Pernosco (pernos.co) is an even more powerful debugger. It takes an rr recording and gives you an omniscient view of it. It's difficult to describe how powerful this is, but you should definitely watch the demos on their webpage. I think that this is what all competitive debuggers will be like in 10 years. (Any debugger that doesn't gain these features will simply fall out of use.)