DEV Community

Discussion on: The Secret Art of Debugging

zakwillis profile image

Hello. Very good article. Will read it again. Have my own bit of advice, I have found with coding on my own project.

Always run a program start to end. When I started my project, I picked up a lot of my old applications. it was natural/stupid to assume everything written just worked. There were subtle but major bugs with a couple of apps. Only once I stepped through the app code, these bugs finally appeared.

The second to is make sure you have lots of logging. Read the log files to make sure they make sense, there are no errors, code processes in the right order etc. Indeed, I probably put logging higher than debugging because often testers, analysts and support staff will all read log files.

Three. If you can, write data tests/integration tests on what the expected state should be. These tests can be shared with testers and analysts, run as part of the build process. NBI is a great tool for this.