Debug SharePoint WebParts - VS 2005
With VS 2003 and SPS 2003/WSS2.0, it was totally different. There was just one w3wp process you need to attach the debugger to.
How to debug in VS 2005?
-
- Click on Debug, and then on Attach to Process...
- Look for w3wp.exe process. If you don't see one,check "Show processes from all users" and "Show Processes in all sessions".
- Select all w3wp.exe processess that run under the security account that sharepoint is running under. If you are not sure about the security account you may select all w3wp.exe processess listed in there.
- If you select only one and if it happens to be not the right process, you may see
this icon(which means, The breakpoint will not be currently hit. No symbols have been loaded for this document) instead of
at your breakpoint. You may want to check to see if there are additional w3wp.exe processes running or the check boxes mentioned in the step 2 are checked.
- If you select only one and if it happens to be not the right process, you may see
- Click on Attach
- Open the page that includes your WebPart.
- You will now notice that as the page renders the control switches to the VS Debugger.
Click here to know Which w3wp.exe process belongs to which App Pool in IIS6.0
Quick Access Keyboard shortcut Tip for attaching the processes to the debugger: ALT + D, then hit P, and then hit W.