// For Syntax Highlighter
Welcome to MSDN Blogs Sign in | Join | Help

Mike Ormond's Blog

In my world, things would be simpler than this...

News

  • Add to Technorati Favorites

    These postings are provided "AS IS" with no warranties, and confer no rights. The use of any script / code samples is subject to the terms specified here.

More JavaScript Debugging in Visual Studio 2008

Well I confess that I perhaps underestimated just how good a feature the JavaScript debugging in Visual Studio 2008 is. I've been building a Vista Sidebar gadget over the last couple of days and was surprised (and impressed) with the support I got from VS.

image

I created an empty solution in VS and could easily add my gadget as a website. That gave me quick and easy access to all my source files (*.xml, *.html, *.js and *.css) which was a good start. But I nearly fell off my chair when I attached the VS debugger to my Sidebar gadget and found I had full JavaScript debugging support allowing me to set breakpoints, single step and inspect variables. That was a huge productivity gain saving me hours of wasted effort (and hair).

Then I saw this post from Kirk Allen (Debug JavaScript in JSP or PHP Pages with Visual Studio 2008) where he attaches to a random PHP page on the internet and proceeds to set a breakpoint in the JavaScript and hit it. This shouldn't really be a surprise - the debugger is attaching to client-side code after all whether it's an HTML page, ASP.NET or PHP etc - but I'd just never tried it. The big surprise is how easy it is to do this sort of thing in Visual Studio 2008.

For my gadget I also found Tim Heuer's Visual Studio gadget template a great starting point.

Technorati Tags: , , , ,
Posted: Wednesday, August 15, 2007 8:07 AM by MikeOrmond

Comments

Martin said:

Hey Mike, I wouldn't say your hair is wasted.  Sometimes it looks lovely ;-)

# August 16, 2007 9:04 AM
New Comments to this post are disabled
Page view tracker