Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Debugging jQuery

 
Roel De Nijs
Sheriff
Posts: 10603
143
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Everybody who developed JS knows that debugging isn't easy. Thanks to Firebug life of a web developer has become a lot easier But you don't always have Firebug to the rescue (if you have to develop an inhouse application for Internet Explorer only for example). Does jQuery provide some debugging utilities/tools (something similar to log4j, like the console used by dojo toolkit), or are you stuck with the window alert?

And when I see jQuery snippets, they often (always) use chaining, for example:


Can this be easily debugged through Firebug and/or with the jQuery debugging utilities/tools? Or do you have to break it down in single lines to ease the debugging process?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Firebug itself provides logging support: http://getfirebug.com/logging
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use Firebug and Firebug Lite, and HttpFox.
 
Roel De Nijs
Sheriff
Posts: 10603
143
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As far as I know Firebug and HttpFox are add-ons for Firefox. Firebug Lite can be used with other major browsers like IE, but doesn't provide a js debugger.

So the question still stands (unless I'm wrong): does jQuery provide debugging utilities/tools when you have to develop js for IE only (because it's not publicly accessible and IE is the standard and only browsers used in the company).
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65229
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IE8 has a great debugger built into it. So many people have no clue that it is there.

IE8 runs as IE7

Eric
 
Saifuddin Merchant
Ranch Hand
Posts: 607
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There seem to be quite a few plugin's that integrate into firebug's console. I found a couple that (they say) work cross browser. Mostly something that emulate the console - http://sites.google.com/site/jollytoad/browsercompatibility and http://code.google.com/p/jquery-console/

But I guess between the IE7/8 debugger and Firebug you might not want to really look (much) at other tools!
 
Gian Franco
blacksmith
Ranch Hand
Posts: 979
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...have a look at the following How to Debug Your jQuery Code

The article explains in detail some debugging possibilities.

Gian
 
Roel De Nijs
Sheriff
Posts: 10603
143
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric Pascarello wrote:IE8 has a great debugger built into it. So many people have no clue that it is there.


Indeed I didn't know that I developed an in-house IE6 web application 5-6 years ago and I know debugging the JS with Microsoft Script Debugger was most of the time really frustrating. Glad to hear they have a decent one now

 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roel De Nijs wrote:
Eric Pascarello wrote:IE8 has a great debugger built into it. So many people have no clue that it is there.


Indeed I didn't know that I developed an in-house IE6 web application 5-6 years ago and I know debugging the JS with Microsoft Script Debugger was most of the time really frustrating. Glad to hear they have a decent one now



If you have Visual Studio or visual web developer express you could always hook up IE6/7 into it and walk the code too.

Eric
 
Himalay Majumdar
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IE Tester is another good tool. It allows you to test all IE versions in demand.

-Himalay
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic