Friday, June 1, 2007

Colloidal Silver Coeliac

Debugging ASP.NET applications

Visual Studio offers an advanced system monitoring and debugging of applications running. This is usually active when you are debugging and press the "F5" key on the keyboard rather than the "play" button in the top toolbar.

This technique, however, involves the completion of all projects in the solution or at least the analysis of all projects to identify which sources have changed and therefore require a recompile.

If the solution contains a large number of projects (even ten) the time from when you press F5 when you get to the page displayed may be significant and stressful.

One possible solution is to attach the debugger in Visual Studio IIS application - ASP.NET (but also Windows form) while it is running.

Why this is possible is necessary to perform the following steps:

- Open the IIS console and create the web site [mysite] ASP.NET (Version XX) that points to the directory where the sources are contained on the site (aspx + cs).

- Open Internet Explorer (or other browser) and type in the bar http://localhost/miosito/miapagina.aspx

- Now go in visual studio, debug menu - Attach to Process

- Make sure the checkbox (show process from all users) is selected

- A window with all processes currently running

- Select aspnet_wp.exe Press Attach button

At this point Visual Studio will be correctly fitted to the IIS process and stop running in debug set point.

0 comments:

Post a Comment