4 ms·
printf debugging (i.e. listing code execution traces) is better than a breakpoint-based debugger in most situations, in my opinion.
by damnyou 6y ago
printf debugging (i.e. listing code execution traces) is better than a breakpoint-based debugger in most situations, in my opinion.
- breuleux 6y agoFor what it's worth, I made a Python package that lets you combine both approaches: https://github.com/breuleux/breakword https://github.com/breuleux/breakword. You run your program once to print out what's going on, but it also displays a unique word next to each line and on a second run you can set a breakpoint at any of these words to investigate deeper. It's pretty handy when you spot an issue at the hundredth invocation of some function deep in the program's execution.
- a_t48 6y agoThat's really awesome.