Monday, August 3, 2009

Debugging for ASP.NET Applications

If you are using Visual Studio2005 and if you want to enable debugging in the project properties Then Follow the Stpes
In VS 2005, use the <Project> Property Pages to set project properties :
here is the way to do
- Right click on Solution Explore of Project,Then Open the Property Pages by and selecting Property Pages.
- Select Start Option tab
- Under Debuggers, make sure the ASP.NET box is selected.

You can also enable the debugging using web.config file

- Inside the <compilation> tag, you will create the debug attribute.
- specify attribute as a "debug", not "Debug" or "DEBUG" because the are very Case-Sensitive so please take care of that.
- Set debug option as a true.

Here is a sample Web.config file


<configuration>
<system.web>
<compilation defaultLanguage="VB" debug="true" numRecompilesBeforeAppRestart="15">

<compilers>
<compiler language="C#;Csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,system, Version=1.0.5000.0, Culture=neutral,

PublicKeyToken=b77a5c561934e089" />
<compiler language="VB;VBScript" extension=".cls" type="Microsoft.VisualBasic.VBCodeProvider,system, Version=1.0.5000.0, Culture=neutral,

PublicKeyToken=b77a5c561934e089" />
</compilers>

<assemblies>
<add assembly="ADODB" />
<add assembly="*" />
</assemblies>

<namespaces>
<add namespace="System.Web.UI" />
<add namespace="System.Web" />
<add namespace="System.Web.UI.WebControls" />
<add namespace="System.Web.UI.HtmlControls" />
</namespaces>
</compilation>
</system.web>
</configuration>


Like that you can set the Debugging option using web.config file also and using GUI also.

No comments:

Post a Comment