- Enable debug in project properties.
Right click project and click properties, click [Build] in left panel.
Select the method in Configuration which is the deploy method you just done.
Click to select both "Define DEBUG constant" and "Define TRACE constant".
Click right-bottom "Advanced.." button and change [Debug Info:] to "full".
Click [OK] and save all. - Set breakpoint in debug area of your program
- Run "iisapp" in command line to choose which SharePoint run time "w3wp.exe" you should pick up. You can pick it by your running sharepoint site name.
- Click menu [Debug] - [Attach to Process...], and click the picked "w3wp.exe" and click [Attach] button, go on click [Attach] button on pop up warning window.
- Back to the page which host your app (webpart) and refresh or redeploy.
You will see the debug yellow bar pausing on your code for now. You can now use same debugging method by F11/F10 of VS.
No comments:
Post a Comment