Thursday, April 27, 2017

Debugging IIS hosted ASP.NET application in visual studio

For large projects it might not be imperative to debug the asp.net application in visual studio. Desired piece of code can be debugged by attaching IIS process (w3wp.exe) to the visual studio. Follow below steps.
- Setup the website in IIS (Make sure, you can browse the website locally)
- Open the project in visual studio
- Click Debug->Attach to process
- In the Available Processes select w3wp.exe. (Make sure, 'Show processes from all users' is checked)
- Now place a break point.
- Open the application in browser and navigate to the corresponding page, that should hit the break    point.


No comments:

Post a Comment