@codingame/monaco-vscode-debug-service-override 4.5.1 → 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/platform/debug/common/extensionHostDebugIpc.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +140 -177
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +260 -531
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +34 -52
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +44 -71
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +116 -120
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +8 -11
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +81 -140
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +73 -76
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +30 -30
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +17 -49
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +143 -135
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +220 -177
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +9 -17
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +70 -111
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +84 -65
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +85 -57
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +50 -75
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +13 -29
- package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +22 -51
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +52 -78
- 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/rawDebugSession.js +60 -76
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +29 -54
- package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +4 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +42 -55
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +17 -16
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +84 -110
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +50 -88
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +60 -60
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +14 -28
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +12 -15
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +71 -146
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +1 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +92 -111
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +5 -12
- package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +42 -22
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +0 -1042
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +0 -116
- package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +0 -87
|
@@ -16,6 +16,7 @@ import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs
|
|
|
16
16
|
import { Schemas } from 'vscode/vscode/vs/base/common/network';
|
|
17
17
|
import Severity$1 from 'vscode/vscode/vs/base/common/severity';
|
|
18
18
|
|
|
19
|
+
const _moduleId = "vs/workbench/contrib/debug/browser/rawDebugSession";
|
|
19
20
|
let RawDebugSession = class RawDebugSession {
|
|
20
21
|
constructor(debugAdapter, dbgr, sessionId, name, extensionHostDebugService, openerService, notificationService, dialogSerivce) {
|
|
21
22
|
this.dbgr = dbgr;
|
|
@@ -33,23 +34,23 @@ let RawDebugSession = class RawDebugSession {
|
|
|
33
34
|
this.firedAdapterExitEvent = false;
|
|
34
35
|
this.startTime = 0;
|
|
35
36
|
this.didReceiveStoppedEvent = false;
|
|
36
|
-
this._onDidInitialize = ( new Emitter());
|
|
37
|
-
this._onDidStop = ( new Emitter());
|
|
38
|
-
this._onDidContinued = ( new Emitter());
|
|
39
|
-
this._onDidTerminateDebugee = ( new Emitter());
|
|
40
|
-
this._onDidExitDebugee = ( new Emitter());
|
|
41
|
-
this._onDidThread = ( new Emitter());
|
|
42
|
-
this._onDidOutput = ( new Emitter());
|
|
43
|
-
this._onDidBreakpoint = ( new Emitter());
|
|
44
|
-
this._onDidLoadedSource = ( new Emitter());
|
|
45
|
-
this._onDidProgressStart = ( new Emitter());
|
|
46
|
-
this._onDidProgressUpdate = ( new Emitter());
|
|
47
|
-
this._onDidProgressEnd = ( new Emitter());
|
|
48
|
-
this._onDidInvalidated = ( new Emitter());
|
|
49
|
-
this._onDidInvalidateMemory = ( new Emitter());
|
|
50
|
-
this._onDidCustomEvent = ( new Emitter());
|
|
51
|
-
this._onDidEvent = ( new Emitter());
|
|
52
|
-
this._onDidExitAdapter = ( new Emitter());
|
|
37
|
+
this._onDidInitialize = ( (new Emitter()));
|
|
38
|
+
this._onDidStop = ( (new Emitter()));
|
|
39
|
+
this._onDidContinued = ( (new Emitter()));
|
|
40
|
+
this._onDidTerminateDebugee = ( (new Emitter()));
|
|
41
|
+
this._onDidExitDebugee = ( (new Emitter()));
|
|
42
|
+
this._onDidThread = ( (new Emitter()));
|
|
43
|
+
this._onDidOutput = ( (new Emitter()));
|
|
44
|
+
this._onDidBreakpoint = ( (new Emitter()));
|
|
45
|
+
this._onDidLoadedSource = ( (new Emitter()));
|
|
46
|
+
this._onDidProgressStart = ( (new Emitter()));
|
|
47
|
+
this._onDidProgressUpdate = ( (new Emitter()));
|
|
48
|
+
this._onDidProgressEnd = ( (new Emitter()));
|
|
49
|
+
this._onDidInvalidated = ( (new Emitter()));
|
|
50
|
+
this._onDidInvalidateMemory = ( (new Emitter()));
|
|
51
|
+
this._onDidCustomEvent = ( (new Emitter()));
|
|
52
|
+
this._onDidEvent = ( (new Emitter()));
|
|
53
|
+
this._onDidExitAdapter = ( (new Emitter()));
|
|
53
54
|
this.stoppedSinceLastStep = false;
|
|
54
55
|
this.toDispose = [];
|
|
55
56
|
this.debugAdapter = debugAdapter;
|
|
@@ -59,7 +60,7 @@ let RawDebugSession = class RawDebugSession {
|
|
|
59
60
|
}));
|
|
60
61
|
this.toDispose.push(this.debugAdapter.onExit(code => {
|
|
61
62
|
if (code !== 0) {
|
|
62
|
-
this.shutdown(( new Error(`exit code: ${code}`)));
|
|
63
|
+
this.shutdown(( (new Error(`exit code: ${code}`))));
|
|
63
64
|
}
|
|
64
65
|
else {
|
|
65
66
|
this.shutdown();
|
|
@@ -193,14 +194,10 @@ let RawDebugSession = class RawDebugSession {
|
|
|
193
194
|
}
|
|
194
195
|
async start() {
|
|
195
196
|
if (!this.debugAdapter) {
|
|
196
|
-
return Promise.reject(( new Error(( localizeWithPath(
|
|
197
|
-
'vs/workbench/contrib/debug/browser/rawDebugSession',
|
|
198
|
-
'noDebugAdapterStart',
|
|
199
|
-
"No debug adapter, can not start debug session."
|
|
200
|
-
)))));
|
|
197
|
+
return Promise.reject(( (new Error(( localizeWithPath(_moduleId, 0, "No debug adapter, can not start debug session."))))));
|
|
201
198
|
}
|
|
202
199
|
await this.debugAdapter.startSession();
|
|
203
|
-
this.startTime = ( new Date()).getTime();
|
|
200
|
+
this.startTime = ( (new Date())).getTime();
|
|
204
201
|
}
|
|
205
202
|
async initialize(args) {
|
|
206
203
|
const response = await this.send('initialize', args, undefined, undefined, false);
|
|
@@ -229,13 +226,13 @@ let RawDebugSession = class RawDebugSession {
|
|
|
229
226
|
}
|
|
230
227
|
return this.disconnect({ terminateDebuggee: true, restart });
|
|
231
228
|
}
|
|
232
|
-
return Promise.reject(( new Error('terminated not supported')));
|
|
229
|
+
return Promise.reject(( (new Error('terminated not supported'))));
|
|
233
230
|
}
|
|
234
231
|
restart(args) {
|
|
235
232
|
if (this.capabilities.supportsRestartRequest) {
|
|
236
233
|
return this.send('restart', args);
|
|
237
234
|
}
|
|
238
|
-
return Promise.reject(( new Error('restart not supported')));
|
|
235
|
+
return Promise.reject(( (new Error('restart not supported'))));
|
|
239
236
|
}
|
|
240
237
|
async next(args) {
|
|
241
238
|
this.stoppedSinceLastStep = false;
|
|
@@ -279,19 +276,19 @@ let RawDebugSession = class RawDebugSession {
|
|
|
279
276
|
if (this.capabilities.supportsTerminateThreadsRequest) {
|
|
280
277
|
return this.send('terminateThreads', args);
|
|
281
278
|
}
|
|
282
|
-
return Promise.reject(( new Error('terminateThreads not supported')));
|
|
279
|
+
return Promise.reject(( (new Error('terminateThreads not supported'))));
|
|
283
280
|
}
|
|
284
281
|
setVariable(args) {
|
|
285
282
|
if (this.capabilities.supportsSetVariable) {
|
|
286
283
|
return this.send('setVariable', args);
|
|
287
284
|
}
|
|
288
|
-
return Promise.reject(( new Error('setVariable not supported')));
|
|
285
|
+
return Promise.reject(( (new Error('setVariable not supported'))));
|
|
289
286
|
}
|
|
290
287
|
setExpression(args) {
|
|
291
288
|
if (this.capabilities.supportsSetExpression) {
|
|
292
289
|
return this.send('setExpression', args);
|
|
293
290
|
}
|
|
294
|
-
return Promise.reject(( new Error('setExpression not supported')));
|
|
291
|
+
return Promise.reject(( (new Error('setExpression not supported'))));
|
|
295
292
|
}
|
|
296
293
|
async restartFrame(args, threadId) {
|
|
297
294
|
if (this.capabilities.supportsRestartFrame) {
|
|
@@ -302,19 +299,19 @@ let RawDebugSession = class RawDebugSession {
|
|
|
302
299
|
}
|
|
303
300
|
return response;
|
|
304
301
|
}
|
|
305
|
-
return Promise.reject(( new Error('restartFrame not supported')));
|
|
302
|
+
return Promise.reject(( (new Error('restartFrame not supported'))));
|
|
306
303
|
}
|
|
307
304
|
stepInTargets(args) {
|
|
308
305
|
if (this.capabilities.supportsStepInTargetsRequest) {
|
|
309
306
|
return this.send('stepInTargets', args);
|
|
310
307
|
}
|
|
311
|
-
return Promise.reject(( new Error('stepInTargets not supported')));
|
|
308
|
+
return Promise.reject(( (new Error('stepInTargets not supported'))));
|
|
312
309
|
}
|
|
313
310
|
completions(args, token) {
|
|
314
311
|
if (this.capabilities.supportsCompletionsRequest) {
|
|
315
312
|
return this.send('completions', args, token);
|
|
316
313
|
}
|
|
317
|
-
return Promise.reject(( new Error('completions not supported')));
|
|
314
|
+
return Promise.reject(( (new Error('completions not supported'))));
|
|
318
315
|
}
|
|
319
316
|
setBreakpoints(args) {
|
|
320
317
|
return this.send('setBreakpoints', args);
|
|
@@ -323,19 +320,19 @@ let RawDebugSession = class RawDebugSession {
|
|
|
323
320
|
if (this.capabilities.supportsFunctionBreakpoints) {
|
|
324
321
|
return this.send('setFunctionBreakpoints', args);
|
|
325
322
|
}
|
|
326
|
-
return Promise.reject(( new Error('setFunctionBreakpoints not supported')));
|
|
323
|
+
return Promise.reject(( (new Error('setFunctionBreakpoints not supported'))));
|
|
327
324
|
}
|
|
328
325
|
dataBreakpointInfo(args) {
|
|
329
326
|
if (this.capabilities.supportsDataBreakpoints) {
|
|
330
327
|
return this.send('dataBreakpointInfo', args);
|
|
331
328
|
}
|
|
332
|
-
return Promise.reject(( new Error('dataBreakpointInfo not supported')));
|
|
329
|
+
return Promise.reject(( (new Error('dataBreakpointInfo not supported'))));
|
|
333
330
|
}
|
|
334
331
|
setDataBreakpoints(args) {
|
|
335
332
|
if (this.capabilities.supportsDataBreakpoints) {
|
|
336
333
|
return this.send('setDataBreakpoints', args);
|
|
337
334
|
}
|
|
338
|
-
return Promise.reject(( new Error('setDataBreakpoints not supported')));
|
|
335
|
+
return Promise.reject(( (new Error('setDataBreakpoints not supported'))));
|
|
339
336
|
}
|
|
340
337
|
setExceptionBreakpoints(args) {
|
|
341
338
|
return this.send('setExceptionBreakpoints', args);
|
|
@@ -344,13 +341,13 @@ let RawDebugSession = class RawDebugSession {
|
|
|
344
341
|
if (this.capabilities.supportsBreakpointLocationsRequest) {
|
|
345
342
|
return this.send('breakpointLocations', args);
|
|
346
343
|
}
|
|
347
|
-
return Promise.reject(( new Error('breakpointLocations is not supported')));
|
|
344
|
+
return Promise.reject(( (new Error('breakpointLocations is not supported'))));
|
|
348
345
|
}
|
|
349
346
|
configurationDone() {
|
|
350
347
|
if (this.capabilities.supportsConfigurationDoneRequest) {
|
|
351
348
|
return this.send('configurationDone', null);
|
|
352
349
|
}
|
|
353
|
-
return Promise.reject(( new Error('configurationDone not supported')));
|
|
350
|
+
return Promise.reject(( (new Error('configurationDone not supported'))));
|
|
354
351
|
}
|
|
355
352
|
stackTrace(args, token) {
|
|
356
353
|
return this.send('stackTrace', args, token);
|
|
@@ -359,7 +356,7 @@ let RawDebugSession = class RawDebugSession {
|
|
|
359
356
|
if (this.capabilities.supportsExceptionInfoRequest) {
|
|
360
357
|
return this.send('exceptionInfo', args);
|
|
361
358
|
}
|
|
362
|
-
return Promise.reject(( new Error('exceptionInfo not supported')));
|
|
359
|
+
return Promise.reject(( (new Error('exceptionInfo not supported'))));
|
|
363
360
|
}
|
|
364
361
|
scopes(args, token) {
|
|
365
362
|
return this.send('scopes', args, token);
|
|
@@ -374,7 +371,7 @@ let RawDebugSession = class RawDebugSession {
|
|
|
374
371
|
if (this.capabilities.supportsLoadedSourcesRequest) {
|
|
375
372
|
return this.send('loadedSources', args);
|
|
376
373
|
}
|
|
377
|
-
return Promise.reject(( new Error('loadedSources not supported')));
|
|
374
|
+
return Promise.reject(( (new Error('loadedSources not supported'))));
|
|
378
375
|
}
|
|
379
376
|
threads() {
|
|
380
377
|
return this.send('threads', null);
|
|
@@ -391,7 +388,7 @@ let RawDebugSession = class RawDebugSession {
|
|
|
391
388
|
}
|
|
392
389
|
return response;
|
|
393
390
|
}
|
|
394
|
-
return Promise.reject(( new Error('stepBack not supported')));
|
|
391
|
+
return Promise.reject(( (new Error('stepBack not supported'))));
|
|
395
392
|
}
|
|
396
393
|
async reverseContinue(args) {
|
|
397
394
|
if (this.capabilities.supportsStepBack) {
|
|
@@ -402,13 +399,13 @@ let RawDebugSession = class RawDebugSession {
|
|
|
402
399
|
}
|
|
403
400
|
return response;
|
|
404
401
|
}
|
|
405
|
-
return Promise.reject(( new Error('reverseContinue not supported')));
|
|
402
|
+
return Promise.reject(( (new Error('reverseContinue not supported'))));
|
|
406
403
|
}
|
|
407
404
|
gotoTargets(args) {
|
|
408
405
|
if (this.capabilities.supportsGotoTargetsRequest) {
|
|
409
406
|
return this.send('gotoTargets', args);
|
|
410
407
|
}
|
|
411
|
-
return Promise.reject(( new Error('gotoTargets is not supported')));
|
|
408
|
+
return Promise.reject(( (new Error('gotoTargets is not supported'))));
|
|
412
409
|
}
|
|
413
410
|
async goto(args) {
|
|
414
411
|
if (this.capabilities.supportsGotoTargetsRequest) {
|
|
@@ -419,31 +416,31 @@ let RawDebugSession = class RawDebugSession {
|
|
|
419
416
|
}
|
|
420
417
|
return response;
|
|
421
418
|
}
|
|
422
|
-
return Promise.reject(( new Error('goto is not supported')));
|
|
419
|
+
return Promise.reject(( (new Error('goto is not supported'))));
|
|
423
420
|
}
|
|
424
421
|
async setInstructionBreakpoints(args) {
|
|
425
422
|
if (this.capabilities.supportsInstructionBreakpoints) {
|
|
426
423
|
return await this.send('setInstructionBreakpoints', args);
|
|
427
424
|
}
|
|
428
|
-
return Promise.reject(( new Error('setInstructionBreakpoints is not supported')));
|
|
425
|
+
return Promise.reject(( (new Error('setInstructionBreakpoints is not supported'))));
|
|
429
426
|
}
|
|
430
427
|
async disassemble(args) {
|
|
431
428
|
if (this.capabilities.supportsDisassembleRequest) {
|
|
432
429
|
return await this.send('disassemble', args);
|
|
433
430
|
}
|
|
434
|
-
return Promise.reject(( new Error('disassemble is not supported')));
|
|
431
|
+
return Promise.reject(( (new Error('disassemble is not supported'))));
|
|
435
432
|
}
|
|
436
433
|
async readMemory(args) {
|
|
437
434
|
if (this.capabilities.supportsReadMemoryRequest) {
|
|
438
435
|
return await this.send('readMemory', args);
|
|
439
436
|
}
|
|
440
|
-
return Promise.reject(( new Error('readMemory is not supported')));
|
|
437
|
+
return Promise.reject(( (new Error('readMemory is not supported'))));
|
|
441
438
|
}
|
|
442
439
|
async writeMemory(args) {
|
|
443
440
|
if (this.capabilities.supportsWriteMemoryRequest) {
|
|
444
441
|
return await this.send('writeMemory', args);
|
|
445
442
|
}
|
|
446
|
-
return Promise.reject(( new Error('writeMemory is not supported')));
|
|
443
|
+
return Promise.reject(( (new Error('writeMemory is not supported'))));
|
|
447
444
|
}
|
|
448
445
|
cancel(args) {
|
|
449
446
|
return this.send('cancel', args);
|
|
@@ -494,7 +491,7 @@ let RawDebugSession = class RawDebugSession {
|
|
|
494
491
|
this.firedAdapterExitEvent = true;
|
|
495
492
|
const e = {
|
|
496
493
|
emittedStopped: this.didReceiveStoppedEvent,
|
|
497
|
-
sessionLengthInSeconds: (( new Date()).getTime() - this.startTime) / 1000
|
|
494
|
+
sessionLengthInSeconds: (( (new Date())).getTime() - this.startTime) / 1000
|
|
498
495
|
};
|
|
499
496
|
if (error && !this.debugAdapterStopped) {
|
|
500
497
|
e.error = error;
|
|
@@ -518,15 +515,11 @@ let RawDebugSession = class RawDebugSession {
|
|
|
518
515
|
const { confirmed } = await this.dialogSerivce.confirm({
|
|
519
516
|
type: Severity$1.Warning,
|
|
520
517
|
message: ( localizeWithPath(
|
|
521
|
-
|
|
522
|
-
|
|
518
|
+
_moduleId,
|
|
519
|
+
1,
|
|
523
520
|
"The debugger needs to open a new tab or window for the debuggee but the browser prevented this. You must give permission to continue."
|
|
524
521
|
)),
|
|
525
|
-
primaryButton: ( localizeWithPath(
|
|
526
|
-
'vs/workbench/contrib/debug/browser/rawDebugSession',
|
|
527
|
-
{ key: 'continue', comment: ['&& denotes a mnemonic'] },
|
|
528
|
-
"&&Continue"
|
|
529
|
-
))
|
|
522
|
+
primaryButton: ( localizeWithPath(_moduleId, 2, "&&Continue"))
|
|
530
523
|
});
|
|
531
524
|
if (confirmed) {
|
|
532
525
|
result = await this.launchVsCode(request.arguments);
|
|
@@ -606,7 +599,7 @@ let RawDebugSession = class RawDebugSession {
|
|
|
606
599
|
const key = match[1];
|
|
607
600
|
let value = match[2];
|
|
608
601
|
if ((key === 'file-uri' || key === 'folder-uri') && !isUri(arg.path)) {
|
|
609
|
-
value = isUri(value) ? value : ( URI.file(value).toString());
|
|
602
|
+
value = isUri(value) ? value : ( (URI.file(value).toString()));
|
|
610
603
|
}
|
|
611
604
|
args.push(`--${key}=${value}`);
|
|
612
605
|
}
|
|
@@ -620,18 +613,13 @@ let RawDebugSession = class RawDebugSession {
|
|
|
620
613
|
return this.extensionHostDebugService.openExtensionDevelopmentHostWindow(args, !!vscodeArgs.debugRenderer);
|
|
621
614
|
}
|
|
622
615
|
send(command, args, token, timeout, showErrors = true) {
|
|
623
|
-
return ( new Promise((completeDispatch, errorDispatch) => {
|
|
616
|
+
return ( (new Promise((completeDispatch, errorDispatch) => {
|
|
624
617
|
if (!this.debugAdapter) {
|
|
625
618
|
if (this.inShutdown) {
|
|
626
619
|
completeDispatch(undefined);
|
|
627
620
|
}
|
|
628
621
|
else {
|
|
629
|
-
errorDispatch(( new Error(( localizeWithPath(
|
|
630
|
-
'vs/workbench/contrib/debug/browser/rawDebugSession',
|
|
631
|
-
'noDebugAdapter',
|
|
632
|
-
"No debugger available found. Can not send '{0}'.",
|
|
633
|
-
command
|
|
634
|
-
)))));
|
|
622
|
+
errorDispatch(( (new Error(( localizeWithPath(_moduleId, 3, "No debugger available found. Can not send '{0}'.", command))))));
|
|
635
623
|
}
|
|
636
624
|
return;
|
|
637
625
|
}
|
|
@@ -653,7 +641,7 @@ let RawDebugSession = class RawDebugSession {
|
|
|
653
641
|
}
|
|
654
642
|
});
|
|
655
643
|
}
|
|
656
|
-
})).then(undefined, err => Promise.reject(this.handleErrorResponse(err, showErrors)));
|
|
644
|
+
}))).then(undefined, err => Promise.reject(this.handleErrorResponse(err, showErrors)));
|
|
657
645
|
}
|
|
658
646
|
handleErrorResponse(errorResponse, showErrors) {
|
|
659
647
|
if (errorResponse.command === 'canceled' && errorResponse.message === 'canceled') {
|
|
@@ -664,12 +652,8 @@ let RawDebugSession = class RawDebugSession {
|
|
|
664
652
|
const userMessage = error ? formatPII(error.format, false, error.variables) : errorMessage;
|
|
665
653
|
const url = error?.url;
|
|
666
654
|
if (error && url) {
|
|
667
|
-
const label = error.urlLabel ? error.urlLabel : ( localizeWithPath(
|
|
668
|
-
|
|
669
|
-
'moreInfo',
|
|
670
|
-
"More Info"
|
|
671
|
-
));
|
|
672
|
-
const uri = ( URI.parse(url));
|
|
655
|
+
const label = error.urlLabel ? error.urlLabel : ( localizeWithPath(_moduleId, 4, "More Info"));
|
|
656
|
+
const uri = ( (URI.parse(url)));
|
|
673
657
|
const actionId = uri.scheme === Schemas.command ? 'debug.moreInfo.command' : 'debug.moreInfo';
|
|
674
658
|
return createErrorWithActions(userMessage, [toAction({ id: actionId, label, run: () => this.openerService.open(uri, { allowCommands: true }) })]);
|
|
675
659
|
}
|
|
@@ -700,11 +684,11 @@ let RawDebugSession = class RawDebugSession {
|
|
|
700
684
|
dispose(this.toDispose);
|
|
701
685
|
}
|
|
702
686
|
};
|
|
703
|
-
RawDebugSession = ( __decorate([
|
|
704
|
-
( __param(4, IExtensionHostDebugService)),
|
|
705
|
-
( __param(5, IOpenerService)),
|
|
706
|
-
( __param(6, INotificationService)),
|
|
707
|
-
( __param(7, IDialogService))
|
|
708
|
-
], RawDebugSession));
|
|
687
|
+
RawDebugSession = ( (__decorate([
|
|
688
|
+
( (__param(4, IExtensionHostDebugService))),
|
|
689
|
+
( (__param(5, IOpenerService))),
|
|
690
|
+
( (__param(6, INotificationService))),
|
|
691
|
+
( (__param(7, IDialogService)))
|
|
692
|
+
], RawDebugSession)));
|
|
709
693
|
|
|
710
694
|
export { RawDebugSession };
|
|
@@ -70,8 +70,10 @@ import { IEditorService } from 'vscode/vscode/vs/workbench/services/editor/commo
|
|
|
70
70
|
import { registerNavigableContainer } from 'vscode/vscode/vs/workbench/browser/actions/widgetNavigationCommands';
|
|
71
71
|
import { AccessibilitySignal } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService';
|
|
72
72
|
import { IAccessibilitySignalService } from 'vscode/vscode/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service';
|
|
73
|
+
import { IHoverService } from 'vscode/vscode/vs/platform/hover/browser/hover.service';
|
|
73
74
|
|
|
74
75
|
var Repl_1, ReplOptions_1;
|
|
76
|
+
const _moduleId = "vs/workbench/contrib/debug/browser/repl";
|
|
75
77
|
const $ = $$1;
|
|
76
78
|
const HISTORY_STORAGE_KEY = 'debug.repl.history';
|
|
77
79
|
const FILTER_HISTORY_STORAGE_KEY = 'debug.repl.filterHistory';
|
|
@@ -86,20 +88,16 @@ let Repl = class Repl extends FilterViewPane {
|
|
|
86
88
|
static { Repl_1 = this; }
|
|
87
89
|
static { this.REFRESH_DELAY = 50; }
|
|
88
90
|
static { this.URI = ( URI.parse(`${DEBUG_SCHEME}:replinput`)); }
|
|
89
|
-
constructor(options, debugService, instantiationService, storageService, themeService, modelService, contextKeyService, codeEditorService, viewDescriptorService, contextMenuService, configurationService, textResourcePropertiesService, editorService, keybindingService, openerService, telemetryService, menuService, languageFeaturesService, logService) {
|
|
91
|
+
constructor(options, debugService, instantiationService, storageService, themeService, modelService, contextKeyService, codeEditorService, viewDescriptorService, contextMenuService, configurationService, textResourcePropertiesService, editorService, keybindingService, openerService, telemetryService, hoverService, menuService, languageFeaturesService, logService) {
|
|
90
92
|
const filterText = storageService.get(FILTER_VALUE_STORAGE_KEY, 1 , '');
|
|
91
93
|
super({
|
|
92
94
|
...options,
|
|
93
95
|
filterOptions: {
|
|
94
|
-
placeholder: (
|
|
95
|
-
'vs/workbench/contrib/debug/browser/repl',
|
|
96
|
-
{ key: 'workbench.debug.filter.placeholder', comment: ['Text in the brackets after e.g. is not localizable'] },
|
|
97
|
-
"Filter (e.g. text, !exclude)"
|
|
98
|
-
))),
|
|
96
|
+
placeholder: ( localizeWithPath(_moduleId, 0, "Filter (e.g. text, !exclude, \\escape)")),
|
|
99
97
|
text: filterText,
|
|
100
98
|
history: JSON.parse(storageService.get(FILTER_HISTORY_STORAGE_KEY, 1 , '[]')),
|
|
101
99
|
}
|
|
102
|
-
}, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService);
|
|
100
|
+
}, keybindingService, contextMenuService, configurationService, contextKeyService, viewDescriptorService, instantiationService, openerService, themeService, telemetryService, hoverService);
|
|
103
101
|
this.debugService = debugService;
|
|
104
102
|
this.storageService = storageService;
|
|
105
103
|
this.modelService = modelService;
|
|
@@ -120,7 +118,7 @@ let Repl = class Repl extends FilterViewPane {
|
|
|
120
118
|
this.filter = ( (new ReplFilter()));
|
|
121
119
|
this.filter.filterQuery = filterText;
|
|
122
120
|
this.multiSessionRepl = CONTEXT_MULTI_SESSION_REPL.bindTo(contextKeyService);
|
|
123
|
-
this.replOptions = this._register(this.instantiationService.createInstance(ReplOptions, this.id, () => this.
|
|
121
|
+
this.replOptions = this._register(this.instantiationService.createInstance(ReplOptions, this.id, () => this.getLocationBasedColors().background));
|
|
124
122
|
this._register(this.replOptions.onDidChange(() => this.onDidStyleChange()));
|
|
125
123
|
codeEditorService.registerDecorationType('repl-decoration', DECORATION_KEY, {});
|
|
126
124
|
this.multiSessionRepl.set(this.isMultiSessionView);
|
|
@@ -475,19 +473,14 @@ let Repl = class Repl extends FilterViewPane {
|
|
|
475
473
|
await autoExpandElements(session.getReplElements());
|
|
476
474
|
}
|
|
477
475
|
const { total, filtered } = this.getFilterStats();
|
|
478
|
-
this.filterWidget.updateBadge(total === filtered || total === 0 ? undefined : (
|
|
479
|
-
'vs/workbench/contrib/debug/browser/repl',
|
|
480
|
-
'showing filtered repl lines',
|
|
481
|
-
"Showing {0} of {1}",
|
|
482
|
-
filtered,
|
|
483
|
-
total
|
|
484
|
-
))));
|
|
476
|
+
this.filterWidget.updateBadge(total === filtered || total === 0 ? undefined : ( localizeWithPath(_moduleId, 1, "Showing {0} of {1}", filtered, total)));
|
|
485
477
|
}, Repl_1.REFRESH_DELAY))
|
|
486
478
|
);
|
|
487
479
|
}
|
|
488
480
|
render() {
|
|
489
481
|
super.render();
|
|
490
482
|
this._register(registerNavigableContainer({
|
|
483
|
+
name: 'repl',
|
|
491
484
|
focusNotifiers: [this, this.filterWidget],
|
|
492
485
|
focusNextWidget: () => {
|
|
493
486
|
const element = this.tree?.getHTMLElement();
|
|
@@ -526,8 +519,8 @@ let Repl = class Repl extends FilterViewPane {
|
|
|
526
519
|
this.instantiationService.createInstance(ReplOutputElementRenderer, linkDetector),
|
|
527
520
|
( (new ReplEvaluationInputsRenderer())),
|
|
528
521
|
this.instantiationService.createInstance(ReplGroupRenderer, linkDetector),
|
|
529
|
-
( (new ReplEvaluationResultsRenderer(linkDetector))),
|
|
530
|
-
( (new ReplRawObjectsRenderer(linkDetector))),
|
|
522
|
+
( (new ReplEvaluationResultsRenderer(linkDetector, this.hoverService))),
|
|
523
|
+
( (new ReplRawObjectsRenderer(linkDetector, this.hoverService))),
|
|
531
524
|
],
|
|
532
525
|
(
|
|
533
526
|
(new ReplDataSource())), {
|
|
@@ -540,9 +533,7 @@ let Repl = class Repl extends FilterViewPane {
|
|
|
540
533
|
horizontalScrolling: !wordWrap,
|
|
541
534
|
setRowLineHeight: false,
|
|
542
535
|
supportDynamicHeights: wordWrap,
|
|
543
|
-
overrideStyles:
|
|
544
|
-
listBackground: this.getBackgroundColor()
|
|
545
|
-
}
|
|
536
|
+
overrideStyles: this.getLocationBasedColors().listOverrideStyles
|
|
546
537
|
});
|
|
547
538
|
this._register(tree.onDidChangeContentHeight(() => {
|
|
548
539
|
if (tree.scrollHeight !== this.previousTreeScrollHeight) {
|
|
@@ -583,7 +574,7 @@ let Repl = class Repl extends FilterViewPane {
|
|
|
583
574
|
options.suggest = { showStatusBar: true };
|
|
584
575
|
const config = this.configurationService.getValue('debug');
|
|
585
576
|
options.acceptSuggestionOnEnter = config.console.acceptSuggestionOnEnter === 'on' ? 'on' : 'off';
|
|
586
|
-
options.ariaLabel = (
|
|
577
|
+
options.ariaLabel = ( localizeWithPath(_moduleId, 2, "Debug Console"));
|
|
587
578
|
this.replInput = this.scopedInstantiationService.createInstance(CodeEditorWidget, this.replInputContainer, options, getSimpleCodeEditorWidgetOptions());
|
|
588
579
|
this._register(this.replInput.onDidChangeModelContent(() => {
|
|
589
580
|
const model = this.replInput.getModel();
|
|
@@ -634,11 +625,7 @@ let Repl = class Repl extends FilterViewPane {
|
|
|
634
625
|
},
|
|
635
626
|
renderOptions: {
|
|
636
627
|
after: {
|
|
637
|
-
contentText: (
|
|
638
|
-
'vs/workbench/contrib/debug/browser/repl',
|
|
639
|
-
'startDebugFirst',
|
|
640
|
-
"Please start a debug session to evaluate expressions"
|
|
641
|
-
))),
|
|
628
|
+
contentText: ( localizeWithPath(_moduleId, 3, "Please start a debug session to evaluate expressions")),
|
|
642
629
|
color: transparentForeground ? ( (transparentForeground.toString())) : undefined
|
|
643
630
|
}
|
|
644
631
|
}
|
|
@@ -697,9 +684,10 @@ Repl = Repl_1 = ( (__decorate([
|
|
|
697
684
|
( (__param(13, IKeybindingService))),
|
|
698
685
|
( (__param(14, IOpenerService))),
|
|
699
686
|
( (__param(15, ITelemetryService))),
|
|
700
|
-
( (__param(16,
|
|
701
|
-
( (__param(17,
|
|
702
|
-
( (__param(18,
|
|
687
|
+
( (__param(16, IHoverService))),
|
|
688
|
+
( (__param(17, IMenuService))),
|
|
689
|
+
( (__param(18, ILanguageFeaturesService))),
|
|
690
|
+
( (__param(19, ILogService)))
|
|
703
691
|
], Repl)));
|
|
704
692
|
let ReplOptions = class ReplOptions extends Disposable {
|
|
705
693
|
static { ReplOptions_1 = this; }
|
|
@@ -750,11 +738,7 @@ class AcceptReplInputAction extends EditorAction {
|
|
|
750
738
|
constructor() {
|
|
751
739
|
super({
|
|
752
740
|
id: 'repl.action.acceptInput',
|
|
753
|
-
label: (
|
|
754
|
-
'vs/workbench/contrib/debug/browser/repl',
|
|
755
|
-
{ key: 'actions.repl.acceptInput', comment: ['Apply input from the debug console input box'] },
|
|
756
|
-
"REPL Accept Input"
|
|
757
|
-
))),
|
|
741
|
+
label: ( localizeWithPath(_moduleId, 4, "REPL Accept Input")),
|
|
758
742
|
alias: 'REPL Accept Input',
|
|
759
743
|
precondition: CONTEXT_IN_DEBUG_REPL,
|
|
760
744
|
kbOpts: {
|
|
@@ -774,11 +758,7 @@ class FilterReplAction extends EditorAction {
|
|
|
774
758
|
constructor() {
|
|
775
759
|
super({
|
|
776
760
|
id: 'repl.action.filter',
|
|
777
|
-
label: (
|
|
778
|
-
'vs/workbench/contrib/debug/browser/repl',
|
|
779
|
-
'repl.action.filter',
|
|
780
|
-
"REPL Focus Content to Filter"
|
|
781
|
-
))),
|
|
761
|
+
label: ( localizeWithPath(_moduleId, 5, "REPL Focus Content to Filter")),
|
|
782
762
|
alias: 'REPL Filter',
|
|
783
763
|
precondition: CONTEXT_IN_DEBUG_REPL,
|
|
784
764
|
kbOpts: {
|
|
@@ -797,11 +777,7 @@ class ReplCopyAllAction extends EditorAction {
|
|
|
797
777
|
constructor() {
|
|
798
778
|
super({
|
|
799
779
|
id: 'repl.action.copyAll',
|
|
800
|
-
label: (
|
|
801
|
-
'vs/workbench/contrib/debug/browser/repl',
|
|
802
|
-
'actions.repl.copyAll',
|
|
803
|
-
"Debug: Console Copy All"
|
|
804
|
-
))),
|
|
780
|
+
label: ( localizeWithPath(_moduleId, 6, "Debug: Console Copy All")),
|
|
805
781
|
alias: 'Debug Console Copy All',
|
|
806
782
|
precondition: CONTEXT_IN_DEBUG_REPL,
|
|
807
783
|
});
|
|
@@ -837,11 +813,7 @@ registerAction2(class extends ViewAction {
|
|
|
837
813
|
super({
|
|
838
814
|
id: selectReplCommandId,
|
|
839
815
|
viewId: REPL_VIEW_ID,
|
|
840
|
-
title: (
|
|
841
|
-
'vs/workbench/contrib/debug/browser/repl',
|
|
842
|
-
'selectRepl',
|
|
843
|
-
"Select Debug Console"
|
|
844
|
-
))),
|
|
816
|
+
title: ( localizeWithPath(_moduleId, 7, "Select Debug Console")),
|
|
845
817
|
f1: false,
|
|
846
818
|
menu: {
|
|
847
819
|
id: MenuId.ViewTitle,
|
|
@@ -873,7 +845,10 @@ registerAction2(class extends ViewAction {
|
|
|
873
845
|
super({
|
|
874
846
|
id: 'workbench.debug.panel.action.clearReplAction',
|
|
875
847
|
viewId: REPL_VIEW_ID,
|
|
876
|
-
title: (
|
|
848
|
+
title: ( localize2WithPath(_moduleId, 8, 'Clear Console')),
|
|
849
|
+
metadata: {
|
|
850
|
+
description: ( localize2WithPath(_moduleId, 9, 'Clears all program output from your debug REPL'))
|
|
851
|
+
},
|
|
877
852
|
f1: true,
|
|
878
853
|
icon: debugConsoleClearAll,
|
|
879
854
|
menu: [{
|
|
@@ -898,7 +873,7 @@ registerAction2(class extends ViewAction {
|
|
|
898
873
|
constructor() {
|
|
899
874
|
super({
|
|
900
875
|
id: 'debug.collapseRepl',
|
|
901
|
-
title: (
|
|
876
|
+
title: ( localizeWithPath(_moduleId, 10, "Collapse All")),
|
|
902
877
|
viewId: REPL_VIEW_ID,
|
|
903
878
|
menu: {
|
|
904
879
|
id: MenuId.DebugConsoleContext,
|
|
@@ -916,7 +891,7 @@ registerAction2(class extends ViewAction {
|
|
|
916
891
|
constructor() {
|
|
917
892
|
super({
|
|
918
893
|
id: 'debug.replPaste',
|
|
919
|
-
title: (
|
|
894
|
+
title: ( localizeWithPath(_moduleId, 11, "Paste")),
|
|
920
895
|
viewId: REPL_VIEW_ID,
|
|
921
896
|
precondition: ( (CONTEXT_DEBUG_STATE.notEqualsTo(getStateLabel(0 )))),
|
|
922
897
|
menu: {
|
|
@@ -946,7 +921,7 @@ registerAction2(class extends ViewAction {
|
|
|
946
921
|
constructor() {
|
|
947
922
|
super({
|
|
948
923
|
id: 'workbench.debug.action.copyAll',
|
|
949
|
-
title: (
|
|
924
|
+
title: ( localizeWithPath(_moduleId, 12, "Copy All")),
|
|
950
925
|
viewId: REPL_VIEW_ID,
|
|
951
926
|
menu: {
|
|
952
927
|
id: MenuId.DebugConsoleContext,
|
|
@@ -964,7 +939,7 @@ registerAction2(class extends Action2 {
|
|
|
964
939
|
constructor() {
|
|
965
940
|
super({
|
|
966
941
|
id: 'debug.replCopy',
|
|
967
|
-
title: (
|
|
942
|
+
title: ( localizeWithPath(_moduleId, 13, "Copy")),
|
|
968
943
|
menu: {
|
|
969
944
|
id: MenuId.DebugConsoleContext,
|
|
970
945
|
group: '2_cutcopypaste',
|
|
@@ -14,7 +14,10 @@ class ReplFilter {
|
|
|
14
14
|
if (query && query !== '') {
|
|
15
15
|
const filters = ( splitGlobAware(query, ',').map(s => s.trim())).filter(s => !!s.length);
|
|
16
16
|
for (const f of filters) {
|
|
17
|
-
if (f.startsWith('
|
|
17
|
+
if (f.startsWith('\\')) {
|
|
18
|
+
this._parsedQueries.push({ type: 'include', query: f.slice(1) });
|
|
19
|
+
}
|
|
20
|
+
else if (f.startsWith('!')) {
|
|
18
21
|
this._parsedQueries.push({ type: 'exclude', query: f.slice(1) });
|
|
19
22
|
}
|
|
20
23
|
else {
|