I tried to create a simple macro to ignore breakpoints when doing RunToCursor.
But for some reason the RunToCursor call doesn't work at all ("Operation not supported") and breakpoint states aren't properly reset either. Some are reactivated but not all. Any ideas?
Sub RunToLineAndIgnoreBreakpoints()
Dim bptStates(DTE.Debugger.Breakpoints.Count - 1) As Boolean
Dim i = 0
For Each bpt As Breakpoint In DTE.Debugger.Breakpoints
bptStates(i) = bpt.Enabled
i += 1
bpt.Enabled = False
Next
Try
DTE.Debugger.RunToCursor(True)
' Catch ex As Exception
Finally
i = 0
For Each bpt As Breakpoint In DTE.Debugger.Breakpoints
bpt.Enabled = bptStates(i)
i += 1
Next
End Try
End Sub