Debug jQuery code in a dialog
I am using Chrome latest version (8.0.552.215).
I have a web page with an hyperlink that, when clicked, open up a jquery dialog and makes an ajax call that return HTML
markup. the ajax call, upon success, add the returned markup to the dialog.
The returned markup contains also some jquery code to execute upon $(document).ready()
.
How can I debug that code inside the dialog?
EDIT:
I have added the debugger;
directive to my script as per the @Gaby answer
$(document).ready(function () {
$("#myTabs").tabs();
debugger;
var auth = "<% = Request.Cookies[FormsAuthentication.FormsCookieName]==null ? string.Empty : Request.Cookies[FormsAuthentication.FormsCookieName].Value %>";
But unfortunately when the debugger stops at the directive I开发者_Go百科 am not able to see the code that is executing
Set the debugger;
directive in your code to call the debugger at a specific point.
you need to have the developer tools open : Ctrl+Shift+j
(For future reference remember that this works with firebug for firefox as well.)
Have a look at http://www.nsbasic.com/app/technotes/TT10.htm#tracing
Update After comments and update to question.
I don't think you can show the code in the debugger as it is in memory..
A cumbersome alternative would be use console.log(..)
for the parts you want to debug.
精彩评论