Click to open or copy the BrkPntMgr project files.
BrkPntMgr is a breakpoint manager. It will save and load breakpoints from files. You can add comments to make your breakpoints more understandable. This is useful in working on many bugs at one time, or over time.
BrkPntMgr was created with the ATL COM AppWizard. Support MFC was checked in the wizard and then an Add-in object was added to the project with the ATL Object Wizard. The code that was added is mostly in BrkPnts.cpp. There is code for loading, saving, and closing, and a function that will get a pointer to an IGenericDocument
interface for a given file.
To build the sample
To run the add-in
Visual C++ will load the add-in. When you close the Customize dialog box, BrkPntMgr’s toolbar will appear.
If you put a file name in the File: edit box (or browse for one), you can either load or save breakpoints. If the Save Only Enabled check box is enabled, you will not save any disabled breakpoints. When you save, you can add a comment, such as "This set of breakpoints are for finding a memory leak in the bipartite graph program."
When you load a file, all files with breakpoints set will be opened and then all the breakpoints will be set.
Click Clear to clear all of the breakpoints.
If you click To Output Wnd, the breakpoints will be printed to the output window, which is under the Macro tab. You might want to clear the window first using the context menu (right-click in the output window). This is useful as you can then navigate to your breakpoints easily, much as you do for errors in compilation.
One caveat: if you edit code heavily, the breakpoint may not be on the correct line. In this case, remove the wrong breakpoints and reset them.
This sample demonstrates the following keywords:
IApplication, CComPtr, CComQIPtr, ITextDocument::get_FullName; CStringArray::Add; CStringArray::GetAt; CComBSTR; CComVariant; IDocuments::get__NewEnum; IEnumVARIANT::Next; CComVariant; ITextSelection::GoToLine; IDebugger::AddBreakpointAtLine; IApplication::put_Active; IDebugger::RemoveBreakpointAtLine; IDebugger::get_Count; IDebugger::get_Breakpoints IBreakPoint::get_Enabled; IBreakPoint::get_File; IBreakPoint::get_Type; IBreakPoint::get_Function; IBreakPoint::get_Executable IBreakPoint::get_Location; IBreakPoints::Item; IApplication::PrintToOutputWindow; debugger; breakpoint; addin; customize; CregKey; IapplicationEvents; IdebuggerEvents; Carchive; ITextSelection, CStringArray; IBreakpoint; IGenericDocument; ITextDocument