Click to Rate and Give Feedback

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.Net Framework 3.5

Other versions are also available for the following:
Visual Studio Debugger
Debugging ASP.NET and AJAX Applications

Debugging ASP.NET Web applications is similar to debugging a Windows Form or any other Windows application because both kinds of applications involve controls and events. However, there are also basic differences between the two kinds of applications:

  • Keeping track of state is more complex in a Web application.

  • In a Windows application, the code to be debugged is mostly in one location; in a Web application, the code can be on the client and on the server. While ASP.NET code is all on the server, there might also be JavaScript or Visual Basic code on the client.

Preparing to Debug ASP.NET

Describes the steps that are required to enable debugging of ASP.NET applications.

Debugging Web Applications and Services

Discusses how to debug a ASP.NET application, including AJAX-enabled script applications, and XML Web services.

Exception Handling (Debugging)

Explains why Just My Code must be enabled for debugging ASP.NET exceptions.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Tip: unit test as you go to reduce bugs      CSharpUniversity.com   |   Edit   |   Show History

You can use the Visual Studio Debugger to unit test your methods as you are coding. When you complete a block or section of code, place a break point at the beginning of the block, then run the ASP.NET web application in debug mode and try to generate events that exhaust the various code paths/conditions. This way you can quickly validate that your code is behaving as expected and reduce bugs in the long run. This is a more proactive way of using the debugger but works quite well and is super easy to do.

For practice and more information about the debugger go to: http://www.csharpuniversity.com/2008/11/23/using-the-visual-web-developer-debugger/

Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker