Mikey
September 13, 2019
The optimist inside us all hopes that we will never need to debug in production as the released code is perfect. This is unfortunately not the case, even with 100% code coverage and strenuous manual testing there will be corner cases that are missed and found by customers.
When a corner case occurs in production, reproducing the issue locally is often a complex process that can take days or weeks. It may not even be possible at all!
Having a way to debug in production is an invaluable tool, as it eliminates the need to reproduce issues locally. Instead, you can find and fix the issue on the running system.
Debugging in production is completely safe if performed using one of the following debugging methods;
When debugging in production, it is important to avoid any blocking debuggers such as remote debuggers running in an IDE as they prevent stop users from interacting with your application.
By far the most common method of debugging is using logging. Hunting through log files to see exactly what occurred at the time of the error, then adding additional log statements to the application to find an issue where necessary.
There can be no doubt that this method works, however, this approach is not perfect. In order to debug through logging, you require access to log files which can be tricky in large production environments. Typically if you are required to add additional logging you must also restart or redeploy your application.
There is a better way to debug in production, using a non-breaking debugger in production gives you all the benefits of logging, without the drawbacks that can make logging difficult to configure and utilize.
A perfect debugging tool for production environments should:
Using a non-breaking debugger such as nerd.vision satisfies all these points. You can set up and debug an issue with nerd.vision in 4 simple steps:
Technical Support Engineer and Developer advocate for nerd.vision and other software projects. Background in object-oriented software development and data analysis. Personal hobbies include simulation gaming and watch collecting.