@@ -224,7 +224,7 @@ class MidasDAPSession extends DebugAdapter.DebugSession {
224
224
/** @type {import("../terminalInterface").TerminalInterface } */
225
225
#terminal;
226
226
227
- // The Checkpoints UI
227
+ /** @type { import("../ui/checkpoints/checkpoints").CheckpointsViewProvider }*/
228
228
#checkpointsUI;
229
229
#defaultLogger = ( output ) => {
230
230
console . log ( output ) ;
@@ -244,7 +244,6 @@ class MidasDAPSession extends DebugAdapter.DebugSession {
244
244
this . setDebuggerColumnsStartAt1 ( true ) ;
245
245
this . gdb = new Gdb ( spawnConfig . path , spawnConfig . options ?? [ ] ) ;
246
246
this . #terminal = terminal ;
247
-
248
247
this . gdb . response_connect ( ( response ) => {
249
248
if ( ! response . success ) {
250
249
const err = ( response . body . error ?? { stacktrace : "No stack trace info" } ) . stacktrace ;
@@ -279,7 +278,7 @@ class MidasDAPSession extends DebugAdapter.DebugSession {
279
278
} ) ;
280
279
281
280
this . on ( "exit" , ( evt ) => {
282
- this . disposeTerminal ( ) ;
281
+ this . dispose ( ) ;
283
282
} ) ;
284
283
285
284
this . on ( "error" , ( event ) => {
@@ -288,6 +287,12 @@ class MidasDAPSession extends DebugAdapter.DebugSession {
288
287
289
288
}
290
289
290
+ dispose ( ) {
291
+ this . #checkpointsUI. tearDown ( ) ;
292
+ this . disposeTerminal ( ) ;
293
+ super . dispose ( ) ;
294
+ }
295
+
291
296
atExitCleanUp ( signal ) {
292
297
this . gdb . gdb . kill ( signal ) ;
293
298
if ( this . #spawnConfig. disposeOnExit ( ) ) this . disposeTerminal ( ) ;
@@ -296,6 +301,10 @@ class MidasDAPSession extends DebugAdapter.DebugSession {
296
301
}
297
302
}
298
303
304
+ shutdown ( ) {
305
+ console . log ( `SHUTDOWN CALLED` ) ;
306
+ }
307
+
299
308
/**
300
309
* @returns { import("../buildMode").MidasRunMode }
301
310
*/
@@ -459,6 +468,7 @@ class MidasDAPSession extends DebugAdapter.DebugSession {
459
468
460
469
// eslint-disable-next-line no-unused-vars
461
470
disconnectRequest ( response , args , request ) {
471
+ this . #checkpointsUI. tearDown ( ) ;
462
472
this . gdb . sendRequest ( request , args ) ;
463
473
}
464
474
0 commit comments