Thoughts
Cognitive load reduction as a debugging aid
Some bugs live in projects too large to run under a debugger, where the logs are millions of lines long. The fix is not a smarter tool — it is reducing how much you have to hold in your head at once.
My advice in such cases is:
- Spend time and try to think of a possible error.
- Narrow the log down to the domain which, as you think, might be buggy. If possible, disable all other logging so it doesn’t consume priceless time.
- Simplify log: print inputs, outputs and actions done.
- Repeat until you find the error in function output.
This reduces cognitive load down to a minimum and allows you to finally read all the important actions.
This works best if the final execution takes under 1 second, or at most 10 seconds.