mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2026-10-25 00:02:16 +00:00
vscode: stopping the debugger leaves the program running
This commit is contained in:
1 parent
032002dd0e
commit
0d983d07cd
2 files changed
+10
-2
No files matched your search
@@ -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.
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user