r/javascript • • Mar 18 '19

What's your favorite, most useful javascript one-liner?

385 Upvotes

422 comments sorted by

View all comments

95

u/tbicknell3 Mar 19 '19

debugger;

14

u/thisguyfightsyourmom Mar 19 '19

Even with all the cool tools in the chrome inspector, dropping a debugger in the source is so quick, easy, and effective

I’m always a little embarrassed when I start typing them while pairing though

2

u/Hanlonsrazorburns Mar 19 '19

I wrote a little piece using environment variables that turns debugger on locally as well as different levels of logging in my code. It's been very helpful.

2

u/snifty Mar 19 '19

Debugging is embarrassing?

→ More replies (5)