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

1

14

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?

Audriaaudrie answered 27/5, 2013 at 11:18 Comment(1)
+1. I resorted to a timer polling DTE.Debugger.Breakpoints for changes :/Niemeyer
V
2

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.

Vestibule answered 23/10, 2015 at 18:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.