Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I attach the debugger to IIS instead of ASP.NET Development Server?

I have an ASP.NET website and when I press F5 it automatically attaches to the ASP.NET Development Server, how do I attach to IIS worker process instead when I press F5?

like image 952
makstaks Avatar asked Oct 16 '08 20:10

makstaks


People also ask

How do I debug my ASP.NET projects running under IIS?

To start debugging, select IIS Express (<Browser name>) or Local IIS (<Browser name>) in the toolbar, select Start Debugging from the Debug menu, or press F5. The debugger pauses at the breakpoints. If the debugger can't hit the breakpoints, see Troubleshoot debugging.

How do I connect to a debugger in Windows service?

In the Options dialog box, choose Debugging, Symbols, select the Microsoft Symbol Servers check box, and then choose the OK button. The Processes dialog box appears. Select the Show processes from all users check box. In the Available Processes section, choose the process for your service, and then choose Attach.


2 Answers

Debug->Attach To Process...

Select the aspnet_wp.exe process from the list.

If you're running IIS > version 5 the process will be w3wp.exe, and there will be one for every app pool (so if you don't know which app pool you're hitting, you'll need to attach to all of them).

like image 148
ckramer Avatar answered Sep 20 '22 17:09

ckramer


open project properties, go to the web tab and choose the option for IIS.

That actually starts an instance of the app in IIS and attaches the debugger. If you only wanted to attach to an existing IIS instance, choose attach to process from the debug menu.

like image 39
StingyJack Avatar answered Sep 18 '22 17:09

StingyJack