@codingame/monaco-vscode-debug-service-override 6.0.3 → 7.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +5 -5
  3. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +58 -53
  4. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +1 -1
  5. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +4 -3
  6. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +34 -29
  7. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +22 -15
  8. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +14 -3
  9. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +21 -6
  10. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +3 -3
  11. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +1 -1
  12. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +1 -1
  13. package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +1 -1
  14. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +10 -2
  15. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +58 -37
  16. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +4 -14
  17. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +13 -3
  18. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +30 -8
  19. package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +4 -1
  20. package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-debug-service-override",
3
- "version": "6.0.3",
3
+ "version": "7.0.1",
4
4
  "keywords": [],
5
5
  "author": {
6
6
  "name": "CodinGame",
@@ -26,6 +26,6 @@
26
26
  }
27
27
  },
28
28
  "dependencies": {
29
- "vscode": "npm:@codingame/monaco-vscode-api@6.0.3"
29
+ "vscode": "npm:@codingame/monaco-vscode-api@7.0.1"
30
30
  }
31
31
  }
@@ -185,7 +185,7 @@ let CallStackView = class CallStackView extends ViewPane {
185
185
  this.stateMessage = append(container, $('span.call-stack-state-message'));
186
186
  this.stateMessage.hidden = true;
187
187
  this.stateMessageLabel = append(this.stateMessage, $('span.label'));
188
- this.stateMessageLabelHover = this._register(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), this.stateMessage, ''));
188
+ this.stateMessageLabelHover = this._register(this.hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), this.stateMessage, ''));
189
189
  }
190
190
  renderBody(container) {
191
191
  super.renderBody(container);
@@ -489,7 +489,7 @@ let SessionsRenderer = class SessionsRenderer {
489
489
  this.doRenderElement(lastElement, matches, templateData);
490
490
  }
491
491
  doRenderElement(session, matches, data) {
492
- const sessionHover = data.elementDisposable.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.session, ( localizeWithPath(_moduleId, 2, "Session"))));
492
+ const sessionHover = data.elementDisposable.add(this.hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), data.session, ( localizeWithPath(_moduleId, 2, "Session"))));
493
493
  data.label.set(session.getLabel(), matches);
494
494
  const stoppedDetails = session.getStoppedDetails();
495
495
  const thread = session.getAllThreads().find(t => t.stopped);
@@ -567,7 +567,7 @@ let ThreadsRenderer = class ThreadsRenderer {
567
567
  }
568
568
  renderElement(element, _index, data) {
569
569
  const thread = element.element;
570
- data.elementDisposable.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.thread, thread.name));
570
+ data.elementDisposable.add(this.hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), data.thread, thread.name));
571
571
  data.label.set(thread.name, createMatches(element.filterData));
572
572
  data.stateLabel.textContent = thread.stateLabel;
573
573
  data.stateLabel.classList.toggle('exception', thread.stoppedDetails?.reason === 'exception');
@@ -639,7 +639,7 @@ let StackFramesRenderer = class StackFramesRenderer {
639
639
  if (stackFrame.source.raw.origin) {
640
640
  title += `\n${stackFrame.source.raw.origin}`;
641
641
  }
642
- data.templateDisposable.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.file, title));
642
+ data.templateDisposable.add(this.hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), data.file, title));
643
643
  data.label.set(stackFrame.name, createMatches(element.filterData), stackFrame.name);
644
644
  data.fileName.textContent = getSpecificSourceName(stackFrame);
645
645
  if (stackFrame.range.startLineNumber !== undefined) {
@@ -693,7 +693,7 @@ let ErrorsRenderer = class ErrorsRenderer {
693
693
  renderElement(element, index, data) {
694
694
  const error = element.element;
695
695
  data.label.textContent = error;
696
- data.templateDisposable.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.label, error));
696
+ data.templateDisposable.add(this.hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), data.label, error));
697
697
  }
698
698
  renderCompressedElements(node, index, templateData, height) {
699
699
  throw ( (new Error('Method not implemented.')));
@@ -435,9 +435,14 @@ configurationRegistry.registerConfiguration({
435
435
  title: ( localizeWithPath(_moduleId, 45, "Debug")),
436
436
  type: 'object',
437
437
  properties: {
438
+ 'debug.showVariableTypes': {
439
+ type: 'boolean',
440
+ description: ( localizeWithPath(_moduleId, 46, "Show variable type in variable pane during debug session")),
441
+ default: false
442
+ },
438
443
  'debug.allowBreakpointsEverywhere': {
439
444
  type: 'boolean',
440
- description: ( localizeWithPath(_moduleId, 46, "Allow setting breakpoints in any file.")),
445
+ description: ( localizeWithPath(_moduleId, 47, "Allow setting breakpoints in any file.")),
441
446
  default: false
442
447
  },
443
448
  'debug.gutterMiddleClickAction': {
@@ -445,14 +450,14 @@ configurationRegistry.registerConfiguration({
445
450
  enum: ['logpoint', 'conditionalBreakpoint', 'triggeredBreakpoint', 'none'],
446
451
  description: ( localizeWithPath(
447
452
  _moduleId,
448
- 47,
453
+ 48,
449
454
  'Controls the action to perform when clicking the editor gutter with the middle mouse button.'
450
455
  )),
451
456
  enumDescriptions: [
452
- ( localizeWithPath(_moduleId, 48, "Add Logpoint.")),
453
- ( localizeWithPath(_moduleId, 49, "Add Conditional Breakpoint.")),
454
- ( localizeWithPath(_moduleId, 50, "Add Triggered Breakpoint.")),
455
- ( localizeWithPath(_moduleId, 51, "Don't perform any action.")),
457
+ ( localizeWithPath(_moduleId, 49, "Add Logpoint.")),
458
+ ( localizeWithPath(_moduleId, 50, "Add Conditional Breakpoint.")),
459
+ ( localizeWithPath(_moduleId, 51, "Add Triggered Breakpoint.")),
460
+ ( localizeWithPath(_moduleId, 52, "Don't perform any action.")),
456
461
  ],
457
462
  default: 'logpoint',
458
463
  },
@@ -460,7 +465,7 @@ configurationRegistry.registerConfiguration({
460
465
  type: 'boolean',
461
466
  description: ( localizeWithPath(
462
467
  _moduleId,
463
- 52,
468
+ 53,
464
469
  "Automatically open the explorer view at the end of a debug session."
465
470
  )),
466
471
  default: false
@@ -469,7 +474,7 @@ configurationRegistry.registerConfiguration({
469
474
  type: 'boolean',
470
475
  description: ( localizeWithPath(
471
476
  _moduleId,
472
- 53,
477
+ 54,
473
478
  "At the end of a debug session, all the read-only tabs associated with that session will be closed"
474
479
  )),
475
480
  default: false
@@ -477,21 +482,21 @@ configurationRegistry.registerConfiguration({
477
482
  'debug.inlineValues': {
478
483
  type: 'string',
479
484
  'enum': ['on', 'off', 'auto'],
480
- description: ( localizeWithPath(_moduleId, 54, "Show variable values inline in editor while debugging.")),
485
+ description: ( localizeWithPath(_moduleId, 55, "Show variable values inline in editor while debugging.")),
481
486
  'enumDescriptions': [
482
487
  ( localizeWithPath(
483
488
  _moduleId,
484
- 55,
489
+ 56,
485
490
  "Always show variable values inline in editor while debugging."
486
491
  )),
487
492
  ( localizeWithPath(
488
493
  _moduleId,
489
- 56,
494
+ 57,
490
495
  "Never show variable values inline in editor while debugging."
491
496
  )),
492
497
  ( localizeWithPath(
493
498
  _moduleId,
494
- 57,
499
+ 58,
495
500
  "Show variable values inline in editor while debugging when the language supports inline value locations."
496
501
  )),
497
502
  ],
@@ -501,30 +506,30 @@ configurationRegistry.registerConfiguration({
501
506
  enum: ['floating', 'docked', 'commandCenter', 'hidden'],
502
507
  markdownDescription: ( localizeWithPath(
503
508
  _moduleId,
504
- 58,
505
- "Controls the location of the debug toolbar. Either `floating` in all views, `docked` in the debug view, `commandCenter` (requires `{0}`), or `hidden`.",
506
- '#window.commandCenter#'
509
+ 59,
510
+ "Controls the location of the debug toolbar. Either `floating` in all views, `docked` in the debug view, `commandCenter` (requires {0}), or `hidden`.",
511
+ '`#window.commandCenter#`'
507
512
  )),
508
513
  default: 'floating',
509
514
  markdownEnumDescriptions: [
510
- ( localizeWithPath(_moduleId, 59, "Show debug toolbar in all views.")),
511
- ( localizeWithPath(_moduleId, 60, "Show debug toolbar only in debug views.")),
515
+ ( localizeWithPath(_moduleId, 60, "Show debug toolbar in all views.")),
516
+ ( localizeWithPath(_moduleId, 61, "Show debug toolbar only in debug views.")),
512
517
  ( localizeWithPath(
513
518
  _moduleId,
514
- 61,
519
+ 62,
515
520
  "`(Experimental)` Show debug toolbar in the command center."
516
521
  )),
517
- ( localizeWithPath(_moduleId, 62, "Do not show debug toolbar.")),
522
+ ( localizeWithPath(_moduleId, 63, "Do not show debug toolbar.")),
518
523
  ]
519
524
  },
520
525
  'debug.showInStatusBar': {
521
526
  enum: ['never', 'always', 'onFirstSessionStart'],
522
- enumDescriptions: [( localizeWithPath(_moduleId, 63, "Never show debug in Status bar")), ( localizeWithPath(_moduleId, 64, "Always show debug in Status bar")), ( localizeWithPath(
527
+ enumDescriptions: [( localizeWithPath(_moduleId, 64, "Never show debug in Status bar")), ( localizeWithPath(_moduleId, 65, "Always show debug in Status bar")), ( localizeWithPath(
523
528
  _moduleId,
524
- 65,
529
+ 66,
525
530
  "Show debug in Status bar only after debug was started for the first time"
526
531
  ))],
527
- description: ( localizeWithPath(_moduleId, 66, "Controls when the debug Status bar should be visible.")),
532
+ description: ( localizeWithPath(_moduleId, 67, "Controls when the debug Status bar should be visible.")),
528
533
  default: 'onFirstSessionStart'
529
534
  },
530
535
  'debug.internalConsoleOptions': INTERNAL_CONSOLE_OPTIONS_SCHEMA,
@@ -532,7 +537,7 @@ configurationRegistry.registerConfiguration({
532
537
  type: 'boolean',
533
538
  description: ( localizeWithPath(
534
539
  _moduleId,
535
- 67,
540
+ 68,
536
541
  "Controls if the Debug Console should be automatically closed when the debug session ends."
537
542
  )),
538
543
  default: false
@@ -541,7 +546,7 @@ configurationRegistry.registerConfiguration({
541
546
  type: 'boolean',
542
547
  description: ( localizeWithPath(
543
548
  _moduleId,
544
- 68,
549
+ 69,
545
550
  "Before starting a new debug session in an integrated or external terminal, clear the terminal."
546
551
  )),
547
552
  default: false
@@ -549,46 +554,46 @@ configurationRegistry.registerConfiguration({
549
554
  'debug.openDebug': {
550
555
  enum: ['neverOpen', 'openOnSessionStart', 'openOnFirstSessionStart', 'openOnDebugBreak'],
551
556
  default: 'openOnDebugBreak',
552
- description: ( localizeWithPath(_moduleId, 69, "Controls when the debug view should open."))
557
+ description: ( localizeWithPath(_moduleId, 70, "Controls when the debug view should open."))
553
558
  },
554
559
  'debug.showSubSessionsInToolBar': {
555
560
  type: 'boolean',
556
561
  description: ( localizeWithPath(
557
562
  _moduleId,
558
- 70,
563
+ 71,
559
564
  "Controls whether the debug sub-sessions are shown in the debug tool bar. When this setting is false the stop command on a sub-session will also stop the parent session."
560
565
  )),
561
566
  default: false
562
567
  },
563
568
  'debug.console.fontSize': {
564
569
  type: 'number',
565
- description: ( localizeWithPath(_moduleId, 71, "Controls the font size in pixels in the Debug Console.")),
570
+ description: ( localizeWithPath(_moduleId, 72, "Controls the font size in pixels in the Debug Console.")),
566
571
  default: isMacintosh ? 12 : 14,
567
572
  },
568
573
  'debug.console.fontFamily': {
569
574
  type: 'string',
570
- description: ( localizeWithPath(_moduleId, 72, "Controls the font family in the Debug Console.")),
575
+ description: ( localizeWithPath(_moduleId, 73, "Controls the font family in the Debug Console.")),
571
576
  default: 'default'
572
577
  },
573
578
  'debug.console.lineHeight': {
574
579
  type: 'number',
575
580
  description: ( localizeWithPath(
576
581
  _moduleId,
577
- 73,
582
+ 74,
578
583
  "Controls the line height in pixels in the Debug Console. Use 0 to compute the line height from the font size."
579
584
  )),
580
585
  default: 0
581
586
  },
582
587
  'debug.console.wordWrap': {
583
588
  type: 'boolean',
584
- description: ( localizeWithPath(_moduleId, 74, "Controls if the lines should wrap in the Debug Console.")),
589
+ description: ( localizeWithPath(_moduleId, 75, "Controls if the lines should wrap in the Debug Console.")),
585
590
  default: true
586
591
  },
587
592
  'debug.console.historySuggestions': {
588
593
  type: 'boolean',
589
594
  description: ( localizeWithPath(
590
595
  _moduleId,
591
- 75,
596
+ 76,
592
597
  "Controls if the Debug Console should suggest previously typed input."
593
598
  )),
594
599
  default: true
@@ -597,7 +602,7 @@ configurationRegistry.registerConfiguration({
597
602
  type: 'boolean',
598
603
  description: ( localizeWithPath(
599
604
  _moduleId,
600
- 76,
605
+ 77,
601
606
  "Controls if the Debug Console should collapse identical lines and show a number of occurrences with a badge."
602
607
  )),
603
608
  default: true
@@ -606,7 +611,7 @@ configurationRegistry.registerConfiguration({
606
611
  enum: ['off', 'on'],
607
612
  description: ( localizeWithPath(
608
613
  _moduleId,
609
- 77,
614
+ 78,
610
615
  "Controls whether suggestions should be accepted on Enter in the Debug Console. Enter is also used to evaluate whatever is typed in the Debug Console."
611
616
  )),
612
617
  default: 'off'
@@ -615,7 +620,7 @@ configurationRegistry.registerConfiguration({
615
620
  type: 'object',
616
621
  description: ( localizeWithPath(
617
622
  _moduleId,
618
- 78,
623
+ 79,
619
624
  "Global debug launch configuration. Should be used as an alternative to 'launch.json' that is shared across workspaces."
620
625
  )),
621
626
  default: { configurations: [], compounds: [] },
@@ -625,7 +630,7 @@ configurationRegistry.registerConfiguration({
625
630
  type: 'boolean',
626
631
  description: ( localizeWithPath(
627
632
  _moduleId,
628
- 79,
633
+ 80,
629
634
  "Controls whether the workbench window should be focused when the debugger breaks."
630
635
  )),
631
636
  default: true
@@ -634,17 +639,17 @@ configurationRegistry.registerConfiguration({
634
639
  type: 'boolean',
635
640
  description: ( localizeWithPath(
636
641
  _moduleId,
637
- 80,
642
+ 81,
638
643
  "Controls whether the editor should be focused when the debugger breaks."
639
644
  )),
640
645
  default: true
641
646
  },
642
647
  'debug.onTaskErrors': {
643
648
  enum: ['debugAnyway', 'showErrors', 'prompt', 'abort'],
644
- enumDescriptions: [( localizeWithPath(_moduleId, 81, "Ignore task errors and start debugging.")), ( localizeWithPath(_moduleId, 82, "Show the Problems view and do not start debugging.")), ( localizeWithPath(_moduleId, 83, "Prompt user.")), ( localizeWithPath(_moduleId, 84, "Cancel debugging."))],
649
+ enumDescriptions: [( localizeWithPath(_moduleId, 82, "Ignore task errors and start debugging.")), ( localizeWithPath(_moduleId, 83, "Show the Problems view and do not start debugging.")), ( localizeWithPath(_moduleId, 84, "Prompt user.")), ( localizeWithPath(_moduleId, 85, "Cancel debugging."))],
645
650
  description: ( localizeWithPath(
646
651
  _moduleId,
647
- 85,
652
+ 86,
648
653
  "Controls what to do when errors are encountered after running a preLaunchTask."
649
654
  )),
650
655
  default: 'prompt'
@@ -653,7 +658,7 @@ configurationRegistry.registerConfiguration({
653
658
  type: 'boolean',
654
659
  description: ( localizeWithPath(
655
660
  _moduleId,
656
- 86,
661
+ 87,
657
662
  "Controls whether breakpoints should be shown in the overview ruler."
658
663
  )),
659
664
  default: false
@@ -662,7 +667,7 @@ configurationRegistry.registerConfiguration({
662
667
  type: 'boolean',
663
668
  description: ( localizeWithPath(
664
669
  _moduleId,
665
- 87,
670
+ 88,
666
671
  "Controls whether inline breakpoints candidate decorations should be shown in the editor while debugging."
667
672
  )),
668
673
  default: true
@@ -670,22 +675,22 @@ configurationRegistry.registerConfiguration({
670
675
  'debug.saveBeforeStart': {
671
676
  description: ( localizeWithPath(
672
677
  _moduleId,
673
- 88,
678
+ 89,
674
679
  "Controls what editors to save before starting a debug session."
675
680
  )),
676
681
  enum: ['allEditorsInActiveGroup', 'nonUntitledEditorsInActiveGroup', 'none'],
677
682
  enumDescriptions: [
678
683
  ( localizeWithPath(
679
684
  _moduleId,
680
- 89,
685
+ 90,
681
686
  "Save all editors in the active group before starting a debug session."
682
687
  )),
683
688
  ( localizeWithPath(
684
689
  _moduleId,
685
- 90,
690
+ 91,
686
691
  "Save all editors in the active group except untitled ones before starting a debug session."
687
692
  )),
688
- ( localizeWithPath(_moduleId, 91, "Don't save any editors before starting a debug session.")),
693
+ ( localizeWithPath(_moduleId, 92, "Don't save any editors before starting a debug session.")),
689
694
  ],
690
695
  default: 'allEditorsInActiveGroup',
691
696
  scope: ConfigurationScope.LANGUAGE_OVERRIDABLE
@@ -693,43 +698,43 @@ configurationRegistry.registerConfiguration({
693
698
  'debug.confirmOnExit': {
694
699
  description: ( localizeWithPath(
695
700
  _moduleId,
696
- 92,
701
+ 93,
697
702
  "Controls whether to confirm when the window closes if there are active debug sessions."
698
703
  )),
699
704
  type: 'string',
700
705
  enum: ['never', 'always'],
701
706
  enumDescriptions: [
702
- ( localizeWithPath(_moduleId, 93, "Never confirm.")),
703
- ( localizeWithPath(_moduleId, 94, "Always confirm if there are debug sessions.")),
707
+ ( localizeWithPath(_moduleId, 94, "Never confirm.")),
708
+ ( localizeWithPath(_moduleId, 95, "Always confirm if there are debug sessions.")),
704
709
  ],
705
710
  default: 'never'
706
711
  },
707
712
  'debug.disassemblyView.showSourceCode': {
708
713
  type: 'boolean',
709
714
  default: true,
710
- description: ( localizeWithPath(_moduleId, 95, "Show Source Code in Disassembly View."))
715
+ description: ( localizeWithPath(_moduleId, 96, "Show Source Code in Disassembly View."))
711
716
  },
712
717
  'debug.autoExpandLazyVariables': {
713
718
  type: 'boolean',
714
719
  default: false,
715
720
  description: ( localizeWithPath(
716
721
  _moduleId,
717
- 96,
722
+ 97,
718
723
  "Automatically show values for variables that are lazily resolved by the debugger, such as getters."
719
724
  ))
720
725
  },
721
726
  'debug.enableStatusBarColor': {
722
727
  type: 'boolean',
723
- description: ( localizeWithPath(_moduleId, 97, "Color of the Status bar when debugger is active.")),
728
+ description: ( localizeWithPath(_moduleId, 98, "Color of the Status bar when debugger is active.")),
724
729
  default: true
725
730
  },
726
731
  'debug.hideLauncherWhileDebugging': {
727
732
  type: 'boolean',
728
733
  markdownDescription: ( localizeWithPath(
729
734
  _moduleId,
730
- 98,
731
- "Hide 'Start Debugging' control in title bar of 'Run and Debug' view while debugging is active. Only relevant when `{0}` is not `docked`.",
732
- '#debug.toolBarLocation#'
735
+ 99,
736
+ "Hide 'Start Debugging' control in title bar of 'Run and Debug' view while debugging is active. Only relevant when {0} is not `docked`.",
737
+ '`#debug.toolBarLocation#`'
733
738
  )),
734
739
  default: false
735
740
  }
@@ -79,7 +79,7 @@ let StartDebugActionViewItem = class StartDebugActionViewItem extends BaseAction
79
79
  const keybinding = this.keybindingService.lookupKeybinding(this.action.id)?.getLabel();
80
80
  const keybindingLabel = keybinding ? ` (${keybinding})` : '';
81
81
  const title = this.action.label + keybindingLabel;
82
- this.toDispose.push(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), this.start, title));
82
+ this.toDispose.push(this.hoverService.setupManagedHover(getDefaultHoverDelegate('mouse'), this.start, title));
83
83
  this.start.setAttribute('role', 'button');
84
84
  this.start.ariaLabel = title;
85
85
  this.toDispose.push(addDisposableListener(this.start, EventType.CLICK, () => {
@@ -15,7 +15,6 @@ import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/brows
15
15
  import { KeybindingWeight } from 'vscode/vscode/vs/platform/keybinding/common/keybindingsRegistry';
16
16
  import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/common/uriIdentity.service';
17
17
  import { PanelFocusContext } from 'vscode/vscode/vs/workbench/common/contextkeys';
18
- import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
19
18
  import { openBreakpointSource } from 'vscode/vscode/vs/workbench/contrib/debug/browser/breakpointsView';
20
19
  import { DisassemblyView } from './disassemblyView.js';
21
20
  import { CONTEXT_DEBUGGERS_AVAILABLE, CONTEXT_DISASSEMBLY_VIEW_FOCUS, BREAKPOINT_EDITOR_CONTRIBUTION_ID, BreakpointWidgetContext, CONTEXT_FOCUSED_STACK_FRAME_HAS_INSTRUCTION_POINTER_REFERENCE, CONTEXT_IN_DEBUG_MODE, CONTEXT_DEBUG_STATE, CONTEXT_DISASSEMBLE_REQUEST_SUPPORTED, CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST, CONTEXT_CALLSTACK_ITEM_TYPE, REPL_VIEW_ID, WATCH_VIEW_ID, EDITOR_CONTRIBUTION_ID, CONTEXT_STEP_INTO_TARGETS_SUPPORTED, CONTEXT_EXCEPTION_WIDGET_VISIBLE } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
@@ -23,6 +22,7 @@ import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/d
23
22
  import { getEvaluatableExpressionAtPosition } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugUtils';
24
23
  import { DisassemblyViewInput } from 'vscode/vscode/vs/workbench/contrib/debug/common/disassemblyViewInput';
25
24
  import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
25
+ import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
26
26
 
27
27
  const _moduleId = "vs/workbench/contrib/debug/browser/debugEditorActions";
28
28
  class ToggleBreakpointAction extends Action2 {
@@ -33,6 +33,7 @@ class ToggleBreakpointAction extends Action2 {
33
33
  ...( localize2WithPath(_moduleId, 0, "Debug: Toggle Breakpoint")),
34
34
  mnemonicTitle: ( localizeWithPath(_moduleId, 1, "Toggle &&Breakpoint")),
35
35
  },
36
+ f1: true,
36
37
  precondition: CONTEXT_DEBUGGERS_AVAILABLE,
37
38
  keybinding: {
38
39
  when: ( (ContextKeyExpr.or(EditorContextKeys.editorTextFocus, CONTEXT_DISASSEMBLY_VIEW_FOCUS))),
@@ -342,8 +343,8 @@ class SelectionToReplAction extends EditorAction {
342
343
  else {
343
344
  text = editor.getModel().getValueInRange(selection);
344
345
  }
345
- await session.addReplExpression(viewModel.focusedStackFrame, text);
346
- await viewsService.openView(REPL_VIEW_ID, false);
346
+ const replView = await viewsService.openView(REPL_VIEW_ID, false);
347
+ replView?.sendReplInput(text);
347
348
  }
348
349
  }
349
350
  class SelectionToWatchExpressionsAction extends EditorAction {
@@ -2,7 +2,6 @@ import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
2
2
  import { addDisposableListener, isKeyboardEvent } from 'vscode/vscode/vs/base/browser/dom';
3
3
  import { DomEmitter } from 'vscode/vscode/vs/base/browser/event';
4
4
  import { StandardKeyboardEvent } from 'vscode/vscode/vs/base/browser/keyboardEvent';
5
- import { distinct } from 'vscode/vscode/vs/base/common/arrays';
6
5
  import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
7
6
  import { CancellationTokenSource, CancellationToken } from 'vscode/vscode/vs/base/common/cancellation';
8
7
  import { memoize } from 'vscode/vscode/vs/base/common/decorators';
@@ -70,12 +69,7 @@ registerColor('editor.inlineValuesForeground', {
70
69
  hcDark: '#ffffff80',
71
70
  hcLight: '#00000080'
72
71
  }, ( localizeWithPath(_moduleId, 0, "Color for the debug inline value text.")));
73
- registerColor('editor.inlineValuesBackground', {
74
- dark: '#ffc80033',
75
- light: '#ffc80033',
76
- hcDark: '#ffc80033',
77
- hcLight: '#ffc80033'
78
- }, ( localizeWithPath(_moduleId, 1, "Color for the debug inline value background.")));
72
+ registerColor('editor.inlineValuesBackground', '#ffc80033', ( localizeWithPath(_moduleId, 1, "Color for the debug inline value background.")));
79
73
  class InlineSegment {
80
74
  constructor(column, text) {
81
75
  this.column = column;
@@ -150,15 +144,15 @@ function createInlineValueDecorationsInsideRange(expressions, ranges, model, wor
150
144
  }
151
145
  }
152
146
  });
153
- const decorations = [];
154
- lineToNamesMap.forEach((names, line) => {
155
- const contentText = ( (names.sort((first, second) => {
156
- const content = model.getLineContent(line);
157
- return content.indexOf(first) - content.indexOf(second);
158
- }).map(name => `${name} = ${nameValueMap.get(name)}`))).join(', ');
159
- decorations.push(...createInlineValueDecoration(line, contentText));
160
- });
161
- return decorations;
147
+ return (
148
+ ([...lineToNamesMap].map(([line, names]) => ({
149
+ line,
150
+ variables: ( (names.sort((first, second) => {
151
+ const content = model.getLineContent(line);
152
+ return content.indexOf(first) - content.indexOf(second);
153
+ }).map(name => ({ name, value: nameValueMap.get(name) }))))
154
+ })))
155
+ );
162
156
  }
163
157
  function getWordToLineNumbersMap(model, lineNumber, result) {
164
158
  const lineLength = model.getLineLength(lineNumber);
@@ -196,7 +190,6 @@ let DebugEditorContribution = class DebugEditorContribution {
196
190
  this.hostService = hostService;
197
191
  this.uriIdentityService = uriIdentityService;
198
192
  this.languageFeaturesService = languageFeaturesService;
199
- this.hoverPosition = null;
200
193
  this.mouseDown = false;
201
194
  this.gutterIsHovered = false;
202
195
  this.altListener = ( (new MutableDisposable()));
@@ -290,7 +283,7 @@ let DebugEditorContribution = class DebugEditorContribution {
290
283
  this.hoverWidget.hide();
291
284
  this.defaultHoverLockout.clear();
292
285
  if (debugHoverWasVisible && this.hoverPosition) {
293
- this.showEditorHover(this.hoverPosition, false);
286
+ this.showEditorHover(this.hoverPosition.position, false);
294
287
  }
295
288
  const onKeyUp = ( (new DomEmitter(ownerDocument, 'keyup')));
296
289
  const listener = Event.any(this.hostService.onDidChangeFocus, onKeyUp.event)(keyupEvent => {
@@ -308,12 +301,12 @@ let DebugEditorContribution = class DebugEditorContribution {
308
301
  }
309
302
  });
310
303
  }
311
- async showHover(position, focus) {
304
+ async showHover(position, focus, mouseEvent) {
312
305
  this.preventDefaultEditorHover();
313
306
  const sf = this.debugService.getViewModel().focusedStackFrame;
314
307
  const model = this.editor.getModel();
315
308
  if (sf && model && this.uriIdentityService.extUri.isEqual(sf.source.uri, model.uri)) {
316
- const result = await this.hoverWidget.showAt(position, focus);
309
+ const result = await this.hoverWidget.showAt(position, focus, mouseEvent);
317
310
  if (result === ShowDebugHoverResult.NOT_AVAILABLE) {
318
311
  this.showEditorHover(position, focus);
319
312
  }
@@ -364,7 +357,7 @@ let DebugEditorContribution = class DebugEditorContribution {
364
357
  get showHoverScheduler() {
365
358
  const scheduler = ( (new RunOnceScheduler(() => {
366
359
  if (this.hoverPosition && !this.altPressed) {
367
- this.showHover(this.hoverPosition, false);
360
+ this.showHover(this.hoverPosition.position, false, this.hoverPosition.event);
368
361
  }
369
362
  }, this.hoverDelay)));
370
363
  this.toDispose.push(scheduler);
@@ -407,8 +400,8 @@ let DebugEditorContribution = class DebugEditorContribution {
407
400
  }
408
401
  }
409
402
  if (target.type === MouseTargetType.CONTENT_TEXT) {
410
- if (target.position && !Position.equals(target.position, this.hoverPosition)) {
411
- this.hoverPosition = target.position;
403
+ if (target.position && !Position.equals(target.position, this.hoverPosition?.position || null) && !this.hoverWidget.isInSafeTriangle(mouseEvent.event.posx, mouseEvent.event.posy)) {
404
+ this.hoverPosition = { position: target.position, event: mouseEvent.event };
412
405
  this.preventDefaultEditorHover();
413
406
  this.showHoverScheduler.schedule(this.hoverDelay);
414
407
  }
@@ -657,8 +650,9 @@ let DebugEditorContribution = class DebugEditorContribution {
657
650
  }
658
651
  else {
659
652
  const scopes = await stackFrame.getMostSpecificScopes(stackFrame.range);
660
- const decorationsPerScope = await Promise.all(( (scopes.map(async (scope) => {
661
- const variables = await scope.getChildren();
653
+ const scopesWithVariables = await Promise.all(( (scopes.map(async (scope) => ({ scope, variables: await scope.getChildren() })))));
654
+ const valuesPerLine = ( (new Map()));
655
+ for (const { scope, variables } of scopesWithVariables) {
662
656
  let scopeRange = ( (new Range(0, 0, stackFrame.range.startLineNumber, stackFrame.range.startColumn)));
663
657
  if (scope.range) {
664
658
  scopeRange = scopeRange.setStartPosition(scope.range.startLineNumber, scope.range.startColumn);
@@ -668,10 +662,21 @@ let DebugEditorContribution = class DebugEditorContribution {
668
662
  for (const range of ownRanges) {
669
663
  this._wordToLineNumbersMap.ensureRangePopulated(range);
670
664
  }
671
- return createInlineValueDecorationsInsideRange(variables, ownRanges, model, this._wordToLineNumbersMap.value);
672
- }))));
673
- allDecorations = distinct(decorationsPerScope.flat(),
674
- decoration => `${decoration.range.startLineNumber}:${decoration?.options.after?.content}`);
665
+ const mapped = createInlineValueDecorationsInsideRange(variables, ownRanges, model, this._wordToLineNumbersMap.value);
666
+ for (const { line, variables } of mapped) {
667
+ let values = valuesPerLine.get(line);
668
+ if (!values) {
669
+ values = ( (new Map()));
670
+ valuesPerLine.set(line, values);
671
+ }
672
+ for (const { name, value } of variables) {
673
+ if (!( (values.has(name)))) {
674
+ values.set(name, value);
675
+ }
676
+ }
677
+ }
678
+ }
679
+ allDecorations = [...valuesPerLine.entries()].flatMap(([line, values]) => createInlineValueDecoration(line, ( ([...values].map(([n, v]) => `${n} = ${v}`))).join(', ')));
675
680
  }
676
681
  if (cts.token.isCancellationRequested) {
677
682
  return;