DEV Community

Discussion on: How do you help yourself fix bugs?

quii profile image
Chris James

Bugs are quite a broad range of things. For my example I'm going to describe how i tackle some kind of behaviour failure than a user has described.

  • Figure out exactly how to reproduce it. Often this is enough to understand the problem.
  • Write a failing test that exercises the above. This lets you retry fixes very easily rather than manually going through the process. Plus it means the bug can never happen again once it's fixed.
  • Fix it by making the test pass
  • Reflect on what was missing in your monitoring and tests for this to happen. Can you take steps to avoid it?
rapidnerd profile image
George Marr Author

Excellent steps