Can you debug a webpart in a WSS page? Yes – not a problem.
Prerequisites:
- From WSPBuilder make your Webpart (WP). See here.
- Activate the feature containing the WP
- Add the WP to a site page
- Open the page in a browser
Debug:
- In VisualStudio (VS) set a breakpoint in your WP code
- RightClick (RC) project – Build (Shift+F6)
- RC project – WSP – Copy2Gac
- (RC project – WSP – Recycle) => w3wp.exe will be shutdown and a new one will be created when a request to a page is done.
- RC project – WSP – Attach – choose w3wp.exe (the one with sql…?) => The breakpoint will be unfilled and not yet be reachable
- Refresh the browser (F5) => this will load debug info
- VS: Stop debugging (shift+F5)
- RC project – WSP – Attach – choose w3wp.exe
- Refresh the browser (F5) => now your breakpoint will be filled and reached
Thanx to Erik Norström.
[...] For debugging a WebPart see here. [...]
Pingback by WSS: Development - Quick Start with WSPBuilder « RaSor’s Blog — October 24, 2008 @ 9:01 pm