jasonfry.co.uk

Open Javascript Debugger In Code

I've been making websites since (I think) about 1998 and never knew about this Javascript syntax!

debugger

That's it. You just write debugger in your code and when the browser reaches that point of execution - boom, the debugger pops up and pauses execution.

Sometimes much easier than console.log when you're trying to work out what is actually available on a poorly documented error object.

MDN says this has been available since the first version of Firefox, released in September 2004. I wonder how much time I could have saved over the years.