curiouswebster
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!
Is there a way around this?
Thanks!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
just place "debugger;" keyword in your own jQuery
ASKER
> just place "debugger;" keyword in your own jQuery
Where do I place "debugger"?
Where do I place "debugger"?
anywhere you want to stop the code to debug (see current value)
ASKER
I have no idea what you mean. I thought I could place a breakpoint, but it lighlighted the whole jquery function.
Confused...
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)
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.
Perhaps some screenshots might clarify what your issue is, and what you are trying to do. Or some of your code perhaps.
ASKER
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...
Inside that file, I tried to set the breakpoint inside a jquery function, but the whole function became red...
please post a screen copy
ASKER
Thanks!
ASKER