Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can do this fairly easily with a Visual Studio macro. Within Visual Studio, hit Alt-F11 to open the Macro IDE and add a new module by right-clicking on MyMacros and selecting Add|Add Module...</p> <p>Paste the following in the source editor:</p> <pre><code>Imports System Imports System.IO Imports System.Text.RegularExpressions Imports EnvDTE Imports EnvDTE80 Imports EnvDTE90 Imports System.Diagnostics Public Module CustomMacros Sub BreakpointFindResults() Dim findResultsWindow As Window = DTE.Windows.Item(Constants.vsWindowKindFindResults1) Dim selection As TextSelection selection = findResultsWindow.Selection selection.SelectAll() Dim findResultsReader As New StringReader(selection.Text) Dim findResult As String = findResultsReader.ReadLine() Dim findResultRegex As New Regex("(?&lt;Path&gt;.*?)\((?&lt;LineNumber&gt;\d+)\):") While Not findResult Is Nothing Dim findResultMatch As Match = findResultRegex.Match(findResult) If findResultMatch.Success Then Dim path As String = findResultMatch.Groups.Item("Path").Value Dim lineNumber As Integer = Integer.Parse(findResultMatch.Groups.Item("LineNumber").Value) Try DTE.Debugger.Breakpoints.Add("", path, lineNumber) Catch ex As Exception ' breakpoints can't be added everywhere End Try End If findResult = findResultsReader.ReadLine() End While End Sub End Module </code></pre> <p>This example uses the results in the "Find Results 1" window; you might want to create an individual shortcut for each result window.</p> <p>You can create a keyboard shortcut by going to Tools|Options... and selecting <strong>Keyboard</strong> under the <strong>Environment</strong> section in the navigation on the left. Select your macro and assign any shortcut you like. </p> <p>You can also add your macro to a menu or toolbar by going to Tools|Customize... and selecting the <strong>Macros</strong> section in the navigation on the left. Once you locate your macro in the list, you can drag it to any menu or toolbar, where it its text or icon can be customized to whatever you want.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload