SharePoint Enabling Debugging Web Config

When you first debug a SharePoint solution in Visual Studio, a dialog box alerts you that the web.config file is not configured to enable debugging. (The web.config file is created when you install SharePoint server. For more information, see Working with Web.config Files.) The dialog box gives you the option of either running the project without debugging or modifying the web.config file to enable debugging. If you choose the first option, the project runs normally. If you choose the second option, the web.config file is configured to:

  • Turn on the call stack (CallStack="true")

  • Disable custom errors in Visual Studio (<customErrors mode="Off" />)

  • Enable compilation debugging (<compilation debug="true">)

The resulting web.config file follows:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <configuration> ... <SharePoint> <SafeMode MaxControls="200" CallStack="true" DirectFileDependencies="10" TotalFileDependencies="50" AllowPageLevelTrace="false"> ... </SafeMode> ... </SharePoint> <system.web> ... <customErrors mode="Off" /> ... <compilation debug="true"> ... </compilation> ... </system.web> ... </configuration>

Permalink | Comments (0) | Post RSSRSS comment feed