DEV Community

Discussion on: Debugging - you’re doing it wrong. 10 techniques to find a bug in your code

Collapse
 
hamatti profile image
Juha-Matti Santala

Great post, thanks Nikita!

Debuggers are amazing, my absolute favorite tools in my toolbox. The ability to jump into the code to examine variables, to jump back and forth in the execution and figure out where things go awry is just wonderful.

One thing I would add is making sure you can reproduce it and find the boundaries of the problem: under which circumstances does it happen. If you can't define the problem, it's much harder to start fixing it.

I've been burnt so many times by jumping into trying to fix something without first fully understanding when and how it happens. That way, you can also manually test those use cases after you have attempted to fix it.

And yes, I'm in the rubber duck wagon myself too! I have two at work (a regular one for easier problems and a Sherlock Holmes duck for the times when things get though.

Collapse
 
nikpoltoratsky profile image
Nik Poltoratsky

Hey man! Thank you for sharing your thoughts about debugger. I agree with you