Debugging One Website In A Solution Of Four

I have a solution with four websites in it, when I debug a website I get four instances of the ASP.Net deployment server, can I just debug one website and not run the others?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

In visual studio, click on the root of each website. The project properties window will appear. There’s a property calle “Always Start When Debugging”. Simply turn the websites off that you don’t want to start the debugger for.

Method 2

I assume you are running the website through the web server that is part of visual studio (by clicking the run arrow in Visual Studio). I’m not sure if there is a way to get visual studio to just launch one of the websites, but you could instead do it manually through IIS. Basically instead of using the built in web server that comes with Visual Studio, you are going to use the instance of IIS that is installed on your machine.

Go into the IIS control panel and setup a virtual directory for only the website that you want to debug. Then go back to Visual Studio and use the Attach to Process option from the Debug menu. You will want to attach to the IIS process, so that will either be called aspnet_wp.exe or w3wp.exe depending on what version of IIS you have installed. Once you have attached to the process for debugging you can just open a web browser and use the address for the virtual directory that you setup and visual studio will stop at any breakpoints that you have set in the code.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x