@codingame/monaco-vscode-debug-service-override 4.5.2 → 5.0.0
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
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
2
|
-
import { matchesFuzzy } from 'vscode/vscode/vs/base/common/filters';
|
|
3
|
-
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
4
|
-
import { REPL_VIEW_ID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
5
|
-
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
6
|
-
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
7
|
-
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
8
|
-
import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands.service';
|
|
9
|
-
|
|
10
|
-
const _moduleId = "vs/workbench/contrib/debug/browser/debugSessionPicker";
|
|
11
|
-
async function showDebugSessionMenu(accessor, selectAndStartID) {
|
|
12
|
-
const quickInputService = accessor.get(IQuickInputService);
|
|
13
|
-
const debugService = accessor.get(IDebugService);
|
|
14
|
-
const viewsService = accessor.get(IViewsService);
|
|
15
|
-
const commandService = accessor.get(ICommandService);
|
|
16
|
-
const localDisposableStore = ( (new DisposableStore()));
|
|
17
|
-
const quickPick = quickInputService.createQuickPick();
|
|
18
|
-
localDisposableStore.add(quickPick);
|
|
19
|
-
quickPick.matchOnLabel = quickPick.matchOnDescription = quickPick.matchOnDetail = quickPick.sortByLabel = false;
|
|
20
|
-
quickPick.placeholder = ( localizeWithPath(_moduleId, 0, 'Search debug sessions by name'));
|
|
21
|
-
const pickItems = _getPicksAndActiveItem(quickPick.value, selectAndStartID, debugService, viewsService, commandService);
|
|
22
|
-
quickPick.items = pickItems.picks;
|
|
23
|
-
quickPick.activeItems = pickItems.activeItems;
|
|
24
|
-
localDisposableStore.add(quickPick.onDidChangeValue(async () => {
|
|
25
|
-
quickPick.items = _getPicksAndActiveItem(quickPick.value, selectAndStartID, debugService, viewsService, commandService).picks;
|
|
26
|
-
}));
|
|
27
|
-
localDisposableStore.add(quickPick.onDidAccept(() => {
|
|
28
|
-
const selectedItem = quickPick.selectedItems[0];
|
|
29
|
-
selectedItem.accept();
|
|
30
|
-
quickPick.hide();
|
|
31
|
-
localDisposableStore.dispose();
|
|
32
|
-
}));
|
|
33
|
-
quickPick.show();
|
|
34
|
-
}
|
|
35
|
-
function _getPicksAndActiveItem(filter, selectAndStartID, debugService, viewsService, commandService) {
|
|
36
|
-
const debugConsolePicks = [];
|
|
37
|
-
const headerSessions = [];
|
|
38
|
-
const currSession = debugService.getViewModel().focusedSession;
|
|
39
|
-
const sessions = debugService.getModel().getSessions(false);
|
|
40
|
-
const activeItems = [];
|
|
41
|
-
sessions.forEach((session) => {
|
|
42
|
-
if (session.compact && session.parentSession) {
|
|
43
|
-
headerSessions.push(session.parentSession);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
sessions.forEach((session) => {
|
|
47
|
-
const isHeader = headerSessions.includes(session);
|
|
48
|
-
if (!session.parentSession) {
|
|
49
|
-
debugConsolePicks.push({ type: 'separator', label: isHeader ? session.name : undefined });
|
|
50
|
-
}
|
|
51
|
-
if (!isHeader) {
|
|
52
|
-
const pick = _createPick(session, filter, debugService, viewsService);
|
|
53
|
-
if (pick) {
|
|
54
|
-
debugConsolePicks.push(pick);
|
|
55
|
-
if (session.getId() === currSession?.getId()) {
|
|
56
|
-
activeItems.push(pick);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
if (debugConsolePicks.length) {
|
|
62
|
-
debugConsolePicks.push({ type: 'separator' });
|
|
63
|
-
}
|
|
64
|
-
const createDebugSessionLabel = ( localizeWithPath(_moduleId, 1, 'Start a New Debug Session'));
|
|
65
|
-
debugConsolePicks.push({
|
|
66
|
-
label: `$(plus) ${createDebugSessionLabel}`,
|
|
67
|
-
ariaLabel: createDebugSessionLabel,
|
|
68
|
-
accept: () => commandService.executeCommand(selectAndStartID)
|
|
69
|
-
});
|
|
70
|
-
return { picks: debugConsolePicks, activeItems };
|
|
71
|
-
}
|
|
72
|
-
function _getSessionInfo(session) {
|
|
73
|
-
const label = (!session.configuration.name.length) ? session.name : session.configuration.name;
|
|
74
|
-
const parentName = session.compact ? undefined : session.parentSession?.configuration.name;
|
|
75
|
-
let description = '';
|
|
76
|
-
let ariaLabel = '';
|
|
77
|
-
if (parentName) {
|
|
78
|
-
ariaLabel = ( localizeWithPath(_moduleId, 2, 'Session {0} spawned from {1}', label, parentName));
|
|
79
|
-
description = parentName;
|
|
80
|
-
}
|
|
81
|
-
return { label, description, ariaLabel };
|
|
82
|
-
}
|
|
83
|
-
function _createPick(session, filter, debugService, viewsService, commandService) {
|
|
84
|
-
const pickInfo = _getSessionInfo(session);
|
|
85
|
-
const highlights = matchesFuzzy(filter, pickInfo.label, true);
|
|
86
|
-
if (highlights) {
|
|
87
|
-
return {
|
|
88
|
-
label: pickInfo.label,
|
|
89
|
-
description: pickInfo.description,
|
|
90
|
-
ariaLabel: pickInfo.ariaLabel,
|
|
91
|
-
highlights: { label: highlights },
|
|
92
|
-
accept: () => {
|
|
93
|
-
debugService.focusStackFrame(undefined, undefined, session, { explicit: true });
|
|
94
|
-
if (!viewsService.isViewVisible(REPL_VIEW_ID)) {
|
|
95
|
-
viewsService.openView(REPL_VIEW_ID, true);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
return undefined;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export { showDebugSessionMenu };
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { localizeWithPath } from 'vscode/vscode/vs/nls';
|
|
2
|
-
import { matchesFuzzy } from 'vscode/vscode/vs/base/common/filters';
|
|
3
|
-
import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput.service';
|
|
4
|
-
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
5
|
-
import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/common/editorService.service';
|
|
6
|
-
import { getIconClasses } from 'vscode/vscode/vs/editor/common/services/getIconClasses';
|
|
7
|
-
import { IModelService } from 'vscode/vscode/vs/editor/common/services/model';
|
|
8
|
-
import { ILanguageService } from 'vscode/vscode/vs/editor/common/languages/language';
|
|
9
|
-
import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
10
|
-
import { dirname } from 'vscode/vscode/vs/base/common/resources';
|
|
11
|
-
import { ILabelService } from 'vscode/vscode/vs/platform/label/common/label.service';
|
|
12
|
-
|
|
13
|
-
const _moduleId = "vs/workbench/contrib/debug/common/loadedScriptsPicker";
|
|
14
|
-
async function showLoadedScriptMenu(accessor) {
|
|
15
|
-
const quickInputService = accessor.get(IQuickInputService);
|
|
16
|
-
const debugService = accessor.get(IDebugService);
|
|
17
|
-
const editorService = accessor.get(IEditorService);
|
|
18
|
-
const sessions = debugService.getModel().getSessions(false);
|
|
19
|
-
const modelService = accessor.get(IModelService);
|
|
20
|
-
const languageService = accessor.get(ILanguageService);
|
|
21
|
-
const labelService = accessor.get(ILabelService);
|
|
22
|
-
const localDisposableStore = ( (new DisposableStore()));
|
|
23
|
-
const quickPick = quickInputService.createQuickPick();
|
|
24
|
-
localDisposableStore.add(quickPick);
|
|
25
|
-
quickPick.matchOnLabel = quickPick.matchOnDescription = quickPick.matchOnDetail = quickPick.sortByLabel = false;
|
|
26
|
-
quickPick.placeholder = ( localizeWithPath(_moduleId, 0, "Search loaded scripts by name"));
|
|
27
|
-
quickPick.items = await _getPicks(quickPick.value, sessions, editorService, modelService, languageService, labelService);
|
|
28
|
-
localDisposableStore.add(quickPick.onDidChangeValue(async () => {
|
|
29
|
-
quickPick.items = await _getPicks(quickPick.value, sessions, editorService, modelService, languageService, labelService);
|
|
30
|
-
}));
|
|
31
|
-
localDisposableStore.add(quickPick.onDidAccept(() => {
|
|
32
|
-
const selectedItem = quickPick.selectedItems[0];
|
|
33
|
-
selectedItem.accept();
|
|
34
|
-
quickPick.hide();
|
|
35
|
-
localDisposableStore.dispose();
|
|
36
|
-
}));
|
|
37
|
-
quickPick.show();
|
|
38
|
-
}
|
|
39
|
-
async function _getPicksFromSession(session, filter, editorService, modelService, languageService, labelService) {
|
|
40
|
-
const items = [];
|
|
41
|
-
items.push({ type: 'separator', label: session.name });
|
|
42
|
-
const sources = await session.getLoadedSources();
|
|
43
|
-
sources.forEach((element) => {
|
|
44
|
-
const pick = _createPick(element, filter, editorService, modelService, languageService, labelService);
|
|
45
|
-
if (pick) {
|
|
46
|
-
items.push(pick);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
return items;
|
|
50
|
-
}
|
|
51
|
-
async function _getPicks(filter, sessions, editorService, modelService, languageService, labelService) {
|
|
52
|
-
const loadedScriptPicks = [];
|
|
53
|
-
const picks = await Promise.all(( (sessions.map(
|
|
54
|
-
(session) => _getPicksFromSession(session, filter, editorService, modelService, languageService, labelService)
|
|
55
|
-
))));
|
|
56
|
-
for (const row of picks) {
|
|
57
|
-
for (const elem of row) {
|
|
58
|
-
loadedScriptPicks.push(elem);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return loadedScriptPicks;
|
|
62
|
-
}
|
|
63
|
-
function _createPick(source, filter, editorService, modelService, languageService, labelService) {
|
|
64
|
-
const label = labelService.getUriBasenameLabel(source.uri);
|
|
65
|
-
const desc = labelService.getUriLabel(dirname(source.uri));
|
|
66
|
-
const labelHighlights = matchesFuzzy(filter, label, true);
|
|
67
|
-
const descHighlights = matchesFuzzy(filter, desc, true);
|
|
68
|
-
if (labelHighlights || descHighlights) {
|
|
69
|
-
return {
|
|
70
|
-
label,
|
|
71
|
-
description: desc === '.' ? undefined : desc,
|
|
72
|
-
highlights: { label: labelHighlights ?? undefined, description: descHighlights ?? undefined },
|
|
73
|
-
iconClasses: getIconClasses(modelService, languageService, source.uri),
|
|
74
|
-
accept: () => {
|
|
75
|
-
if (source.available) {
|
|
76
|
-
source.openInEditor(editorService, { startLineNumber: 0, startColumn: 0, endLineNumber: 0, endColumn: 0 });
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
return undefined;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export { showLoadedScriptMenu };
|