vscode: stopping the debugger leaves the program running

This commit is contained in:
Steven Hugg committed 2026-09-28 18:57:04 +02:00
1 parent 032002dd0e
commit 0d983d07cd
2 files changed
+10 -2

No files matched your search

+4
View File
@@ -85,6 +85,10 @@ A launch configuration can also set:
While you debug, a rebuild doesn't restart the program. Press
<kbd>F5</kbd> again to debug the new build.
**Stop** on the Debug toolbar ends debugging and leaves the program
running in the panel, without breakpoints. Close the panel to stop the
program.
Some platforms, such as the Atari 2600 and Verilog, can only stop
between frames. There, breakpoints and steps work a frame at a time.
+6 -2
View File
@@ -1184,8 +1184,12 @@ function newDebugSession(session: vscode.DebugSession): EmuDebugSession {
},
async () => {
if (debugging?.session === session) debugging = undefined;
// stopping the session stops its program, not one started since
if (worker && worker === emu) panel?.dispose();
// stopping the debugger leaves the program running, as Run would,
// unless another run has replaced it since
if (worker && worker === emu) {
await worker.call('debug', 'setBreakpoints', []);
await worker.call('resume');
}
});
debugging = { session, backend };
return new EmuDebugSession(backend);