Hi there! Some of you may have become very familiar with me in the past couple of days. (I've asked a TON of questions) Anyways, I was wondering what is the best way to debug jQuery? I don't really like having to bug you guys for the answers all the time so I was wondering if there is some tool, or method that you guys use to debug? Thanks a ton!!
+1 for firebug :)
Madi D.
2009-12-23 21:35:11
+15
A:
Firebug, Internet Explorer Developer Toolbar, Chrome Developer Tools. All are good ways for the respective browsers.
Some IDEs will let you debug inline.
just remember the javascript statement: debugger;
Quintin Robinson
2009-12-23 21:33:18
+1
A:
Use the console in either Firefox with Firebug, or the built in one with Chrome/Safari.
Use a wrapper for the console, so it doesn't break in Internet explorer 6 and 7 tests.
Here's a good wrapper written by Ben Alman http://benalman.com/projects/javascript-debug-console-log/ to do just about everything you need safely.
Alex Sexton
2009-12-23 21:33:50
A:
The most common way will probably be to use the FireFox plugin called Firebug. Which has an excellent javascript debugger.
Hope this helps some.
Chris
2009-12-23 21:34:09
A:
console.log('blarg');
Then look at the console in Firebug, Firefox, Safari, etc.
carillonator
2009-12-23 21:40:14
+4
A:
jQuery.debug.js can:
- Write echo statements to Firebug's console.
- Debug selectors, and figure out what they're returning. [This is most helpful, IMO]
Jim G.
2009-12-23 21:41:19