How to implement debug option in SharePoint 2007 (MOSS/WSS) Application within VS 2005 with complete call stack instead of custom error page

Here are the steps to implement debug option in your SharePoint Application:

 

1. Browse to the set of virtual directories for Windows SharePoint Services. Just remember, you cannot access the web.config file via your web browser as security restrictions set by IIS.

 

For example, c:\Inetpub\wwwroot\wss\VirtualDirectories.

 

For each virtual directory

Open the web.config file contained in the virtual directory.

Change the line <compilation batch=”false” debug=”false“> to <compilation batch=”false” debug=”true“>.

 

2. To obtain the complete call stack instead of the default error page, you can alter the web.config file: set the CallStack value to true in the SharePoint section:

<SafeMode MaxControls="200" CallStack="true"/>

 

3. Additionally make sure the CustomeErrors mode value (in the system.web section) is set to Off:

<customErrors mode=”Off”>

 

4. Open a command prompt and type iisreset to restart the server.

 

Found the idea from following 2 articles:

 

How to Enable ASP.NET Debugging Web Parts and SharePoint Solutions

https://www.sharepointblogs.com/MainFeed.aspx

Comments

  • Anonymous
    July 12, 2007
    PingBack from http://stevepietrekweblog.wordpress.com/2007/07/12/links-7122007/

  • Anonymous
    July 19, 2007
    Good idea man. One thing you have to adjust is 4. You don't need to restart IIS as every change in web.config will recycle your app pool.

  • Anonymous
    August 28, 2007
    Awesome thanks alot exactly what i was looking for!

  • Anonymous
    August 29, 2007
    WoW Thanks it'll be useful for me

  • Anonymous
    October 31, 2011
    Good Article