Amazon.com Widgets

JavaScript debugging in VS2005

At my Mix talk one of the things I got asked about was the development experience for writing Javascript.  While we are doing some great stuff in Orcas to make that better, it is actually surprisingly good with VS2005 and Atlas... if you just know where to look...

 

http://ajax.asp.net/docs/overview/ASPNETAJAXDebuggingAndTracingOverview.aspx

 

This doc covers how to setup IE and Firefox for a great development experience... shows you the right knobs to turn in VS to attach to an Atlas app running in the browser and debug it.  It also covers the know issues and workarounds for stuff that is less than ideal today.  And of course it talks about my favorite “printf-style debugging” technique debug.trace(). 

 

Enjoy!

 

Oh, and do let us know if you have other Javascript debugging tips we should add...

 

1-25-07: Updated URL...  

 

 

Published 28 March 06 07:54 by BradA
Filed under:

Comments

# Keith Patrick said on March 29, 2006 12:13 AM:
Does it do a "Remember my choice?" with the dialog that asks you what language you want to debug in?  That & IE just dialoging instead of asking to debug after a few debug sessions are the only major issues I run into debugging web apps clientside.  Any error results in an extra step of hitting "OK" when VS pops up a list of languages to check for debugging
# dominick said on March 29, 2006 12:56 AM:
adding a

<script type="text/javascript">
debugger;
</script>

to an aspx page can also be quite handy to jump in the debugger.

dominick
# Jason Haley said on March 29, 2006 6:13 AM:
# Stuart Dent said on March 29, 2006 7:55 PM:
Yet another way -- without having to modify any source code -- is to simply use the Script Explorer Window (aka Running Documents in previous versions of Visual Studio), it's available under the Debug -> Windows menu.  Then you just double-click the required aspx file from the list and set your breakpoints.

This window is also a nice way of seeing exactly which supporting files were pulled down by the browser during its last request.
# Brad Abrams said on March 29, 2006 11:44 PM:
for an interview that is... I was honored to sit down with Wally McClure (of Beginning Ajax with ASP.NET...
# anatolyl said on March 31, 2006 6:54 AM:
There was a great document for VS 2003 about debugging scripts:

http://www.gotdotnet.com/team/csharp/learn/whitepapers/How%20to%20debug%20script%20in%20Visual%20Studio%20.Net.doc
# Jeff Barnes - MCSD said on March 31, 2006 12:07 PM:
I haven't posted anything this week due to being miserably sick since I returned from Mix06.&amp;nbsp; However,...
# David Betz said on April 3, 2006 5:04 PM:
http://www.davidbetz.net/winfx/

See my videos on debugging JavaScript in a VS2005 environment using Firefox.  They are from Sept '05 using some tricks and tools that Firefox web developers take for granted.
# Brad Abrams said on May 11, 2006 11:00 AM:
The Ajax Experience conference kicked off yesterday in beautiful San Francisco... I am having a great...
# Brad Abrams said on May 12, 2006 10:34 AM:
Thanks to the Ben Galbraith and Dion Almaer (and my fellow panelist) for having me on panel last night.&amp;nbsp;...
# Brad Abrams said on February 27, 2008 8:25 PM:

I am already having a great time at the Windows Server 2008, Visual Studio 2008 and Sql Server 2008 Launch

# Noticias externas said on February 27, 2008 8:56 PM:

I am already having a great time at the Windows Server 2008, Visual Studio 2008 and Sql Server 2008 Launch

# Programming said on March 4, 2008 7:53 PM:

I am already having a great time at the Windows Server 2008, Visual Studio 2008 and Sql Server 2008 Launch

New Comments to this post are disabled

Search

Go

This Blog

Syndication

Page view tracker