ASP.Net makes it very easy to write and debug server side code. I've found when talking to ASP.Net developers that many of them don't know that you can debug clent side script with VS.NET too.
This week I was working on a client web site and needed to to write some client-side JavaScript. This reminded me to post a quick how-to on client side debugging.
Steps
- Enable client-side script debugging in Internet Explorer
- Open Microsoft Internet Explorer.
- On the Tools menu, click Internet Options.
- On the Advanced tab, locate the Browsing section, and uncheck the Disable script debugging check box, and then click OK.
- Close Internet Explorer.
- In your JavasSript function add the keyword debugger . This causes VS.NET to switch to debug mode when it runs that line.
- Run your ASP.Net application in debug mode.
That's all there is to it.