views:

55

answers:

2

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?

+5  A: 

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.

Darthg8r
Yea, works for Web Sites and Web Applications.
o.k.w
+1  A: 

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.

Mark Kanof