4 ms·
Your framing makes it sound like the log is worse in some way, but what the log gives you that the debugger makes you assemble in your head is a timeline of whe
by demosthanos 1y ago
Your framing makes it sound like the log is worse in some way, but what the log gives you that the debugger makes you assemble in your head is a timeline of when things happen. Being able to see time is a pretty big benefit for most types of software.
I can always drop an entire state object into the log if I need it, but the only way for a debugger to approximate what a log can give me is for me to step through a bunch of break points and hold the time stream in my head.
The one place where a debugger is straight up better is if I know exactly which unit of code is failing and that unit has complicated logic that is worth stepping through line by line. That's what they were designed for, and they're very useful for that, but it's also not the most common kind of troubleshooting I run into.
- hobs 1y agoIt's not worse or better, but its not really comparable is all I am really saying, I would not use them for the same things.
- switchbak 1y agoIn the early 2000’s I whipped up a tool to convert log statements into visual swim lanes like the Chrome profiler does. That thing was a godsend for reasoning about complex parallelism.
- EFreethought 1y agoWould you be willing to share this tool?
- switchbak 1y agoOh that's long lost to the trashbin of history. As I recall it was a combination of: - Log4j + MDC's so we could get a timestamp and thread ID easily - some python scripting I can't remember if it was PDF or SVG, but I do remember having to choose something that would allow for huge graphs and lots of scrolling! These days there's better options on github, but nice to see I was on a decent path.