@codingame/monaco-vscode-debug-service-override 9.0.3 → 10.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/baseDebugView.js +160 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +22 -22
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +133 -136
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +12 -17
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +12 -13
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +23 -26
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +35 -36
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +21 -28
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +29 -42
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +10 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +1 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +11 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +55 -67
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +58 -58
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.js +3 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +5 -7
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +35 -42
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +1 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +17 -21
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +8 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +13 -15
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +8 -9
- package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +3 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +12 -13
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +66 -71
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +12 -14
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.js +4 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +2 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +40 -45
- package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.js +20 -22
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +5 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +39 -48
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +34 -35
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +9 -10
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +44 -44
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +24 -24
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +5 -4
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +11 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +0 -347
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
import { RGBA, Color } from 'vscode/vscode/vs/base/common/color';
|
|
2
|
-
import { ansiColorIdentifiers } from 'vscode/vscode/vs/workbench/contrib/terminal/common/terminalColorRegistry';
|
|
3
|
-
|
|
4
|
-
function handleANSIOutput(text, linkDetector, themeService, workspaceFolder) {
|
|
5
|
-
const root = document.createElement('span');
|
|
6
|
-
const textLength = text.length;
|
|
7
|
-
let styleNames = [];
|
|
8
|
-
let customFgColor;
|
|
9
|
-
let customBgColor;
|
|
10
|
-
let customUnderlineColor;
|
|
11
|
-
let colorsInverted = false;
|
|
12
|
-
let currentPos = 0;
|
|
13
|
-
let buffer = '';
|
|
14
|
-
while (currentPos < textLength) {
|
|
15
|
-
let sequenceFound = false;
|
|
16
|
-
if (text.charCodeAt(currentPos) === 27 && text.charAt(currentPos + 1) === '[') {
|
|
17
|
-
const startPos = currentPos;
|
|
18
|
-
currentPos += 2;
|
|
19
|
-
let ansiSequence = '';
|
|
20
|
-
while (currentPos < textLength) {
|
|
21
|
-
const char = text.charAt(currentPos);
|
|
22
|
-
ansiSequence += char;
|
|
23
|
-
currentPos++;
|
|
24
|
-
if (char.match(/^[ABCDHIJKfhmpsu]$/)) {
|
|
25
|
-
sequenceFound = true;
|
|
26
|
-
break;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
if (sequenceFound) {
|
|
30
|
-
appendStylizedStringToContainer(root, buffer, styleNames, linkDetector, workspaceFolder, customFgColor, customBgColor, customUnderlineColor);
|
|
31
|
-
buffer = '';
|
|
32
|
-
if (ansiSequence.match(/^(?:[34][0-8]|9[0-7]|10[0-7]|[0-9]|2[1-5,7-9]|[34]9|5[8,9]|1[0-9])(?:;[349][0-7]|10[0-7]|[013]|[245]|[34]9)?(?:;[012]?[0-9]?[0-9])*;?m$/)) {
|
|
33
|
-
const styleCodes = ( ansiSequence.slice(0, -1)
|
|
34
|
-
.split(';')
|
|
35
|
-
.filter(elem => elem !== '')
|
|
36
|
-
.map(elem => parseInt(elem, 10)));
|
|
37
|
-
if (styleCodes[0] === 38 || styleCodes[0] === 48 || styleCodes[0] === 58) {
|
|
38
|
-
const colorType = (styleCodes[0] === 38) ? 'foreground' : ((styleCodes[0] === 48) ? 'background' : 'underline');
|
|
39
|
-
if (styleCodes[1] === 5) {
|
|
40
|
-
set8BitColor(styleCodes, colorType);
|
|
41
|
-
}
|
|
42
|
-
else if (styleCodes[1] === 2) {
|
|
43
|
-
set24BitColor(styleCodes, colorType);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
setBasicFormatters(styleCodes);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
currentPos = startPos;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
if (sequenceFound === false) {
|
|
56
|
-
buffer += text.charAt(currentPos);
|
|
57
|
-
currentPos++;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
if (buffer) {
|
|
61
|
-
appendStylizedStringToContainer(root, buffer, styleNames, linkDetector, workspaceFolder, customFgColor, customBgColor, customUnderlineColor);
|
|
62
|
-
}
|
|
63
|
-
return root;
|
|
64
|
-
function changeColor(colorType, color) {
|
|
65
|
-
if (colorType === 'foreground') {
|
|
66
|
-
customFgColor = color;
|
|
67
|
-
}
|
|
68
|
-
else if (colorType === 'background') {
|
|
69
|
-
customBgColor = color;
|
|
70
|
-
}
|
|
71
|
-
else if (colorType === 'underline') {
|
|
72
|
-
customUnderlineColor = color;
|
|
73
|
-
}
|
|
74
|
-
styleNames = styleNames.filter(style => style !== `code-${colorType}-colored`);
|
|
75
|
-
if (color !== undefined) {
|
|
76
|
-
styleNames.push(`code-${colorType}-colored`);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
function reverseForegroundAndBackgroundColors() {
|
|
80
|
-
const oldFgColor = customFgColor;
|
|
81
|
-
changeColor('foreground', customBgColor);
|
|
82
|
-
changeColor('background', oldFgColor);
|
|
83
|
-
}
|
|
84
|
-
function setBasicFormatters(styleCodes) {
|
|
85
|
-
for (const code of styleCodes) {
|
|
86
|
-
switch (code) {
|
|
87
|
-
case 0: {
|
|
88
|
-
styleNames = [];
|
|
89
|
-
customFgColor = undefined;
|
|
90
|
-
customBgColor = undefined;
|
|
91
|
-
break;
|
|
92
|
-
}
|
|
93
|
-
case 1: {
|
|
94
|
-
styleNames = styleNames.filter(style => style !== `code-bold`);
|
|
95
|
-
styleNames.push('code-bold');
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
|
-
case 2: {
|
|
99
|
-
styleNames = styleNames.filter(style => style !== `code-dim`);
|
|
100
|
-
styleNames.push('code-dim');
|
|
101
|
-
break;
|
|
102
|
-
}
|
|
103
|
-
case 3: {
|
|
104
|
-
styleNames = styleNames.filter(style => style !== `code-italic`);
|
|
105
|
-
styleNames.push('code-italic');
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
case 4: {
|
|
109
|
-
styleNames = styleNames.filter(style => (style !== `code-underline` && style !== `code-double-underline`));
|
|
110
|
-
styleNames.push('code-underline');
|
|
111
|
-
break;
|
|
112
|
-
}
|
|
113
|
-
case 5: {
|
|
114
|
-
styleNames = styleNames.filter(style => style !== `code-blink`);
|
|
115
|
-
styleNames.push('code-blink');
|
|
116
|
-
break;
|
|
117
|
-
}
|
|
118
|
-
case 6: {
|
|
119
|
-
styleNames = styleNames.filter(style => style !== `code-rapid-blink`);
|
|
120
|
-
styleNames.push('code-rapid-blink');
|
|
121
|
-
break;
|
|
122
|
-
}
|
|
123
|
-
case 7: {
|
|
124
|
-
if (!colorsInverted) {
|
|
125
|
-
colorsInverted = true;
|
|
126
|
-
reverseForegroundAndBackgroundColors();
|
|
127
|
-
}
|
|
128
|
-
break;
|
|
129
|
-
}
|
|
130
|
-
case 8: {
|
|
131
|
-
styleNames = styleNames.filter(style => style !== `code-hidden`);
|
|
132
|
-
styleNames.push('code-hidden');
|
|
133
|
-
break;
|
|
134
|
-
}
|
|
135
|
-
case 9: {
|
|
136
|
-
styleNames = styleNames.filter(style => style !== `code-strike-through`);
|
|
137
|
-
styleNames.push('code-strike-through');
|
|
138
|
-
break;
|
|
139
|
-
}
|
|
140
|
-
case 10: {
|
|
141
|
-
styleNames = styleNames.filter(style => !style.startsWith('code-font'));
|
|
142
|
-
break;
|
|
143
|
-
}
|
|
144
|
-
case 11:
|
|
145
|
-
case 12:
|
|
146
|
-
case 13:
|
|
147
|
-
case 14:
|
|
148
|
-
case 15:
|
|
149
|
-
case 16:
|
|
150
|
-
case 17:
|
|
151
|
-
case 18:
|
|
152
|
-
case 19:
|
|
153
|
-
case 20: {
|
|
154
|
-
styleNames = styleNames.filter(style => !style.startsWith('code-font'));
|
|
155
|
-
styleNames.push(`code-font-${code - 10}`);
|
|
156
|
-
break;
|
|
157
|
-
}
|
|
158
|
-
case 21: {
|
|
159
|
-
styleNames = styleNames.filter(style => (style !== `code-underline` && style !== `code-double-underline`));
|
|
160
|
-
styleNames.push('code-double-underline');
|
|
161
|
-
break;
|
|
162
|
-
}
|
|
163
|
-
case 22: {
|
|
164
|
-
styleNames = styleNames.filter(style => (style !== `code-bold` && style !== `code-dim`));
|
|
165
|
-
break;
|
|
166
|
-
}
|
|
167
|
-
case 23: {
|
|
168
|
-
styleNames = styleNames.filter(style => (style !== `code-italic` && style !== `code-font-10`));
|
|
169
|
-
break;
|
|
170
|
-
}
|
|
171
|
-
case 24: {
|
|
172
|
-
styleNames = styleNames.filter(style => (style !== `code-underline` && style !== `code-double-underline`));
|
|
173
|
-
break;
|
|
174
|
-
}
|
|
175
|
-
case 25: {
|
|
176
|
-
styleNames = styleNames.filter(style => (style !== `code-blink` && style !== `code-rapid-blink`));
|
|
177
|
-
break;
|
|
178
|
-
}
|
|
179
|
-
case 27: {
|
|
180
|
-
if (colorsInverted) {
|
|
181
|
-
colorsInverted = false;
|
|
182
|
-
reverseForegroundAndBackgroundColors();
|
|
183
|
-
}
|
|
184
|
-
break;
|
|
185
|
-
}
|
|
186
|
-
case 28: {
|
|
187
|
-
styleNames = styleNames.filter(style => style !== `code-hidden`);
|
|
188
|
-
break;
|
|
189
|
-
}
|
|
190
|
-
case 29: {
|
|
191
|
-
styleNames = styleNames.filter(style => style !== `code-strike-through`);
|
|
192
|
-
break;
|
|
193
|
-
}
|
|
194
|
-
case 53: {
|
|
195
|
-
styleNames = styleNames.filter(style => style !== `code-overline`);
|
|
196
|
-
styleNames.push('code-overline');
|
|
197
|
-
break;
|
|
198
|
-
}
|
|
199
|
-
case 55: {
|
|
200
|
-
styleNames = styleNames.filter(style => style !== `code-overline`);
|
|
201
|
-
break;
|
|
202
|
-
}
|
|
203
|
-
case 39: {
|
|
204
|
-
changeColor('foreground', undefined);
|
|
205
|
-
break;
|
|
206
|
-
}
|
|
207
|
-
case 49: {
|
|
208
|
-
changeColor('background', undefined);
|
|
209
|
-
break;
|
|
210
|
-
}
|
|
211
|
-
case 59: {
|
|
212
|
-
changeColor('underline', undefined);
|
|
213
|
-
break;
|
|
214
|
-
}
|
|
215
|
-
case 73: {
|
|
216
|
-
styleNames = styleNames.filter(style => (style !== `code-superscript` && style !== `code-subscript`));
|
|
217
|
-
styleNames.push('code-superscript');
|
|
218
|
-
break;
|
|
219
|
-
}
|
|
220
|
-
case 74: {
|
|
221
|
-
styleNames = styleNames.filter(style => (style !== `code-superscript` && style !== `code-subscript`));
|
|
222
|
-
styleNames.push('code-subscript');
|
|
223
|
-
break;
|
|
224
|
-
}
|
|
225
|
-
case 75: {
|
|
226
|
-
styleNames = styleNames.filter(style => (style !== `code-superscript` && style !== `code-subscript`));
|
|
227
|
-
break;
|
|
228
|
-
}
|
|
229
|
-
default: {
|
|
230
|
-
setBasicColor(code);
|
|
231
|
-
break;
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
236
|
-
function set24BitColor(styleCodes, colorType) {
|
|
237
|
-
if (styleCodes.length >= 5 &&
|
|
238
|
-
styleCodes[2] >= 0 && styleCodes[2] <= 255 &&
|
|
239
|
-
styleCodes[3] >= 0 && styleCodes[3] <= 255 &&
|
|
240
|
-
styleCodes[4] >= 0 && styleCodes[4] <= 255) {
|
|
241
|
-
const customColor = ( new RGBA(styleCodes[2], styleCodes[3], styleCodes[4]));
|
|
242
|
-
changeColor(colorType, customColor);
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
function set8BitColor(styleCodes, colorType) {
|
|
246
|
-
let colorNumber = styleCodes[2];
|
|
247
|
-
const color = calcANSI8bitColor(colorNumber);
|
|
248
|
-
if (color) {
|
|
249
|
-
changeColor(colorType, color);
|
|
250
|
-
}
|
|
251
|
-
else if (colorNumber >= 0 && colorNumber <= 15) {
|
|
252
|
-
if (colorType === 'underline') {
|
|
253
|
-
const theme = themeService.getColorTheme();
|
|
254
|
-
const colorName = ansiColorIdentifiers[colorNumber];
|
|
255
|
-
const color = theme.getColor(colorName);
|
|
256
|
-
if (color) {
|
|
257
|
-
changeColor(colorType, color.rgba);
|
|
258
|
-
}
|
|
259
|
-
return;
|
|
260
|
-
}
|
|
261
|
-
colorNumber += 30;
|
|
262
|
-
if (colorNumber >= 38) {
|
|
263
|
-
colorNumber += 52;
|
|
264
|
-
}
|
|
265
|
-
if (colorType === 'background') {
|
|
266
|
-
colorNumber += 10;
|
|
267
|
-
}
|
|
268
|
-
setBasicColor(colorNumber);
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
function setBasicColor(styleCode) {
|
|
272
|
-
const theme = themeService.getColorTheme();
|
|
273
|
-
let colorType;
|
|
274
|
-
let colorIndex;
|
|
275
|
-
if (styleCode >= 30 && styleCode <= 37) {
|
|
276
|
-
colorIndex = styleCode - 30;
|
|
277
|
-
colorType = 'foreground';
|
|
278
|
-
}
|
|
279
|
-
else if (styleCode >= 90 && styleCode <= 97) {
|
|
280
|
-
colorIndex = (styleCode - 90) + 8;
|
|
281
|
-
colorType = 'foreground';
|
|
282
|
-
}
|
|
283
|
-
else if (styleCode >= 40 && styleCode <= 47) {
|
|
284
|
-
colorIndex = styleCode - 40;
|
|
285
|
-
colorType = 'background';
|
|
286
|
-
}
|
|
287
|
-
else if (styleCode >= 100 && styleCode <= 107) {
|
|
288
|
-
colorIndex = (styleCode - 100) + 8;
|
|
289
|
-
colorType = 'background';
|
|
290
|
-
}
|
|
291
|
-
if (colorIndex !== undefined && colorType) {
|
|
292
|
-
const colorName = ansiColorIdentifiers[colorIndex];
|
|
293
|
-
const color = theme.getColor(colorName);
|
|
294
|
-
if (color) {
|
|
295
|
-
changeColor(colorType, color.rgba);
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
function appendStylizedStringToContainer(root, stringContent, cssClasses, linkDetector, workspaceFolder, customTextColor, customBackgroundColor, customUnderlineColor) {
|
|
301
|
-
if (!root || !stringContent) {
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
const container = linkDetector.linkify(stringContent, true, workspaceFolder);
|
|
305
|
-
container.className = cssClasses.join(' ');
|
|
306
|
-
if (customTextColor) {
|
|
307
|
-
container.style.color =
|
|
308
|
-
Color.Format.CSS.formatRGB(( new Color(customTextColor)));
|
|
309
|
-
}
|
|
310
|
-
if (customBackgroundColor) {
|
|
311
|
-
container.style.backgroundColor =
|
|
312
|
-
Color.Format.CSS.formatRGB(( new Color(customBackgroundColor)));
|
|
313
|
-
}
|
|
314
|
-
if (customUnderlineColor) {
|
|
315
|
-
container.style.textDecorationColor =
|
|
316
|
-
Color.Format.CSS.formatRGB(( new Color(customUnderlineColor)));
|
|
317
|
-
}
|
|
318
|
-
root.appendChild(container);
|
|
319
|
-
}
|
|
320
|
-
function calcANSI8bitColor(colorNumber) {
|
|
321
|
-
if (colorNumber % 1 !== 0) {
|
|
322
|
-
return;
|
|
323
|
-
}
|
|
324
|
-
if (colorNumber >= 16 && colorNumber <= 231) {
|
|
325
|
-
colorNumber -= 16;
|
|
326
|
-
let blue = colorNumber % 6;
|
|
327
|
-
colorNumber = (colorNumber - blue) / 6;
|
|
328
|
-
let green = colorNumber % 6;
|
|
329
|
-
colorNumber = (colorNumber - green) / 6;
|
|
330
|
-
let red = colorNumber;
|
|
331
|
-
const convFactor = 255 / 5;
|
|
332
|
-
blue = Math.round(blue * convFactor);
|
|
333
|
-
green = Math.round(green * convFactor);
|
|
334
|
-
red = Math.round(red * convFactor);
|
|
335
|
-
return ( new RGBA(red, green, blue));
|
|
336
|
-
}
|
|
337
|
-
else if (colorNumber >= 232 && colorNumber <= 255) {
|
|
338
|
-
colorNumber -= 232;
|
|
339
|
-
const colorLevel = Math.round(colorNumber / 23 * 255);
|
|
340
|
-
return ( new RGBA(colorLevel, colorLevel, colorLevel));
|
|
341
|
-
}
|
|
342
|
-
else {
|
|
343
|
-
return;
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
export { appendStylizedStringToContainer, calcANSI8bitColor, handleANSIOutput };
|