Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I detect a breakpoint being deleted in Visual Studio?

There doesn't seem to be any event in EnvDTE's DebuggerEvents that notifies the consumer when a breakpoint is deleted. I've also looked at Visual Studio SDK and registered an IDebugEventCallback2, but no callback seems to be triggered when I deleted a breakpoint.

How can I get notified the moment the user deletes a breakpoint?

like image 218
Omer Raviv Avatar asked May 27 '13 11:05

Omer Raviv


1 Answers

Omer,

How frustrating. Can you try something like this?

#define BreakPoint12
#define BreakPoint13
//#define BreakPoint14
#define BreakPoint15

using system;
//...
//...

#if BreakPoint15

    // Team: Do not delete this breakpoint. Comment out definition.
    System.Diagnostics.Debugger.Break();

#endif

Then you can at least keep track of where they are at.

like image 176
Tyler Pantuso Avatar answered Sep 22 '22 17:09

Tyler Pantuso