@@ -304,27 +304,27 @@ CommandsRegistry.registerCommand({
304
304
305
305
CommandsRegistry . registerCommand ( {
306
306
id : REVERSE_CONTINUE_ID ,
307
- handler : ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
308
- getThreadAndRun ( accessor , context , thread => thread . reverseContinue ( ) ) ;
307
+ handler : async ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
308
+ await getThreadAndRun ( accessor , context , thread => thread . reverseContinue ( ) ) ;
309
309
}
310
310
} ) ;
311
311
312
312
CommandsRegistry . registerCommand ( {
313
313
id : STEP_BACK_ID ,
314
- handler : ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
314
+ handler : async ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
315
315
const contextKeyService = accessor . get ( IContextKeyService ) ;
316
316
if ( CONTEXT_DISASSEMBLY_VIEW_FOCUS . getValue ( contextKeyService ) ) {
317
- getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . stepBack ( 'instruction' ) ) ;
317
+ await getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . stepBack ( 'instruction' ) ) ;
318
318
} else {
319
- getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . stepBack ( ) ) ;
319
+ await getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . stepBack ( ) ) ;
320
320
}
321
321
}
322
322
} ) ;
323
323
324
324
CommandsRegistry . registerCommand ( {
325
325
id : TERMINATE_THREAD_ID ,
326
- handler : ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
327
- getThreadAndRun ( accessor , context , thread => thread . terminate ( ) ) ;
326
+ handler : async ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
327
+ await getThreadAndRun ( accessor , context , thread => thread . terminate ( ) ) ;
328
328
}
329
329
} ) ;
330
330
@@ -467,12 +467,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
467
467
weight : KeybindingWeight . WorkbenchContrib ,
468
468
primary : isWeb ? ( KeyMod . Alt | KeyCode . F10 ) : KeyCode . F10 , // Browsers do not allow F10 to be binded so we have to bind an alternative
469
469
when : CONTEXT_DEBUG_STATE . isEqualTo ( 'stopped' ) ,
470
- handler : ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
470
+ handler : async ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
471
471
const contextKeyService = accessor . get ( IContextKeyService ) ;
472
472
if ( CONTEXT_DISASSEMBLY_VIEW_FOCUS . getValue ( contextKeyService ) ) {
473
- getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . next ( 'instruction' ) ) ;
473
+ await getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . next ( 'instruction' ) ) ;
474
474
} else {
475
- getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . next ( ) ) ;
475
+ await getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . next ( ) ) ;
476
476
}
477
477
}
478
478
} ) ;
@@ -486,12 +486,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
486
486
primary : STEP_INTO_KEYBINDING ,
487
487
// Use a more flexible when clause to not allow full screen command to take over when F11 pressed a lot of times
488
488
when : CONTEXT_DEBUG_STATE . notEqualsTo ( 'inactive' ) ,
489
- handler : ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
489
+ handler : async ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
490
490
const contextKeyService = accessor . get ( IContextKeyService ) ;
491
491
if ( CONTEXT_DISASSEMBLY_VIEW_FOCUS . getValue ( contextKeyService ) ) {
492
- getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . stepIn ( 'instruction' ) ) ;
492
+ await getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . stepIn ( 'instruction' ) ) ;
493
493
} else {
494
- getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . stepIn ( ) ) ;
494
+ await getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . stepIn ( ) ) ;
495
495
}
496
496
}
497
497
} ) ;
@@ -501,12 +501,12 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
501
501
weight : KeybindingWeight . WorkbenchContrib ,
502
502
primary : KeyMod . Shift | KeyCode . F11 ,
503
503
when : CONTEXT_DEBUG_STATE . isEqualTo ( 'stopped' ) ,
504
- handler : ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
504
+ handler : async ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
505
505
const contextKeyService = accessor . get ( IContextKeyService ) ;
506
506
if ( CONTEXT_DISASSEMBLY_VIEW_FOCUS . getValue ( contextKeyService ) ) {
507
- getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . stepOut ( 'instruction' ) ) ;
507
+ await getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . stepOut ( 'instruction' ) ) ;
508
508
} else {
509
- getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . stepOut ( ) ) ;
509
+ await getThreadAndRun ( accessor , context , ( thread : IThread ) => thread . stepOut ( ) ) ;
510
510
}
511
511
}
512
512
} ) ;
@@ -516,8 +516,8 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
516
516
weight : KeybindingWeight . WorkbenchContrib + 2 , // take priority over focus next part while we are debugging
517
517
primary : KeyCode . F6 ,
518
518
when : CONTEXT_DEBUG_STATE . isEqualTo ( 'running' ) ,
519
- handler : ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
520
- getThreadAndRun ( accessor , context , thread => thread . pause ( ) ) ;
519
+ handler : async ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
520
+ await getThreadAndRun ( accessor , context , thread => thread . pause ( ) ) ;
521
521
}
522
522
} ) ;
523
523
@@ -649,17 +649,15 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
649
649
weight : KeybindingWeight . WorkbenchContrib + 10 , // Use a stronger weight to get priority over start debugging F5 shortcut
650
650
primary : KeyCode . F5 ,
651
651
when : CONTEXT_DEBUG_STATE . isEqualTo ( 'stopped' ) ,
652
- handler : ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
653
- getThreadAndRun ( accessor , context , thread => thread . continue ( ) ) ;
652
+ handler : async ( accessor : ServicesAccessor , _ : string , context : CallStackContext | unknown ) => {
653
+ await getThreadAndRun ( accessor , context , thread => thread . continue ( ) ) ;
654
654
}
655
655
} ) ;
656
656
657
657
CommandsRegistry . registerCommand ( {
658
658
id : SHOW_LOADED_SCRIPTS_ID ,
659
659
handler : async ( accessor ) => {
660
-
661
660
await showLoadedScriptMenu ( accessor ) ;
662
-
663
661
}
664
662
} ) ;
665
663
0 commit comments