// Debug events
int GetLastStoppedThreadId();
void WaitProcessExited();
-HRESULT DisableAllBreakpointsAndSteppers(ICorDebugProcess *pProcess);
static int ParseInt(const std::string &s, bool &ok)
{
return s;
}
+static HRESULT DisableAllSteppersInAppDomain(ICorDebugAppDomain *pAppDomain)
+{
+ HRESULT Status;
+ ToRelease<ICorDebugStepperEnum> steppers;
+ IfFailRet(pAppDomain->EnumerateSteppers(&steppers));
+
+ ICorDebugStepper *curStepper;
+ ULONG steppersFetched;
+ while (SUCCEEDED(steppers->Next(1, &curStepper, &steppersFetched)) && steppersFetched == 1)
+ {
+ ToRelease<ICorDebugStepper> pStepper(curStepper);
+ pStepper->Deactivate();
+ }
+
+ return S_OK;
+}
+
static HRESULT DisableAllBreakpointsAndSteppersInAppDomain(ICorDebugAppDomain *pAppDomain)
{
HRESULT Status;
// FIXME: Delete all or Release all?
DeleteAllBreakpoints();
- ToRelease<ICorDebugStepperEnum> steppers;
- if (SUCCEEDED(pAppDomain->EnumerateSteppers(&steppers)))
- {
- ICorDebugStepper *curStepper;
- ULONG steppersFetched;
- while (SUCCEEDED(steppers->Next(1, &curStepper, &steppersFetched)) && steppersFetched == 1)
- {
- ToRelease<ICorDebugStepper> pStepper(curStepper);
- pStepper->Deactivate();
- }
- }
+ DisableAllSteppersInAppDomain(pAppDomain);
return S_OK;
}
SetLastStoppedThread(pThread);
+ // If we do not ignore the breakpoint then remove any active steppers - we'll create a new one when needed
+ DisableAllSteppersInAppDomain(pAppDomain);
+
return S_OK;
}