6 ms·
Javascript's secret weapon[1] -- especially for beginning programmers -- is its dev tools. If you learn JS' debugging toolkit early on, it will accelerate your
by shawndrost 14y ago
Javascript's secret weapon[1] -- especially for beginning programmers -- is its dev tools. If you learn JS' debugging toolkit early on, it will accelerate your learning in general. I recommend Code School's "Discover DevTools" course [2] for beginning devs, but I'm not aware of a high-quality introduction for experienced devs.
Shameless plug: I teach at a school for JS devs named Hack Reactor. If rewriting Underscore as a learning tool sounds like fun, you should apply. http://hackreactor.com http://hackreactor.com
[1] until now.
[2] Chapters 3-4. http://discover-devtools.codeschool.com/chapters/3 http://discover-devtools.codeschool.com/chapters/3
- minikomi 14y agoIndeed. Learning that debugger; will stop the interpreter at any point you like, with console scoped at that point, has sped up my JS'ing greatly
- grinnick 14y agoWait you can what!?? Holy moly, I've been writing JS for like 3 years now and I never knew this.
- chunkbot 14y agoHoly shit! I've been programming in JavaScript for years and never heard about the debugger statement. This looks great for really understanding the details of JavaScript's object model.
- afandian 14y agoDoesn't a breakpoint do exactly the same thing?
- minikomi 14y agoYep! I find it easier to use the debugger statement though when changing code a lot. Also, some places like compiled templates are difficult to set the breakpoint so it's useful there too.
- jasonkostempski 14y agoAlso that little stop sign shaped pause button in Chrome will 'Pause on all exceptions' (blue) or 'Pause on all uncaught exceptions' (purple, I usually leave it on this).
- joelhooks 14y agoJust watch out, we get these committed semi-frequently. Whoops!
- zhodge 14y agoI've been reading up on all of the hacker schools (Dev Bootcamp, App Academy, etc.) and I was really excited to find out about Hack Reactor: I have very minimal programming experience, but have found JavaScript a pleasure to work with. I look forward to applying to Hack Reactor when it's financially feasible! :)
- aw3c2 14y agoWhat exactly do you mean with "dev tools"? Any specific browser?
- shaischechter 14y agoThe Developer Tools feature built into modern browsers (Chrome/Safari/FF/IE8+/probably others). Extremely useful when debugging JS. I know the Chrome one also allows remote debugging of your web site/app on Android. Chrome instructions - https://developers.google.com/chrome-developer-tools/docs/overview#access https://developers.google.com/chrome-developer-tools/docs/ov... ... others are easy enough to find Just whatever you do, remove the debugger (and console.log) statements before committing/deploying!!! I've seen this too many times and it's not nice when you end up throwing exceptions in older browsers that have no idea what these statements mean.