

JavaScript debugging tips - berzniz
http://berzniz.com/post/78260747646/5-javascript-debugging-tips-youll-start-using-today

======
jbeja
IMHO, the title should be "5 JavaScript debugging tips you’ll start using
today in Chrome".

~~~
berzniz
Maybe the first tip should have been "use Chrome".

I've used Firebug and Firefox tools, but they don't add much. Firefox has a
nice 3D feature that only helps "WOW" your friends.

Chrome is the only real tool today for developing and debugging web-apps.

~~~
woogley
I think this depends on what version of FF you are using. The devtools in
Nightly at least have really come a long way. Two very handy features I use
that Chrome doesn't have is blackboxing[0] and Shader debugging[1]

[0]: [https://developer.mozilla.org/en-
US/docs/Tools/Debugger#Blac...](https://developer.mozilla.org/en-
US/docs/Tools/Debugger#Black_boxing)

[1]: [https://hacks.mozilla.org/2013/11/live-editing-webgl-
shaders...](https://hacks.mozilla.org/2013/11/live-editing-webgl-shaders-with-
firefox-developer-tools/)

------
maxmcd
Worth noting that the chrome emulator now properly renders the correct pixel
ratio making it significantly more useful.

------
gargarplex
I had to update Chrome to get the Emulate feature. Awesome feature!

~~~
bilalq
Agreed. I had no idea about the emulate feature until just now. This is life
changing (at least as far as my work-life is concerned).

------
taeric
Emacs and skewer-mode. Demo here:
[http://www.youtube.com/watch?v=4tyTgyzUJqM&feature=youtu.be](http://www.youtube.com/watch?v=4tyTgyzUJqM&feature=youtu.be)

------
lukasm
Didn't know about Audit. Very useful. Thanks.

------
nevi-me
I'm in the Chrome camp, but for the times that I've used Opera's Dragonfly
thingy, I've gotten value from it. The only thing that used to suck about it
was requiring an Internet connection. A few years ago when I was in varsity
Internet was a luxury outside campus.

------
taspeotis
debugger is a nice keyword, although I've noticed it slipping into committed
code (at work) more and more frequently. Our code review process catches it
most of the time, but it's noise in the source control system (another commit
to remove it).

Doesn't make it any less valuable, and a stray debugger; statement doesn't
cause any problems out in production.

The last three were new to me. Emulating mobile layouts will save a heap of
time, currently I use Electric Plum's simulators (which are good, but another
tool to set up).

~~~
zecho
JShint would catch that.

------
gedrap
Related, more good tips:
[https://plus.google.com/+MarkBennettCa/posts/N1qwzwuAZd1](https://plus.google.com/+MarkBennettCa/posts/N1qwzwuAZd1)

