Debugging Technique: Logging
Arguably the most effective method of debugging is logging. Writing some text somewhere when something happens.
You can determine whether some code was executed, plus as much context as you’d like: when it triggered, any state variables, code line number, stack traces, and so on.
You can log too little, and you can definitely log too much.
You can monitor logging rates, search and filter logs, set up monitors looking for particular log message patterns. You can even synchronize logs from client and server systems to get a coherent log timeline (see Correlation Vector).
Remember to remove any logging of secrets before committing…
A lot more discussion and advice on logging to come!