JsStepDebuggerService.stop() called from a native while stepInto/runUntil is in the inner micro-step loop tears the interpreter down (interpreter = null) and resolves the in-flight promise, but the loop then does this.interpreter.step() on the nulled handle. The runUntil catch converts that into state = 'errored' with a TypeError, overwriting the idle teardown stop() just applied.
A student (or Blockly highlightBlock native) that calls Stop while a step is in flight would see an error chip instead of a clean idle session.
Repro (characterization)
Prepare stopNow(); var x = 1; with a native that calls svc.stop(), then await svc.stepInto(). Observed: state === 'errored'. Expected: state === 'idle', no error, interpreter gone.
Where
libraries/platform/js-step-debugger/src/lib/js-step-debugger.service.ts — stop() vs runUntil catch. Wave 7 tick 5 a5 characterization test pins current behavior.
## Summary
`JsStepDebuggerService.stop()` called from a native while `stepInto`/`runUntil` is in the inner micro-step loop tears the interpreter down (`interpreter = null`) and resolves the in-flight promise, but the loop then does `this.interpreter.step()` on the nulled handle. The `runUntil` catch converts that into `state = 'errored'` with a TypeError, overwriting the idle teardown `stop()` just applied.
A student (or Blockly `highlightBlock` native) that calls Stop while a step is in flight would see an error chip instead of a clean idle session.
## Repro (characterization)
Prepare `stopNow(); var x = 1;` with a native that calls `svc.stop()`, then `await svc.stepInto()`. Observed: `state === 'errored'`. Expected: `state === 'idle'`, no error, interpreter gone.
## Where
`libraries/platform/js-step-debugger/src/lib/js-step-debugger.service.ts` — `stop()` vs `runUntil` catch. Wave 7 tick 5 a5 characterization test pins current behavior.
Resolved in spikersoft-angular PR #819 (merged to master). stop() from a native mid-step no longer leaves state=errored. Closing.
Resolved in spikersoft-angular [PR #819](https://git.spikersoft.com/spikerj/spikersoft-angular/pulls/819) (merged to `master`). stop() from a native mid-step no longer leaves state=errored. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
JsStepDebuggerService.stop()called from a native whilestepInto/runUntilis in the inner micro-step loop tears the interpreter down (interpreter = null) and resolves the in-flight promise, but the loop then doesthis.interpreter.step()on the nulled handle. TherunUntilcatch converts that intostate = 'errored'with a TypeError, overwriting the idle teardownstop()just applied.A student (or Blockly
highlightBlocknative) that calls Stop while a step is in flight would see an error chip instead of a clean idle session.Repro (characterization)
Prepare
stopNow(); var x = 1;with a native that callssvc.stop(), thenawait svc.stepInto(). Observed:state === 'errored'. Expected:state === 'idle', no error, interpreter gone.Where
libraries/platform/js-step-debugger/src/lib/js-step-debugger.service.ts—stop()vsrunUntilcatch. Wave 7 tick 5 a5 characterization test pins current behavior.Resolved in spikersoft-angular PR #819 (merged to
master). stop() from a native mid-step no longer leaves state=errored. Closing.