Finding Problems in Your JavaScript Code
- Chrome's Developers Tool (Console) (More tools → Developer tools → Console)
- JS Closure Compiler (JS Closure Compiler)
- JS Hint (http://www.jshint.com/)
- Chrome Debugger - https://developer.chrome.com/docs/devtools/javascript/
- Firefox Debugger
- Open script you want to debug with Firefox
- You will find the debugger at Tools → Web Developer → Debugger
- To set a breakpoint click on the line number
(right-click on a line number for additional options)
- Reload page to run script
- Typical stop, set over and step into option can be found on
stop of “Sources” and “Call Stack” tabs
- Call Stack – allows you to change stack frame
- Add error handler as described in
Debugging With Error Handler