Hacker News new | ask | show | jobs
by sagarm 589 days ago
I default to printf debugging myself, but it can be an indicator that someone doesn't know their tools.
1 comments

Breakpoints are likely to screw up a lot of concurrent user requests, so in prod we debug microservices by comparing pushed logs.
The typical bell curve meme: https://imgflip.com/i/9a9gm7

The fun begins when you can't debug by printf because the buffer is shared by multiple processes that change it while the printf command is running.

Yeah, network logging has latency but it does pack the messages into structs and demux them. The remaining debugger problems are:

- Do you know which service tier has the issue?

- Can you halt one thread that sees the issue, not all of them on an instance?

- When the request times out, do you have to start over and make another prod user sad?