Academic Resource Center

Debugging Best Practices

Updated on

Advice

  • Reproduce the problem. This allows you to go through each step to try and recreate the problem
  • Use in-line comments. This will allow you and others to understand what was coded in non-technical terms
  • Check the line the error shows and check the lines above it to ensure that proper syntax is there. Sometimes it can be as small as a semi-colon missing
  • As you code, save your work often. This ensures that no bits of code that was previously put in is gone

Helpful articles for various languages

Debugging Best Practices

Topic Description Link (if applicable)
Advice; Reproducing the problem Reproduce the problem. This allows you to go through each step to try and recreate the problem. N/A
Advice; Comments Use in-line comments. This will allow you and others to understand what was coded in non-technical terms. N/A
Advice; Lines Check the line the error shows and check the lines above it to ensure that proper syntax is there. Sometimes it can be as small as a semi-colon missing. N/A
Advice; Saving As you code, save your work often. This ensures that no bits of code that was previously put in is gone. N/A
Debugging for C# This article gives examples and best practices for debugging within C#. https://blog.airbrake.io/blog/debugging/debug-best-practices
Debugging in C++ This article gives examples and best practices for debugging within C++. https://visualstudiomagazine.com/articles/2016/10/20/cpp-combine-debugging-strategies.aspx
Debugging in JavaScript This article gives examples and best practices for debugging within JavaScript. https://www.digitalocean.com/community/tutorials/js-debugging-js-best-practices
Debugging in HTML/CSS This article gives examples and best practices for debugging within HTML/CSS. https://blog.pragmatists.com/how-to-debug-front-end-elements-d97da4cbc3ea

Need More Help?

Click here to schedule a 1:1 with a tutor, coach, and or sign up for a workshop. *If this link does not bring you directly to our platform, please use our direct link to "Academic Support" from any Brightspace course at the top of the navigation bar. 

Previous Article Use your Programmer Mindset: Breaking Down a Coding Problem
Next Article Python, PyCharm, & Zybooks Guide
Still Need Help? Schedule a service in the Academic Support Center