One of the annoying things with VS 2005 is that you have to
first run your ASP.NET pages before you can set JavaScript breakpoints in them
in the debugger.
VS 2008 makes this much better by adding new support that allows you to set client-side JavaScript breakpoints directly within your
server-side .aspx and .master source files:
Figure 1
When you set a breakpoint in your .aspx page
like above, VS 2008 will automatically map the breakpoint location to the
dynamically generated client HTML that runs in the browser when the page is
later executed:
Figure 2
If you add/remove/update the breakpoint locations in the
running HTML document, VS 2008 is also now smart enough to perform the reverse
mapping and update the breakpoint in the original .aspx or .master source file
on the server. This makes it much easier to get into a nice
edit/debug/edit/debug flow as you are iterating on your applications.
Best of all, you can now set both client-side
JavaScript breakpoints and VB/C# server-side breakpoints at the same time (even
in the same page) and use a single debugger to step through both the
server-side and client-side code in a single debug session (which is extremely
useful for any AJAX heavy application).
Any JavaScript breakpoints you set will also now by default
be saved by VS 2008 when you close the project/solution. When you open up
the project again, the previous locations you set the breakpoints on will still
have them enabled.