简体   繁体   中英

Debugging an existing ASP.NET application in VS 2008 and IIS

I'm an asp.net newbie. I have inherited a base of asp.net mvc code and in order to help myself orient better in the heaping pile of source in front of me I'd like to step through it in a debugger. However, being the microsoft platform newbie I am, I don't know how to go about this.

Our application serves content under many different hostnames, which I have set up in my hosts file, so that I can access the app under uris like customername.mysite.loc. Because of this I think using the built-in web server in Visual Studio 2008 is not an option in my case and that I should attach my VS debugger directly to the IIS process under which the application happens to be running.

Unfortunately I haven't found a whole lot of information on Google on how to do this. Most of the tutorials found there either contradict each other or use various older versions of IIS (I'm running 7.0 under Windows Server 2008). Apparently the solution involves compiling my sources in debug mode (which I have done), setting the application in IIS into debug mode and attaching to the process somehow, but so far I've had no success with this simple outline.

Can anyone please point me to a working guide or describe a better way to debug my project? Is what I want to do even possible? Thanks a lot!

You'll want to make sure the remote debugging service is installed and running on the server. You'll then want to attach to your worker process (or all of them is simplest) using the method Andre Bullock states.

"How to run the remote debugger"

Debug -> Attach to process -> w3wp.exe

Make sure you fire up the site first so that w3wp is running, also you may have multiple instances running, get the right one (trial and error usually)

:D

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM