Awesome Visual Studio Macros [closed]

I add buttons on the toolbar for the following 3 macros. Each will take the currently selected text in any file and google it (or MSDN-it, or spell-check-it). Make up a nifty icon for the toolbar for extra style-points. Private Const BROWSER_PATH As String = “C:\Program Files\Mozilla Firefox\firefox.exe” Sub SearchGoogle() Dim cmd As String cmd … Read more

Toggle “Break when an exception is thrown.” using macro or keyboard shortcut

Very similar to the other answer, but there is a special ExceptionSetting for the group. Dim dbg As EnvDTE90.Debugger3 = DTE.Debugger Dim exSettings As EnvDTE90.ExceptionSettings = dbg.ExceptionGroups.Item(“Common Language Runtime Exceptions”) Dim exSetting As EnvDTE90.ExceptionSetting Try exSetting = exSettings.Item(“Common Language Runtime Exceptions”) Catch ex As COMException If ex.ErrorCode = -2147352565 Then exSetting = exSettings.NewException(“Common Language Runtime … Read more

Alternative to macros in Visual Studio 2012

The simplest alternative to macros is creating add-ins. I know, I know, I wasn’t excited about it either, but it’s actually surprisingly easy. There are three simple parts to it: Create the macro project, stepping through a wizard UI. Write your code. Copy the macro’s .addin and .dll files to your Visual Studio Addins directory. … Read more