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?
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?
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
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.
In response to Cory's answer, you don't need to create your own shortcut. CTRL+ALT+P opens the attach to process dialog, then you can use his suggestion and type "w" to find the IIS process in the list.
This is also useful if you are remote debugging and therefore don't have a local process to attach to automatically.
If you are working with IIS on your local machine, then you can set it up as a local IIS web server or Custom Web Server in the "Web" tab of your project's properties.
Sad that macros were removed in VS 2012, but you can use hotkeys :)
Ctrl+Alt+P Press w (should find first one which in 99% is w3wp) Press Enter OK
In VS12 i just added my own shortcut because the default doesn't appear to be there.
CRTL+Shift+ALT+D
For web apps, I usually follow that with a w and enter. Enter is the big key by your right pinky.