Link to home
Start Free TrialLog in
Avatar of curiouswebster
curiouswebsterFlag for United States of America

asked on

how do I debug jQuery?

I know  how to stop at a breakpoint in JavaScript. but when i set a breakpoint in jQuery the whole function is a single breakpoint.

Is there a way around this?

Thanks!
SOLUTION
Avatar of crysallus
crysallus
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of leakim971
leakim971
Flag of Guadeloupe image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of curiouswebster

ASKER

What if it's only my jQuery I want to debug?
just place "debugger;" keyword in your own jQuery
> just place "debugger;" keyword in your own jQuery

Where do I place "debugger"?
anywhere you want to stop the code to debug (see current value)
I have no idea what you mean. I thought I could place a breakpoint, but it lighlighted the whole jquery function.

Confused...
you debug jQuery by opening the jQuery file not by debugging the code using the jQuery functions

if you need to debug :
$(".xxx").html()

you have nothing to do with YOUR script, you need to use a not minimified jQuery.js, search for the jquery.html function and place your breakpoints (or debugger keyword) in this file (jQuery-1.x.x.js)
What debugger are you using? Firebug (what I normally use)?

Perhaps some screenshots might clarify what your issue is, and what you are trying to do. Or some of your code perhaps.
That's how I open the file, from the top of Visual Studio 2010, which shows all the scripts rendered to the browser.

Inside that file, I tried to set the breakpoint inside a jquery function, but the whole function became red...
please post a screen copy
Thanks!