Debugging sharepoint Solutions

>> In web.config, set CallTrack=True
(normally the first question you’re asked when start debugging a solution)

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

>> Enable compilation debugging (<compilation debug=”true”>)


Debugging Feature Receiver – Important

***** when a feature is activated by Visual Studio, it runs in a different process than the
debugger. This means that some debugging functionality, such as breakpoints, will not work correctly.
Solution – Change the solution to “No Activation”, and then debug as usual, and then
manually activate the feature.

Enable Enahnced Debugging Info:

Change the “EnableDiagnostics” key value from “0” to “1.”

Setting this key value to 1 causes stack trace information to appear in the Output window
whenever project

How to Write to trace Log

Two way to write to log:

(1) using Object Model (Tracing Log API)

SPDiagnosticsBase is the class!!!
WriteTrace & WriteEvent()

(2) SPMonitoredScope




Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: