Code Simplified – Viral Sarvaiya

Code Simplified – Viral Sarvaiya, Web Developer Friends, dot net Developer, Sql Server Developer

Debugging JavaScript Codes in VisualStudio.Net

Posted by Viral Sarvaiya on October 20, 2009

Follow these steps to enable script debugging in VS.NET

Tools->Internet Options…->Advanced->Disable Script Debugging [Un-check]




When you’ve enabled Script Debugging, then in the IE go to,  View->Script Debugger->Open


Once you clicked Open, the page reloads and activates the script debugger, you can set break-point and do F10 & F11.

Alternately, you can put a line like this in the java-script code where you need to break



<div id="highlighter_826276">
<div><span style="margin-left: 0!important;"><code>function</code> <code>Debug()</code></span></div>
<div><span style="margin-left: 0!important;"><code>{ </code></span></div>
<div><code> </code><span style="margin-left: 28px!important;"><code>debugger;</code></span></div>
<div><code> </code><span style="margin-left: 28px!important;"><code>alert(</code><code>'Break at above statement'</code><code>); </code></span></div>
<div><span style="margin-left: 0!important;"><code>}</code></span></div>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: