Geeks With Blogs
HanSolo code monkey

In the project that I am working on, we have many forms that are loaded asynchronously via ajax. Some of these forms contain embedded javacript within the html. Sometimes it can be difficult to debug these scripts. One useful tip that I’ve learned is that you can add “debugger;” to the script where you want the browser to break. You are essentially setting a break point in the code itself by using the debugger statement. Whether you are using web inspector in chrome or firebug in firefox, this should tell the browser to break on that line of code.  This will allow you to step through the code which has helped me immensely in debugging issues in dynamically loaded javascript scripts.

http://msdn.microsoft.com/en-us/library/0bwt76sk(v=vs.94).aspx

Posted on Wednesday, April 25, 2012 8:38 AM | Back to top


Comments on this post: Handy javascript debugging tip

# re: Handy javascript debugging tip
Requesting Gravatar...
I am experience in HTML, CSS, PHP-MYSQL but not in JavaScript. This debugging tips will help me lot.
Left by Mcmbath bathroom remodeling on Apr 26, 2012 7:45 PM

Your comment:
 (will show your gravatar)


Copyright © HanSolo | Powered by: GeeksWithBlogs.net