有没有一个宏呢?使用哪个DTE对象?
(这不是你要求的,但差不多:)
您可以通过调出New Breakpoint对话框并输入以下内容,在Visual Studio 中的类的每个成员函数上放置一个断点:
CMyClass::*
见http://blogs.msdn.com/b/habibh/archive/2009/09/10/class-breakpoint-how-to-set-a-breakpoint-on-ac-class-in-the-visual-studio -debugger.aspx了解更多详情.
这是1800 INFORMATION的想法的快速实现:
Sub TemporaryMacro() DTE.ActiveDocument.Selection.StartOfDocument() Dim returnValue As vsIncrementalSearchResult While True DTE.ActiveDocument.ActiveWindow.Object.ActivePane.IncrementalSearch.StartForward() returnValue = DTE.ActiveDocument.ActiveWindow.Object.ActivePane.IncrementalSearch.AppendCharAndSearch(AscW("{")) DTE.ActiveDocument.ActiveWindow.Object.ActivePane.IncrementalSearch.Exit() If Not (returnValue = vsIncrementalSearchResult.vsIncrementalSearchResultFound) Then Return End If DTE.ExecuteCommand("Debug.ToggleBreakpoint") DTE.ExecuteCommand("Edit.GotoBrace") DTE.ActiveDocument.Selection.CharRight() End While End Sub