diff --git a/src/runtime/runtime-wasm.cc b/src/runtime/runtime-wasm.cc index 14faf7cbc7..f65922064f 100644 --- a/src/runtime/runtime-wasm.cc +++ b/src/runtime/runtime-wasm.cc @@ -621,6 +621,7 @@ RUNTIME_FUNCTION(Runtime_WasmDebugBreak) { auto* debug_info = frame->native_module()->GetDebugInfo(); if (debug_info->IsStepping(frame)) { debug_info->ClearStepping(); + isolate->debug()->ClearStepping(); isolate->debug()->OnDebugBreak(isolate->factory()->empty_fixed_array()); return undefined; } @@ -630,6 +631,8 @@ RUNTIME_FUNCTION(Runtime_WasmDebugBreak) { Handle breakpoints; if (WasmScript::CheckBreakPoints(isolate, script, position) .ToHandle(&breakpoints)) { + debug_info->ClearStepping(); + isolate->debug()->ClearStepping(); if (isolate->debug()->break_points_active()) { // We hit one or several breakpoints. Notify the debug listeners. isolate->debug()->OnDebugBreak(breakpoints); diff --git a/test/inspector/debugger/wasm-stepping-liftoff-expected.txt b/test/inspector/debugger/wasm-stepping-liftoff-expected.txt index 68523da261..49fe868986 100644 --- a/test/inspector/debugger/wasm-stepping-liftoff-expected.txt +++ b/test/inspector/debugger/wasm-stepping-liftoff-expected.txt @@ -52,9 +52,6 @@ Debugger.stepInto called Script wasm://wasm/42af3c82 byte offset 75: Wasm opcode 0xc Debugger.stepInto called Script wasm://wasm/42af3c82 byte offset 59: Wasm opcode 0x20 -Debugger.resume called -instance.exports.main(4)# - Debugger.resume called exports.main returned! Test stepping over a recursive call diff --git a/test/inspector/debugger/wasm-stepping-liftoff.js b/test/inspector/debugger/wasm-stepping-liftoff.js index b2cc3e024b..78c65e01f1 100644 --- a/test/inspector/debugger/wasm-stepping-liftoff.js +++ b/test/inspector/debugger/wasm-stepping-liftoff.js @@ -109,8 +109,6 @@ function instantiate(bytes) { for (let i = 0; i < 3; ++i) await waitForPauseAndStep('stepInto'); // Then just resume. await waitForPauseAndStep('resume'); - // TODO(clemensb/thibaudm): Figure out what this last break is (at ":0:24"). - await waitForPauseAndStep('resume'); InspectorTest.log('exports.main returned!'); InspectorTest.log('Test stepping over a recursive call');