Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions vscode/src/debugger/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,14 +390,20 @@ export class QscDebugSession extends LoggingDebugSession {
// This will be replaced when the interpreter
// supports shots.
for (let i = 0; i < args.shots; i++) {
const result = await this.debugService.evalContinue(
bps,
this.eventTarget,
);
if (result.id != StepResultId.Return) {
await this.endSession(`execution didn't run to completion`, -1);
try {
const result = await this.debugService.evalContinue(
bps,
this.eventTarget,
);
if (result.id != StepResultId.Return) {
await this.endSession(`execution didn't run to completion`, -1);
return;
}
} catch (e) {
await this.endSession(`ending session due to error: ${e}`, 1);
return;
}

this.writeToDebugConsole(`Finished shot ${i + 1} of ${args.shots}`);
// Reset the interpreter for the next shot.
// The interactive interpreter doesn't do this automatically,
Expand Down