Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keyboard shortcut to attach to w3wp.exe in VS11

Since VS11 removed macros, I can no longer fire this macro to attach to the webserver using a keyboard shortcut.

Is there another way to start the debugger and attach to a specific process with a keyboard shortcut in VisualStudio 2012?

like image 510
JeremyWeir Avatar asked Jun 22 '12 23:06

JeremyWeir


2 Answers

Install AttachTo extension, and bind the shortcut key to Tools.AttachToIIS.

like image 144
mika Avatar answered Oct 26 '22 06:10

mika


The debugger in visual studio automatically attaches to the web server if you check that box in the project properties. A macro has never been necessary for that.

Check the "Use Local IIS Web server" box in Visual Studio, on the "Web" tab of your project properties. Then check the "ASP.NET" box at the bottom, under "Debuggers"

To debug, just hit F5.

EDIT

To get F5 to simply attach to w3wp.exe...

Make sure you have a web project set as the StartUp project enter image description here

On that web project's settings Web tab, just select "Use Local IIS Web server" and put in the url you use to go to your site (the url really only matters if you keep the Start Action on "Current Page"). I don't like having a browser get launched, because there's a good chance I'm actually on another site in the project. But what's great is once it attaches to w3wp.exe, it'll be debugging any site. enter image description here

like image 27
dodexahedron Avatar answered Oct 26 '22 07:10

dodexahedron