3 ms·
You can do all of that with a debugger too, likely much faster. Print statements are handy when dealing with an ecosystem with bad debug tooling, disparate syst
by harshalizee 3y ago
You can do all of that with a debugger too, likely much faster. Print statements are handy when dealing with an ecosystem with bad debug tooling, disparate systems calling different microservices, etc.
Learning the debugger intimately within your stack is a hugely productive endeavor. Breakpoints are just debugging 101. Learning how to effectively break on conditions, expressions, breaking on multiple threads are vital to programming.
Certain kinds of race conditions are nearly impossible to reproduce deterministically with only print/sleep statements.
As an aside, I also encourage a first pass investigation purely with logging/telemetry to determine the issue. This will immediately reveal if your logging is insufficient or not. You can then get down to fixing the bug AND your telemetry so you can catch it without grokking through your code.