diff --git a/src/OpenDebugAD7/AD7DebugSession.cs b/src/OpenDebugAD7/AD7DebugSession.cs index 5e0720b9f..425061684 100644 --- a/src/OpenDebugAD7/AD7DebugSession.cs +++ b/src/OpenDebugAD7/AD7DebugSession.cs @@ -811,7 +811,6 @@ private void StepInternal(int threadId, enum_STEPKIND stepKind, SteppingGranular } } - BeforeContinue(); ErrorBuilder builder = new ErrorBuilder(() => errorMessage); m_isStepping = true; @@ -837,6 +836,9 @@ private void StepInternal(int threadId, enum_STEPKIND stepKind, SteppingGranular m_isStopped = true; throw; } + // The program should now be stepping, so it is safe to discard the + // cached program state. + BeforeContinue(); } private enum ClientId