!154 Fix stepper over unexpected behavior

Merge pull request !154 from Gymee/bugfix
This commit is contained in:
openharmony_ci 2023-02-08 13:54:33 +00:00 committed by Gitee
commit 9e1eb42e48
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1159,7 +1159,8 @@ void DebuggerImpl::UpdateScopeObject(const FrameHandler *frameHandler,
void DebuggerImpl::ClearSingleStepper()
{
if (singleStepper_ != nullptr) {
// ClearSingleStepper is originally called from Function::Call, if current depth is 0, then it is safe to reset
if (singleStepper_ != nullptr && DebuggerApi::GetStackDepth(vm_) == 0) {
singleStepper_.reset();
}
}