Debugging a WSS 3.0 web part using Visual Studio 2008

In some situations, it will be necessary to debug a web part. In order to make a WSS web part able to be debugged, the web.config of the WSS web site must be modified. The default location of the WSS 3.0 web site will be installed in the following folder:

Open the Web.config file and modify the existing options to look like the following:

 

<SafeMode MaxControls=”200″ CallStack=”true” DirectFileDependencies=”10″ TotalFileDependencies=”50″ AllowPageLevelTrace=”false”>

<PageParserPaths>

</PageParserPaths>

</SafeMode>

<customErrors mode=”Off” />

<compilation batch=”false” debug=”true”>

 

Once the web.config is modified, you can directly hit F5 in a Visual Studio environment. If a break point is provided for a line in a button click event, it should stop at the same location, similar to the following:

 

 

In this article, we have seen simple SharePoint web part development using Visual Studio 2008 and WSS 3.0. In my upcoming articles, we will see more and more examples of SharePoint development. I hope you enjoyed the article and any suggestions, bugs, errors, enhancements etc. are highly appreciated at http://jagchat.spaces.live.com

 

DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

 

About eagle081183

Passionate, Loyal
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s