Feeds:
Posts
Comments

Archive for the ‘SharePoint’ Category

I recently had a task to write a custom SharePoint web part.

I was able to find couple of very good articles that detail the steps needed for this task.

couple of steps were missed from the articles that I found, specially around how to debug the custom web part within Visual studio.

here are the steps I had to do in order to be able to write and debug the custom web part: (mainly focusing on the debug portion)

  1.   Install “Visual Studio 2008 extensions for Windows SharePoint” from here.
  2. Create a blank SharePoint site using SharePoint Central Administration page.
  3. Create a new web part project in Visual studio (once you complete step #1 above, this project type will appear in the list of available projects).
  4. In the project properties –> Debug –> set the “start browser with URL” to the newly created site in step #2 above. (see image below)
  5. Read this article and this one to learn more about how to write the code for the custom web part.
  6. when you have some code ready to be debugged, all is left is to attach the visual studio process to the “w3wp” process from “tools –> Attach to Process…” and refresh the web part page.
  7. if you need to do remote debugging read this article.

the key steps from the list above that will enable debugging of the custom web part are #2 and #4.

Good Luck

Uri

Read Full Post »

Follow

Get every new post delivered to your Inbox.