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...
https://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
Anonymous
March 28, 2006
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 debuggingAnonymous
March 28, 2006
adding a
<script type="text/javascript">
debugger;
</script>
to an aspx page can also be quite handy to jump in the debugger.
dominickAnonymous
March 29, 2006
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.Anonymous
March 29, 2006
The comment has been removedAnonymous
March 30, 2006
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.docAnonymous
March 31, 2006
I haven't posted anything this week due to being miserably sick since I returned from Mix06.&nbsp; However,...Anonymous
April 03, 2006
The comment has been removedAnonymous
May 11, 2006
The Ajax Experience conference kicked off yesterday in beautiful San Francisco... I am having a great...Anonymous
May 12, 2006
Thanks to the Ben Galbraith and Dion Almaer (and my fellow panelist) for having me on panel last night.&nbsp;...Anonymous
February 27, 2008
I am already having a great time at the Windows Server 2008, Visual Studio 2008 and Sql Server 2008 LaunchAnonymous
February 27, 2008
I am already having a great time at the Windows Server 2008, Visual Studio 2008 and Sql Server 2008 LaunchAnonymous
March 04, 2008
I am already having a great time at the Windows Server 2008, Visual Studio 2008 and Sql Server 2008 Launch