且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何通过Visual Studio调试Sharepoint解决方案/功能?

更新时间:2022-10-21 08:08:22

WSPBuilder上下文菜单中有一个选项附加到IIS工作进程。只要应用程序被加载(通常意味着您在尝试附加SharePoint帐户之前已经访问过一个页面),并且SharePoint中部署的代码与Visual Studio中的代码相同,那么您应该可以设置断点并执行代码。


Recently I tried to install a webpart through wspbuilder utility to the Sharepoint Site. I have created, built and deployed a project to the 12 hive. After that installed the solution through Cental Administration Site and activated in the site collection.

I just wonder how can I debug the complex feature/solution ? Because both processes (build-deploy and activate) totally independent, how can I attach a process with the worker process ?

In the WSPBuilder context menu there is an option "Attach to IIS worker process". As long as the app is loaded (generally means that you have accessed a page in the SharePoint site before trying to attach) and the code deployed in SharePoint is the same as the code you have in Visual Studio, you should be able to set breakpoints and step through the code.