Sometimes I get an exception in the browser and I get prompted to start
Visual Studio 2005 for debugging.
Sometimes I would like to start client side debugging on demand. How can I
do that?
Presumably, you mean debugging Javascript in IE...?
If so, the following is pretty much guaranteed to work:
1) Download and install the Microsoft Script Debugger
http://www.microsoft.com/downloads/...e0-94fd-4569-b3c4-dffdf19ccd99&DisplayLang=en
2) In IE, click Tools, Internet Options and select the Advanced tab and make
sure Disable Script Debugging (Internet Explorer) is NOT checked
3) In your client-side Javascript, insert the word debugger; where you want
your code to break. E.g.
<script>
function myFunction()
{
debugger; // code execution will break here
alert('Hello world');
}
4) Click F5 to start your app. When you navigate to the page in question,
you can debug your client-side Javascript just like you would debug your
server-side code i.e. with F10, F11 etc, interrogate locals, use the
Immediate window etc...