Add stepping and breakpoints to debugger

This commit is contained in:
Nilay Majorwar
2021-12-15 22:08:30 +05:30
parent 38247f03c8
commit 7d9fb457ff
6 changed files with 58 additions and 1 deletions

View File

@@ -134,6 +134,16 @@ class ExecutionController<RS> {
return this._result;
}
/**
* Run a single step of execution
* @returns Result of execution
*/
executeStep(): StepExecutionResult<RS> {
this._result = this._engine.executeStep();
this._result.signal = "paused";
return this._result;
}
/** Asynchronously sleep for a period of time */
private async sleep(millis: number) {
return new Promise<void>((resolve) => setTimeout(resolve, millis));