Sort:  

Nowadays? I just throw the errors into AI and see what it says.

But if you want actual techniques, it'll be to log everything in the console so you can trace what happens when you face a problem.

Disclaimer: I'm not really a professional, I just know enough coding to do simple stuff.

Yeah AI's a game-changer for quick fixes, but logging's still my go-to for spotting where things go wrong. Can't beat seeing the flow yourself.