When something breaks, the first instinct is often to change the code immediately.
But one habit helped me debug much faster:
I try to reproduce the bug in the smallest possible example.
Instead of looking at the whole project, I isolate the problem.
Sometimes this alone reveals the issue.
And even if it doesnโt, debugging becomes much easier when the problem is reduced to a few lines of code.
Simple trick, but surprisingly effective.
Do you have a debugging habit that helps you?
Top comments (0)