Visual Studio Macro-Attach To Local IIS
As I stated previously, the capability of Visual Studio to use Macro is probably one of the less known feature and one of the coolest. Thanks to macro you can automate standard task you do in VS to speed-up your everyday coding experience. Since I work heavily with WCF services hosted in IIS and Web Application, quite often I need to attach the debugger to my local IIS instance.
This requires me to navigate to Debug->Attach to process, show the list of processes, find the w3wp.exe process, attach, confirm the dialog, bla bla bla. It wouldn’t be beautiful to attach to local IIS with the simple combination of keys? The solution is really simple, just select Tools->Macros->Record temporary macro, then attach to local IIS and stop macro recording. You will end up with a Macro that you can simply modify and add to some standard Macro module.
You can simply open macro editor (tools->Macros->Macros IDE), then create a new module (I’ve called StandardCustomMacro) and then paste the recorded macro to attach to IIS.
|
|
As you can verify, attaching to a process is really a simple task, now I can simply customize the keyboard binding using Tools->Customize.
Figure 1: Just filter for macros, identify your new macro and assign some key binding like CTRL+SHIFT+ALT+I
Now you can press the combination of buttons you setup in Figure 1 and you attach automatically to IIS.
Alk.