简体   繁体   中英

Debug a custom solution for Sharepoint 2010 in visual studio

I built the WSP file manually (using CAB utility) and uploaded them to the sharepoint 2010 server. I want to debug the dll that was packaged in that WSP file to test if the events are caught by the listener. I attached to w3wp.exe (all instances that appears). however I find that the symbols are not loaded for any break point to be hit and the thread is getting exited with some run time exception.

what Am I missing here ? Do I have to copy my PDB files at any particular location ?

thanks

you have the answer in your question. yes you have to upload your pdb file to GAC using command prompt and copy statement which would be available under C:\\WINDOWS\\assembly\\GAC_MSIL> in directory form open it and copy your pdb thier

or easier option is compile your wsp in debug format

You don't need to copy the PDB symbols file into the GAC if Visual Studio is configured correctly :-

Fortunately, it's just as easy to debug in the GAC as it is in BIN if you configure the development environment correctly.

Unfortunately, few know how to do this because the internet is polluted with pages full of bad information that is a held over from previous versions of .Net.

You can spot these easily because they will say you need to copy the debug symbols (.pdb file) to the GAC. In and of itself, that will not work. These days it is also completely unnecessary.

To configure VS ... to debug the assemblies properly , do the following:

您在问题中提到了Sandbox标记,因此必须附加到SPUCWorkerProcess.exe而不是w3wp.exe,沙箱代码在隔离的工作程序中运行。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM