bool OnStepOutCompleted(StepCompleteEventArgs e, object tag) { engine.VerifyMonoDebugThread(); if (stepData == null || stepData.MonoStepper != e.StepEventRequest || stepData.Tag != tag) { return(false); } stepData = null; RaiseStepComplete(thread, tag, GetErrorMessage(e), e.ForciblyCanceled); return(true); }
bool OnStepIntoOverCompleted(StepCompleteEventArgs e, object tag, StepIntoOverData stepIntoOverData) { engine.VerifyMonoDebugThread(); if (stepData == null || stepData.MonoStepper != e.StepEventRequest || stepData.Tag != tag) { return(false); } stepData = null; var frame = GetFrame(); uint offset = (uint)(frame?.ILOffset ?? -1); if (!e.ForciblyCanceled && stepIntoOverData.StepCounter < MAX_STEPS && frame?.Method == stepIntoOverData.Method && IsInCodeRange(stepIntoOverData.StatementRanges, offset)) { StartStepIntoOver(tag, stepIntoOverData); return(false); } else { RaiseStepComplete(thread, tag, GetErrorMessage(e), e.ForciblyCanceled); return(true); } }
static string GetErrorMessage(StepCompleteEventArgs e) => e.ForciblyCanceled ? "Only one stepper can be active at a time" : null;