Debugging Javascript with Visual Studio 2005#
Ok, now some of you may already know this, so don't laugh too hard that I have been writing Ajax - style apps for almost a year and have just been using fiddler to do most of my debugging. If you have not heard of fiddler you can get that here.

Anyway, I stumbled across a very easy way to debug javascript with Visual Studio 2005. I assume this also works for older versions. All that you need to do is put debugger; on the line where you want to set a breakpoint and then open the page in IE and it will ask you if what debugger you want to use. Note: You need to make sure you are allowing javascript to be debugged in IE by checking the appropiate checkbox in intenet options > advanced.

Once the debugger is open you can step though the code like you normally would in a c# app and watch the variables. If you are making ajax calls and returning xml or javascript you can also see that data come back. If you are using JSON you can actually continue stepping through that code that was returned from you server in runtime. Pretty cool stuff! It has just made my life so much easier and I am suprised I have not heard of this before. I guess I had my head in the sand for a little bit. I hope this helps someone who has been looking for how to do this.
 |  | 
Friday, April 14, 2006 8:00:00 AM UTC #    Comments [0]  |  Trackback

 

Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, i, strong, u)  

Enter the code shown (prevents robots):

 

All content © 2009, Jim Zimmerman
Book
New Book
Links to me
On this page
Sponsors
Calendar
<April 2006>
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
Archives
Tags
Blogroll OPML
Technorati
Favorite Links
Disclaimer

Powered by: newtelligence dasBlog 1.9.6264.0

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Send mail to the author(s) E-mail