@codingame/monaco-vscode-debug-service-override 4.5.2 → 5.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.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +42 -34
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +93 -93
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +7 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +12 -9
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +6 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +16 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +12 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +6 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +20 -16
- package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +4 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +22 -16
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +33 -21
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +12 -11
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +6 -4
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +0 -963
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +0 -103
- package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +0 -84
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-debug-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.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@
|
|
29
|
+
"vscode": "npm:@codingame/monaco-vscode-api@5.0.1"
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -41,17 +41,17 @@ import { ThemeIcon } from 'vscode/vscode/vs/base/common/themables';
|
|
|
41
41
|
import { ViewPane, ViewAction } from 'vscode/vscode/vs/workbench/browser/parts/views/viewPane';
|
|
42
42
|
import { IViewDescriptorService } from 'vscode/vscode/vs/workbench/common/views.service';
|
|
43
43
|
import { renderViewTree } from 'vscode/vscode/vs/workbench/contrib/debug/browser/baseDebugView';
|
|
44
|
-
import { STOP_ID, DISCONNECT_ID, PAUSE_ID, PAUSE_LABEL, CONTINUE_ID, CONTINUE_LABEL, STEP_OVER_ID, STEP_OVER_LABEL, STEP_INTO_ID, STEP_INTO_LABEL, STEP_OUT_ID, STEP_OUT_LABEL, RESTART_SESSION_ID, RESTART_LABEL, STOP_LABEL, DISCONNECT_LABEL } from '
|
|
44
|
+
import { STOP_ID, DISCONNECT_ID, PAUSE_ID, PAUSE_LABEL, CONTINUE_ID, CONTINUE_LABEL, STEP_OVER_ID, STEP_OVER_LABEL, STEP_INTO_ID, STEP_INTO_LABEL, STEP_OUT_ID, STEP_OUT_LABEL, RESTART_SESSION_ID, RESTART_LABEL, STOP_LABEL, DISCONNECT_LABEL } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugCommands';
|
|
45
45
|
import { callstackViewSession, debugRestartFrame, debugPause, debugContinue, debugStepOver, debugStepInto, debugStepOut, debugRestart, debugStop, debugDisconnect } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
|
|
46
46
|
import { createDisconnectMenuItemAction } from './debugToolBar.js';
|
|
47
|
-
import { CONTEXT_CALLSTACK_ITEM_TYPE, CONTEXT_CALLSTACK_SESSION_IS_ATTACH, CONTEXT_CALLSTACK_ITEM_STOPPED, CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD, CONTEXT_STACK_FRAME_SUPPORTS_RESTART, CALLSTACK_VIEW_ID, CONTEXT_DEBUG_STATE, getStateLabel, CONTEXT_FOCUSED_SESSION_IS_NO_DEBUG } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
47
|
+
import { CONTEXT_CALLSTACK_ITEM_TYPE, CONTEXT_CALLSTACK_SESSION_IS_ATTACH, CONTEXT_CALLSTACK_ITEM_STOPPED, CONTEXT_CALLSTACK_SESSION_HAS_ONE_THREAD, CONTEXT_STACK_FRAME_SUPPORTS_RESTART, isFrameDeemphasized, CALLSTACK_VIEW_ID, CONTEXT_DEBUG_STATE, getStateLabel, CONTEXT_FOCUSED_SESSION_IS_NO_DEBUG } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
48
48
|
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
49
49
|
import { StackFrame, Thread, ThreadAndSessionIds } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
|
|
50
50
|
import { isSessionAttach } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugUtils';
|
|
51
|
-
import { setupCustomHover } from 'vscode/vscode/vs/base/browser/ui/hover/updatableHoverWidget';
|
|
52
51
|
import { getDefaultHoverDelegate } from 'vscode/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
|
|
52
|
+
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
53
53
|
|
|
54
|
-
var SessionsRenderer_1, ThreadsRenderer_1, StackFramesRenderer_1;
|
|
54
|
+
var SessionsRenderer_1, ThreadsRenderer_1, StackFramesRenderer_1, ErrorsRenderer_1;
|
|
55
55
|
const _moduleId = "vs/workbench/contrib/debug/browser/callStackView";
|
|
56
56
|
const $ = $$1;
|
|
57
57
|
function assignSessionContext(element, context) {
|
|
@@ -124,8 +124,8 @@ async function expandTo(session, tree) {
|
|
|
124
124
|
await tree.expand(session);
|
|
125
125
|
}
|
|
126
126
|
let CallStackView = class CallStackView extends ViewPane {
|
|
127
|
-
constructor(options, contextMenuService, debugService, keybindingService, instantiationService, viewDescriptorService, configurationService, contextKeyService, openerService, themeService, telemetryService, menuService) {
|
|
128
|
-
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
|
127
|
+
constructor(options, contextMenuService, debugService, keybindingService, instantiationService, viewDescriptorService, configurationService, contextKeyService, openerService, themeService, telemetryService, hoverService, menuService) {
|
|
128
|
+
super(options, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
|
129
129
|
this.options = options;
|
|
130
130
|
this.debugService = debugService;
|
|
131
131
|
this.menuService = menuService;
|
|
@@ -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(
|
|
188
|
+
this.stateMessageLabelHover = this._register(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), this.stateMessage, ''));
|
|
189
189
|
}
|
|
190
190
|
renderBody(container) {
|
|
191
191
|
super.renderBody(container);
|
|
@@ -197,7 +197,7 @@ let CallStackView = class CallStackView extends ViewPane {
|
|
|
197
197
|
this.instantiationService.createInstance(SessionsRenderer),
|
|
198
198
|
this.instantiationService.createInstance(ThreadsRenderer),
|
|
199
199
|
this.instantiationService.createInstance(StackFramesRenderer),
|
|
200
|
-
(
|
|
200
|
+
this.instantiationService.createInstance(ErrorsRenderer),
|
|
201
201
|
( (new LoadMoreRenderer())),
|
|
202
202
|
( (new ShowMoreRenderer()))
|
|
203
203
|
], this.dataSource, {
|
|
@@ -240,9 +240,7 @@ let CallStackView = class CallStackView extends ViewPane {
|
|
|
240
240
|
}
|
|
241
241
|
},
|
|
242
242
|
expandOnlyOnTwistieClick: true,
|
|
243
|
-
overrideStyles:
|
|
244
|
-
listBackground: this.getBackgroundColor()
|
|
245
|
-
}
|
|
243
|
+
overrideStyles: this.getLocationBasedColors().listOverrideStyles
|
|
246
244
|
});
|
|
247
245
|
this.tree.setInput(this.debugService.getModel());
|
|
248
246
|
this._register(this.tree);
|
|
@@ -430,7 +428,8 @@ CallStackView = ( (__decorate([
|
|
|
430
428
|
( (__param(8, IOpenerService))),
|
|
431
429
|
( (__param(9, IThemeService))),
|
|
432
430
|
( (__param(10, ITelemetryService))),
|
|
433
|
-
( (__param(11,
|
|
431
|
+
( (__param(11, IHoverService))),
|
|
432
|
+
( (__param(12, IMenuService)))
|
|
434
433
|
], CallStackView)));
|
|
435
434
|
function getSessionContextOverlay(session) {
|
|
436
435
|
return [
|
|
@@ -443,9 +442,10 @@ function getSessionContextOverlay(session) {
|
|
|
443
442
|
let SessionsRenderer = class SessionsRenderer {
|
|
444
443
|
static { SessionsRenderer_1 = this; }
|
|
445
444
|
static { this.ID = 'session'; }
|
|
446
|
-
constructor(instantiationService, contextKeyService, menuService) {
|
|
445
|
+
constructor(instantiationService, contextKeyService, hoverService, menuService) {
|
|
447
446
|
this.instantiationService = instantiationService;
|
|
448
447
|
this.contextKeyService = contextKeyService;
|
|
448
|
+
this.hoverService = hoverService;
|
|
449
449
|
this.menuService = menuService;
|
|
450
450
|
}
|
|
451
451
|
get templateId() {
|
|
@@ -463,7 +463,7 @@ let SessionsRenderer = class SessionsRenderer {
|
|
|
463
463
|
actionViewItemProvider: (action, options) => {
|
|
464
464
|
if ((action.id === STOP_ID || action.id === DISCONNECT_ID) && action instanceof MenuItemAction) {
|
|
465
465
|
stopActionViewItemDisposables.clear();
|
|
466
|
-
const item = this.instantiationService.invokeFunction(accessor => createDisconnectMenuItemAction(action, stopActionViewItemDisposables, accessor, options));
|
|
466
|
+
const item = this.instantiationService.invokeFunction(accessor => createDisconnectMenuItemAction(action, stopActionViewItemDisposables, accessor, { ...options, menuAsChild: false }));
|
|
467
467
|
if (item) {
|
|
468
468
|
return item;
|
|
469
469
|
}
|
|
@@ -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(
|
|
492
|
+
const sessionHover = data.elementDisposable.add(this.hoverService.setupUpdatableHover(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);
|
|
@@ -535,7 +535,8 @@ let SessionsRenderer = class SessionsRenderer {
|
|
|
535
535
|
SessionsRenderer = SessionsRenderer_1 = ( (__decorate([
|
|
536
536
|
( (__param(0, IInstantiationService))),
|
|
537
537
|
( (__param(1, IContextKeyService))),
|
|
538
|
-
( (__param(2,
|
|
538
|
+
( (__param(2, IHoverService))),
|
|
539
|
+
( (__param(3, IMenuService)))
|
|
539
540
|
], SessionsRenderer)));
|
|
540
541
|
function getThreadContextOverlay(thread) {
|
|
541
542
|
return [
|
|
@@ -546,8 +547,9 @@ function getThreadContextOverlay(thread) {
|
|
|
546
547
|
let ThreadsRenderer = class ThreadsRenderer {
|
|
547
548
|
static { ThreadsRenderer_1 = this; }
|
|
548
549
|
static { this.ID = 'thread'; }
|
|
549
|
-
constructor(contextKeyService, menuService) {
|
|
550
|
+
constructor(contextKeyService, hoverService, menuService) {
|
|
550
551
|
this.contextKeyService = contextKeyService;
|
|
552
|
+
this.hoverService = hoverService;
|
|
551
553
|
this.menuService = menuService;
|
|
552
554
|
}
|
|
553
555
|
get templateId() {
|
|
@@ -565,7 +567,7 @@ let ThreadsRenderer = class ThreadsRenderer {
|
|
|
565
567
|
}
|
|
566
568
|
renderElement(element, _index, data) {
|
|
567
569
|
const thread = element.element;
|
|
568
|
-
data.elementDisposable.add(
|
|
570
|
+
data.elementDisposable.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.thread, thread.name));
|
|
569
571
|
data.label.set(thread.name, createMatches(element.filterData));
|
|
570
572
|
data.stateLabel.textContent = thread.stateLabel;
|
|
571
573
|
data.stateLabel.classList.toggle('exception', thread.stoppedDetails?.reason === 'exception');
|
|
@@ -595,7 +597,8 @@ let ThreadsRenderer = class ThreadsRenderer {
|
|
|
595
597
|
};
|
|
596
598
|
ThreadsRenderer = ThreadsRenderer_1 = ( (__decorate([
|
|
597
599
|
( (__param(0, IContextKeyService))),
|
|
598
|
-
( (__param(1,
|
|
600
|
+
( (__param(1, IHoverService))),
|
|
601
|
+
( (__param(2, IMenuService)))
|
|
599
602
|
], ThreadsRenderer)));
|
|
600
603
|
function getStackFrameContextOverlay(stackFrame) {
|
|
601
604
|
return [
|
|
@@ -606,7 +609,8 @@ function getStackFrameContextOverlay(stackFrame) {
|
|
|
606
609
|
let StackFramesRenderer = class StackFramesRenderer {
|
|
607
610
|
static { StackFramesRenderer_1 = this; }
|
|
608
611
|
static { this.ID = 'stackFrame'; }
|
|
609
|
-
constructor(labelService, notificationService) {
|
|
612
|
+
constructor(hoverService, labelService, notificationService) {
|
|
613
|
+
this.hoverService = hoverService;
|
|
610
614
|
this.labelService = labelService;
|
|
611
615
|
this.notificationService = notificationService;
|
|
612
616
|
}
|
|
@@ -627,16 +631,15 @@ let StackFramesRenderer = class StackFramesRenderer {
|
|
|
627
631
|
}
|
|
628
632
|
renderElement(element, index, data) {
|
|
629
633
|
const stackFrame = element.element;
|
|
630
|
-
data.stackFrame.classList.toggle('disabled', !stackFrame.source || !stackFrame.source.available ||
|
|
634
|
+
data.stackFrame.classList.toggle('disabled', !stackFrame.source || !stackFrame.source.available || isFrameDeemphasized(stackFrame));
|
|
631
635
|
data.stackFrame.classList.toggle('label', stackFrame.presentationHint === 'label');
|
|
632
|
-
data.stackFrame.classList.toggle('subtle', stackFrame.presentationHint === 'subtle');
|
|
633
636
|
const hasActions = !!stackFrame.thread.session.capabilities.supportsRestartFrame && stackFrame.presentationHint !== 'label' && stackFrame.presentationHint !== 'subtle' && stackFrame.canRestart;
|
|
634
637
|
data.stackFrame.classList.toggle('has-actions', hasActions);
|
|
635
638
|
let title = stackFrame.source.inMemory ? stackFrame.source.uri.path : this.labelService.getUriLabel(stackFrame.source.uri);
|
|
636
639
|
if (stackFrame.source.raw.origin) {
|
|
637
640
|
title += `\n${stackFrame.source.raw.origin}`;
|
|
638
641
|
}
|
|
639
|
-
data.templateDisposable.add(
|
|
642
|
+
data.templateDisposable.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.file, title));
|
|
640
643
|
data.label.set(stackFrame.name, createMatches(element.filterData), stackFrame.name);
|
|
641
644
|
data.fileName.textContent = getSpecificSourceName(stackFrame);
|
|
642
645
|
if (stackFrame.range.startLineNumber !== undefined) {
|
|
@@ -670,13 +673,18 @@ let StackFramesRenderer = class StackFramesRenderer {
|
|
|
670
673
|
}
|
|
671
674
|
};
|
|
672
675
|
StackFramesRenderer = StackFramesRenderer_1 = ( (__decorate([
|
|
673
|
-
( (__param(0,
|
|
674
|
-
( (__param(1,
|
|
676
|
+
( (__param(0, IHoverService))),
|
|
677
|
+
( (__param(1, ILabelService))),
|
|
678
|
+
( (__param(2, INotificationService)))
|
|
675
679
|
], StackFramesRenderer)));
|
|
676
|
-
class ErrorsRenderer {
|
|
680
|
+
let ErrorsRenderer = class ErrorsRenderer {
|
|
681
|
+
static { ErrorsRenderer_1 = this; }
|
|
677
682
|
static { this.ID = 'error'; }
|
|
678
683
|
get templateId() {
|
|
679
|
-
return
|
|
684
|
+
return ErrorsRenderer_1.ID;
|
|
685
|
+
}
|
|
686
|
+
constructor(hoverService) {
|
|
687
|
+
this.hoverService = hoverService;
|
|
680
688
|
}
|
|
681
689
|
renderTemplate(container) {
|
|
682
690
|
const label = append(container, $('.error'));
|
|
@@ -685,14 +693,17 @@ class ErrorsRenderer {
|
|
|
685
693
|
renderElement(element, index, data) {
|
|
686
694
|
const error = element.element;
|
|
687
695
|
data.label.textContent = error;
|
|
688
|
-
data.templateDisposable.add(
|
|
696
|
+
data.templateDisposable.add(this.hoverService.setupUpdatableHover(getDefaultHoverDelegate('mouse'), data.label, error));
|
|
689
697
|
}
|
|
690
698
|
renderCompressedElements(node, index, templateData, height) {
|
|
691
699
|
throw ( (new Error('Method not implemented.')));
|
|
692
700
|
}
|
|
693
701
|
disposeTemplate(templateData) {
|
|
694
702
|
}
|
|
695
|
-
}
|
|
703
|
+
};
|
|
704
|
+
ErrorsRenderer = ErrorsRenderer_1 = ( (__decorate([
|
|
705
|
+
( (__param(0, IHoverService)))
|
|
706
|
+
], ErrorsRenderer)));
|
|
696
707
|
class LoadMoreRenderer {
|
|
697
708
|
static { this.ID = 'loadMore'; }
|
|
698
709
|
static { this.LABEL = ( localizeWithPath(_moduleId, 4, "Load More Stack Frames")); }
|
|
@@ -788,9 +799,6 @@ function isDebugModel(obj) {
|
|
|
788
799
|
function isDebugSession(obj) {
|
|
789
800
|
return obj && typeof obj.getAllThreads === 'function';
|
|
790
801
|
}
|
|
791
|
-
function isDeemphasized(frame) {
|
|
792
|
-
return frame.source.presentationHint === 'deemphasize' || frame.presentationHint === 'deemphasize';
|
|
793
|
-
}
|
|
794
802
|
class CallStackDataSource {
|
|
795
803
|
constructor(debugService) {
|
|
796
804
|
this.debugService = debugService;
|
|
@@ -832,7 +840,7 @@ class CallStackDataSource {
|
|
|
832
840
|
return this.getThreadCallstack(thread).then(children => {
|
|
833
841
|
const result = [];
|
|
834
842
|
children.forEach((child, index) => {
|
|
835
|
-
if (child instanceof StackFrame && child.source &&
|
|
843
|
+
if (child instanceof StackFrame && child.source && isFrameDeemphasized(child)) {
|
|
836
844
|
if (this.deemphasizedStackFramesToShow.indexOf(child) === -1) {
|
|
837
845
|
if (result.length) {
|
|
838
846
|
const last = result[result.length - 1];
|
|
@@ -842,7 +850,7 @@ class CallStackDataSource {
|
|
|
842
850
|
}
|
|
843
851
|
}
|
|
844
852
|
const nextChild = index < children.length - 1 ? children[index + 1] : undefined;
|
|
845
|
-
if (nextChild instanceof StackFrame && nextChild.source &&
|
|
853
|
+
if (nextChild instanceof StackFrame && nextChild.source && isFrameDeemphasized(nextChild)) {
|
|
846
854
|
result.push([child]);
|
|
847
855
|
return;
|
|
848
856
|
}
|