From 59f5faac5f5b55a2482ba0081fb4595519c3060f Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Thu, 26 Sep 2019 08:27:51 -0700 Subject: [PATCH] Clearing breakpoints on detach --- IDEHelper/WinDebugger.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/IDEHelper/WinDebugger.cpp b/IDEHelper/WinDebugger.cpp index 2fc1477b..c54cadb6 100644 --- a/IDEHelper/WinDebugger.cpp +++ b/IDEHelper/WinDebugger.cpp @@ -1234,6 +1234,11 @@ void WinDebugger::StopDebugging() if ((mDbgProcessId != 0) && ((mDbgAttachFlags & BfDbgAttachFlag_ShutdownOnExit) == 0)) { + for (auto address : mTempBreakpoint) + RemoveBreakpoint(address); + for (auto breakpoint : mBreakpoints) + DetachBreakpoint(breakpoint); + BfLogDbg("StopDebugging\n"); ::DebugActiveProcessStop(mDbgProcessId); mRunState = RunState_Terminated;