Skip to content

Commit 913bde7

Browse files
committed
fix debugger restart
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.
1 parent 257a61e commit 913bde7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/extension.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ async function handleCustomDebugEvent(event: vscode.DebugSessionCustomEvent): Pr
186186
if (debugRestarting) {
187187
activeDebugSessions.add(event.session.id);
188188
event.session.customRequest('ev3devBrowser.debugger.thread', 'started');
189+
debugRestarting = false;
189190
} else {
190191
event.session.customRequest('ev3devBrowser.debugger.terminate');
191192
}
@@ -226,6 +227,7 @@ async function handleCustomDebugEvent(event: vscode.DebugSessionCustomEvent): Pr
226227
output.appendLine(`Restarting: ${command}`);
227228
output.appendLine('----------');
228229
event.session.customRequest('ev3devBrowser.debugger.thread', 'started');
230+
debugRestarting = false;
229231
} else {
230232
event.session.customRequest('ev3devBrowser.debugger.terminate');
231233
}

0 commit comments

Comments
 (0)