Skip to content

Commit

Permalink
fix debugger restart
Browse files Browse the repository at this point in the history
Fixes #95. Restarting the debugger was restarting the program
multiple times and eventually getting stuck. This fixes it by reseting
debugRestarting back to false to essentially make the restart a
one-shot triggered event.
  • Loading branch information
dlech committed Feb 13, 2020
1 parent 257a61e commit 913bde7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ async function handleCustomDebugEvent(event: vscode.DebugSessionCustomEvent): Pr
if (debugRestarting) {
activeDebugSessions.add(event.session.id);
event.session.customRequest('ev3devBrowser.debugger.thread', 'started');
debugRestarting = false;
} else {
event.session.customRequest('ev3devBrowser.debugger.terminate');
}
Expand Down Expand Up @@ -226,6 +227,7 @@ async function handleCustomDebugEvent(event: vscode.DebugSessionCustomEvent): Pr
output.appendLine(`Restarting: ${command}`);
output.appendLine('----------');
event.session.customRequest('ev3devBrowser.debugger.thread', 'started');
debugRestarting = false;
} else {
event.session.customRequest('ev3devBrowser.debugger.terminate');
}
Expand Down

0 comments on commit 913bde7

Please sign in to comment.