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…  


 


 

Comments (13)

  1. Keith Patrick says:

    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

  2. dominick says:

    adding a

    <script type="text/javascript">

    debugger;

    </script>

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

    dominick

  3. Stuart Dent says:

    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.

  4. for an interview that is… I was honored to sit down with Wally McClure (of Beginning Ajax with ASP.NET…

  5. I haven’t posted anything this week due to being miserably sick since I returned from Mix06.&amp;nbsp; However,…

  6. David Betz says:

    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.

  7. The Ajax Experience conference kicked off yesterday in beautiful San Francisco… I am having a great…

  8. Thanks to the Ben Galbraith and Dion Almaer (and my fellow panelist) for having me on panel last night.&amp;nbsp;…

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

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

  11. Programming says:

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