@codingame/monaco-vscode-debug-service-override 1.83.1 → 1.83.3-next.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/baseDebugView.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +104 -139
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +5 -26
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +61 -104
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +3 -9
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +29 -51
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +190 -203
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +11 -31
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +32 -32
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +21 -48
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +2 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +3 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +11 -15
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +28 -80
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +56 -68
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +3 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +17 -50
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +31 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +9 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +12 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +47 -51
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +13 -11
- package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +4 -4
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +6 -25
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +9 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +15 -21
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +6 -20
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +5 -17
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +10 -18
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +10 -13
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +70 -29
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +6 -9
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +3 -12
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +113 -148
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +41 -143
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +11 -36
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +1 -1
- package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +11 -16
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +16 -49
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +1 -4
|
@@ -23,7 +23,7 @@ import { autorun } from 'monaco-editor/esm/vs/base/common/observable.js';
|
|
|
23
23
|
import { findLastIdx } from 'monaco-editor/esm/vs/base/common/arraysFind.js';
|
|
24
24
|
|
|
25
25
|
class ExpressionContainer {
|
|
26
|
-
static { this.allValues = (
|
|
26
|
+
static { this.allValues = ( new Map()); }
|
|
27
27
|
static { this.BASE_CHUNK_SIZE = 100; }
|
|
28
28
|
constructor(session, threadId, _reference, id, namedVariables = 0, indexedVariables = 0, memoryReference = undefined, startOfVariables = 0, presentationHint = undefined) {
|
|
29
29
|
this.session = session;
|
|
@@ -87,7 +87,7 @@ class ExpressionContainer {
|
|
|
87
87
|
for (let i = 0; i < numberOfChunks; i++) {
|
|
88
88
|
const start = (this.startOfVariables || 0) + i * chunkSize;
|
|
89
89
|
const count = Math.min(chunkSize, this.indexedVariables - i * chunkSize);
|
|
90
|
-
children.push((
|
|
90
|
+
children.push(( new Variable(
|
|
91
91
|
this.session,
|
|
92
92
|
this.threadId,
|
|
93
93
|
this,
|
|
@@ -103,7 +103,7 @@ class ExpressionContainer {
|
|
|
103
103
|
undefined,
|
|
104
104
|
true,
|
|
105
105
|
start
|
|
106
|
-
)))
|
|
106
|
+
)));
|
|
107
107
|
}
|
|
108
108
|
return children;
|
|
109
109
|
}
|
|
@@ -128,59 +128,55 @@ class ExpressionContainer {
|
|
|
128
128
|
if (!response || !response.body || !response.body.variables) {
|
|
129
129
|
return [];
|
|
130
130
|
}
|
|
131
|
-
const nameCount = (
|
|
132
|
-
const vars = (
|
|
131
|
+
const nameCount = ( new Map());
|
|
132
|
+
const vars = ( response.body.variables.filter(v => !!v).map((v) => {
|
|
133
133
|
if (isString(v.value) && isString(v.name) && typeof v.variablesReference === 'number') {
|
|
134
134
|
const count = nameCount.get(v.name) || 0;
|
|
135
|
-
const idDuplicationIndex = count > 0 ? (
|
|
135
|
+
const idDuplicationIndex = count > 0 ? ( count.toString()) : '';
|
|
136
136
|
nameCount.set(v.name, count + 1);
|
|
137
|
-
return (
|
|
138
|
-
(new Variable(
|
|
139
|
-
this.session,
|
|
140
|
-
this.threadId,
|
|
141
|
-
this,
|
|
142
|
-
v.variablesReference,
|
|
143
|
-
v.name,
|
|
144
|
-
v.evaluateName,
|
|
145
|
-
v.value,
|
|
146
|
-
v.namedVariables,
|
|
147
|
-
v.indexedVariables,
|
|
148
|
-
v.memoryReference,
|
|
149
|
-
v.presentationHint,
|
|
150
|
-
v.type,
|
|
151
|
-
v.__vscodeVariableMenuContext,
|
|
152
|
-
true,
|
|
153
|
-
0,
|
|
154
|
-
idDuplicationIndex
|
|
155
|
-
))
|
|
156
|
-
);
|
|
157
|
-
}
|
|
158
|
-
return (
|
|
159
|
-
(new Variable(
|
|
137
|
+
return ( new Variable(
|
|
160
138
|
this.session,
|
|
161
139
|
this.threadId,
|
|
162
140
|
this,
|
|
141
|
+
v.variablesReference,
|
|
142
|
+
v.name,
|
|
143
|
+
v.evaluateName,
|
|
144
|
+
v.value,
|
|
145
|
+
v.namedVariables,
|
|
146
|
+
v.indexedVariables,
|
|
147
|
+
v.memoryReference,
|
|
148
|
+
v.presentationHint,
|
|
149
|
+
v.type,
|
|
150
|
+
v.__vscodeVariableMenuContext,
|
|
151
|
+
true,
|
|
163
152
|
0,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
)
|
|
175
|
-
|
|
176
|
-
|
|
153
|
+
idDuplicationIndex
|
|
154
|
+
));
|
|
155
|
+
}
|
|
156
|
+
return ( new Variable(
|
|
157
|
+
this.session,
|
|
158
|
+
this.threadId,
|
|
159
|
+
this,
|
|
160
|
+
0,
|
|
161
|
+
'',
|
|
162
|
+
undefined,
|
|
163
|
+
nls.localizeWithPath('vs/workbench/contrib/debug/common/debugModel', 'invalidVariableAttributes', "Invalid variable attributes"),
|
|
164
|
+
0,
|
|
165
|
+
0,
|
|
166
|
+
undefined,
|
|
167
|
+
{ kind: 'virtual' },
|
|
168
|
+
undefined,
|
|
169
|
+
undefined,
|
|
170
|
+
false
|
|
171
|
+
));
|
|
172
|
+
}));
|
|
177
173
|
if (this.session.autoExpandLazyVariables) {
|
|
178
|
-
await Promise.all((
|
|
174
|
+
await Promise.all(( vars.map(v => v.presentationHint?.lazy && v.evaluateLazy())));
|
|
179
175
|
}
|
|
180
176
|
return vars;
|
|
181
177
|
}
|
|
182
178
|
catch (e) {
|
|
183
|
-
return [(
|
|
179
|
+
return [( new Variable(
|
|
184
180
|
this.session,
|
|
185
181
|
this.threadId,
|
|
186
182
|
this,
|
|
@@ -195,7 +191,7 @@ class ExpressionContainer {
|
|
|
195
191
|
undefined,
|
|
196
192
|
undefined,
|
|
197
193
|
false
|
|
198
|
-
))
|
|
194
|
+
))];
|
|
199
195
|
}
|
|
200
196
|
}
|
|
201
197
|
get getChildrenInChunks() {
|
|
@@ -212,7 +208,7 @@ class ExpressionContainer {
|
|
|
212
208
|
}
|
|
213
209
|
async evaluateExpression(expression, session, stackFrame, context, keepLazyVars = false) {
|
|
214
210
|
if (!session || (!stackFrame && context !== 'repl')) {
|
|
215
|
-
this.value = context === 'repl' ?
|
|
211
|
+
this.value = context === 'repl' ? nls.localizeWithPath('vs/workbench/contrib/debug/common/debugModel', 'startDebugFirst', "Please start a debug session to evaluate expressions") : Expression.DEFAULT_VALUE;
|
|
216
212
|
this.reference = 0;
|
|
217
213
|
return false;
|
|
218
214
|
}
|
|
@@ -251,7 +247,7 @@ function handleSetResponse(expression, response) {
|
|
|
251
247
|
}
|
|
252
248
|
}
|
|
253
249
|
class Expression extends ExpressionContainer {
|
|
254
|
-
static { this.DEFAULT_VALUE =
|
|
250
|
+
static { this.DEFAULT_VALUE = nls.localizeWithPath('vs/workbench/contrib/debug/common/debugModel', 'notAvailable', "not available"); }
|
|
255
251
|
constructor(name, id = generateUuid()) {
|
|
256
252
|
super(undefined, undefined, 0, id);
|
|
257
253
|
this.name = name;
|
|
@@ -370,36 +366,32 @@ class StackFrame {
|
|
|
370
366
|
if (!response || !response.body || !response.body.scopes) {
|
|
371
367
|
return [];
|
|
372
368
|
}
|
|
373
|
-
const usedIds = (
|
|
374
|
-
return (
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
);
|
|
393
|
-
}))
|
|
394
|
-
);
|
|
395
|
-
}, err => [( (new ErrorScope(this, 0, err.message)))]);
|
|
369
|
+
const usedIds = ( new Set());
|
|
370
|
+
return ( response.body.scopes.map(rs => {
|
|
371
|
+
let id = 0;
|
|
372
|
+
do {
|
|
373
|
+
id = stringHash(`${rs.name}:${rs.line}:${rs.column}`, id);
|
|
374
|
+
} while (( usedIds.has(id)));
|
|
375
|
+
usedIds.add(id);
|
|
376
|
+
return ( new Scope(
|
|
377
|
+
this,
|
|
378
|
+
id,
|
|
379
|
+
rs.name,
|
|
380
|
+
rs.variablesReference,
|
|
381
|
+
rs.expensive,
|
|
382
|
+
rs.namedVariables,
|
|
383
|
+
rs.indexedVariables,
|
|
384
|
+
rs.line && rs.column && rs.endLine && rs.endColumn ? ( new Range(rs.line, rs.column, rs.endLine, rs.endColumn)) : undefined
|
|
385
|
+
));
|
|
386
|
+
}));
|
|
387
|
+
}, err => [( new ErrorScope(this, 0, err.message))]);
|
|
396
388
|
}
|
|
397
389
|
return this.scopes;
|
|
398
390
|
}
|
|
399
391
|
async getMostSpecificScopes(range) {
|
|
400
392
|
const scopes = await this.getScopes();
|
|
401
393
|
const nonExpensiveScopes = scopes.filter(s => !s.expensive);
|
|
402
|
-
const haveRangeInfo = (
|
|
394
|
+
const haveRangeInfo = ( nonExpensiveScopes.some(s => !!s.range));
|
|
403
395
|
if (!haveRangeInfo) {
|
|
404
396
|
return nonExpensiveScopes;
|
|
405
397
|
}
|
|
@@ -473,15 +465,9 @@ class Thread {
|
|
|
473
465
|
get stateLabel() {
|
|
474
466
|
if (this.stoppedDetails) {
|
|
475
467
|
return this.stoppedDetails.description ||
|
|
476
|
-
(this.stoppedDetails.reason ? (
|
|
477
|
-
{ key: 'pausedOn', comment: ['indicates reason for program being paused'] },
|
|
478
|
-
"Paused on {0}",
|
|
479
|
-
this.stoppedDetails.reason
|
|
480
|
-
))) : ( (nls.localize('paused', "Paused"))));
|
|
468
|
+
(this.stoppedDetails.reason ? nls.localizeWithPath('vs/workbench/contrib/debug/common/debugModel', { key: 'pausedOn', comment: ['indicates reason for program being paused'] }, "Paused on {0}", this.stoppedDetails.reason) : nls.localizeWithPath('vs/workbench/contrib/debug/common/debugModel', 'paused', "Paused"));
|
|
481
469
|
}
|
|
482
|
-
return (
|
|
483
|
-
(nls.localize({ key: 'running', comment: ['indicates state'] }, "Running"))
|
|
484
|
-
);
|
|
470
|
+
return nls.localizeWithPath('vs/workbench/contrib/debug/common/debugModel', { key: 'running', comment: ['indicates state'] }, "Running");
|
|
485
471
|
}
|
|
486
472
|
async fetchCallStack(levels = 20) {
|
|
487
473
|
if (this.stopped) {
|
|
@@ -499,7 +485,7 @@ class Thread {
|
|
|
499
485
|
}
|
|
500
486
|
async getCallStackImpl(startFrame, levels) {
|
|
501
487
|
try {
|
|
502
|
-
const tokenSource = (
|
|
488
|
+
const tokenSource = ( new CancellationTokenSource());
|
|
503
489
|
this.callStackCancellationTokens.push(tokenSource);
|
|
504
490
|
const response = await this.session.stackTrace(this.threadId, startFrame, levels, tokenSource.token);
|
|
505
491
|
if (!response || !response.body || tokenSource.token.isCancellationRequested) {
|
|
@@ -508,24 +494,10 @@ class Thread {
|
|
|
508
494
|
if (this.stoppedDetails) {
|
|
509
495
|
this.stoppedDetails.totalFrames = response.body.totalFrames;
|
|
510
496
|
}
|
|
511
|
-
return (
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
(new StackFrame(
|
|
516
|
-
this,
|
|
517
|
-
rsf.id,
|
|
518
|
-
source,
|
|
519
|
-
rsf.name,
|
|
520
|
-
rsf.presentationHint,
|
|
521
|
-
(new Range(rsf.line, rsf.column, rsf.endLine || rsf.line, rsf.endColumn || rsf.column)),
|
|
522
|
-
startFrame + index,
|
|
523
|
-
typeof rsf.canRestart === 'boolean' ? rsf.canRestart : true,
|
|
524
|
-
rsf.instructionPointerReference
|
|
525
|
-
))
|
|
526
|
-
);
|
|
527
|
-
}))
|
|
528
|
-
);
|
|
497
|
+
return ( response.body.stackFrames.map((rsf, index) => {
|
|
498
|
+
const source = this.session.getSource(rsf.source);
|
|
499
|
+
return ( new StackFrame(this, rsf.id, source, rsf.name, rsf.presentationHint, ( new Range(rsf.line, rsf.column, rsf.endLine || rsf.line, rsf.endColumn || rsf.column)), startFrame + index, typeof rsf.canRestart === 'boolean' ? rsf.canRestart : true, rsf.instructionPointerReference));
|
|
500
|
+
}));
|
|
529
501
|
}
|
|
530
502
|
catch (err) {
|
|
531
503
|
if (this.stoppedDetails) {
|
|
@@ -572,21 +544,19 @@ class Thread {
|
|
|
572
544
|
}
|
|
573
545
|
}
|
|
574
546
|
const getUriForDebugMemory = (sessionId, memoryReference, range, displayName = 'memory') => {
|
|
575
|
-
return (
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
}))
|
|
582
|
-
);
|
|
547
|
+
return ( URI.from({
|
|
548
|
+
scheme: DEBUG_MEMORY_SCHEME,
|
|
549
|
+
authority: sessionId,
|
|
550
|
+
path: '/' + encodeURIComponent(memoryReference) + `/${encodeURIComponent(displayName)}.bin`,
|
|
551
|
+
query: range ? `?range=${range.fromOffset}:${range.toOffset}` : undefined,
|
|
552
|
+
}));
|
|
583
553
|
};
|
|
584
554
|
class MemoryRegion extends Disposable {
|
|
585
555
|
constructor(memoryReference, session) {
|
|
586
556
|
super();
|
|
587
557
|
this.memoryReference = memoryReference;
|
|
588
558
|
this.session = session;
|
|
589
|
-
this.invalidateEmitter = this._register((
|
|
559
|
+
this.invalidateEmitter = this._register(( new Emitter()));
|
|
590
560
|
this.onDidInvalidate = this.invalidateEmitter.event;
|
|
591
561
|
this.writable = !!this.session.capabilities.supportsWriteMemoryRequest;
|
|
592
562
|
this._register(session.onDidInvalidateMemory(e => {
|
|
@@ -665,7 +635,7 @@ class BaseBreakpoint extends Enablement {
|
|
|
665
635
|
this.hitCondition = hitCondition;
|
|
666
636
|
this.condition = condition;
|
|
667
637
|
this.logMessage = logMessage;
|
|
668
|
-
this.sessionData = (
|
|
638
|
+
this.sessionData = ( new Map());
|
|
669
639
|
if (enabled === undefined) {
|
|
670
640
|
this.enabled = true;
|
|
671
641
|
}
|
|
@@ -678,7 +648,7 @@ class BaseBreakpoint extends Enablement {
|
|
|
678
648
|
data.sessionId = sessionId;
|
|
679
649
|
this.sessionData.set(sessionId, data);
|
|
680
650
|
}
|
|
681
|
-
const allData = Array.from((
|
|
651
|
+
const allData = Array.from(( this.sessionData.values()));
|
|
682
652
|
const verifiedData = distinct(allData.filter(d => d.verified), d => `${d.line}:${d.column}`);
|
|
683
653
|
if (verifiedData.length) {
|
|
684
654
|
this.data = verifiedData.length === 1 ? verifiedData[0] : undefined;
|
|
@@ -769,12 +739,7 @@ class Breakpoint extends BaseBreakpoint {
|
|
|
769
739
|
}
|
|
770
740
|
get message() {
|
|
771
741
|
if (this.textFileService.isDirty(this.uri)) {
|
|
772
|
-
return (
|
|
773
|
-
(nls.localize(
|
|
774
|
-
'breakpointDirtydHover',
|
|
775
|
-
"Unverified breakpoint. File is modified, please restart debug session."
|
|
776
|
-
))
|
|
777
|
-
);
|
|
742
|
+
return nls.localizeWithPath('vs/workbench/contrib/debug/common/debugModel', 'breakpointDirtydHover', "Unverified breakpoint. File is modified, please restart debug session.");
|
|
778
743
|
}
|
|
779
744
|
return super.message;
|
|
780
745
|
}
|
|
@@ -899,7 +864,7 @@ class ExceptionBreakpoint extends BaseBreakpoint {
|
|
|
899
864
|
this.description = description;
|
|
900
865
|
this.conditionDescription = conditionDescription;
|
|
901
866
|
this.fallback = fallback;
|
|
902
|
-
this.supportedSessions = (
|
|
867
|
+
this.supportedSessions = ( new Set());
|
|
903
868
|
}
|
|
904
869
|
toJSON() {
|
|
905
870
|
const result = Object.create(null);
|
|
@@ -928,7 +893,7 @@ class ExceptionBreakpoint extends BaseBreakpoint {
|
|
|
928
893
|
return true;
|
|
929
894
|
}
|
|
930
895
|
isSupportedSession(sessionId) {
|
|
931
|
-
return sessionId ? (
|
|
896
|
+
return sessionId ? ( this.supportedSessions.has(sessionId)) : this.fallback;
|
|
932
897
|
}
|
|
933
898
|
matches(filter) {
|
|
934
899
|
return this.filter === filter.filter && this.label === filter.label && this.supportsCondition === !!filter.supportsCondition && this.conditionDescription === filter.conditionDescription && this.description === filter.description;
|
|
@@ -976,11 +941,11 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
976
941
|
this.textFileService = textFileService;
|
|
977
942
|
this.uriIdentityService = uriIdentityService;
|
|
978
943
|
this.logService = logService;
|
|
979
|
-
this.schedulers = (
|
|
944
|
+
this.schedulers = ( new Map());
|
|
980
945
|
this.breakpointsActivated = true;
|
|
981
|
-
this._onDidChangeBreakpoints = this._register((
|
|
982
|
-
this._onDidChangeCallStack = this._register((
|
|
983
|
-
this._onDidChangeWatchExpressions = this._register((
|
|
946
|
+
this._onDidChangeBreakpoints = this._register(( new Emitter()));
|
|
947
|
+
this._onDidChangeCallStack = this._register(( new Emitter()));
|
|
948
|
+
this._onDidChangeWatchExpressions = this._register(( new Emitter()));
|
|
984
949
|
this._register(autorun(reader => {
|
|
985
950
|
this.breakpoints = debugStorage.breakpoints.read(reader);
|
|
986
951
|
this.functionBreakpoints = debugStorage.functionBreakpoints.read(reader);
|
|
@@ -1018,7 +983,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1018
983
|
return true;
|
|
1019
984
|
});
|
|
1020
985
|
let i = 1;
|
|
1021
|
-
while ((
|
|
986
|
+
while (( this.sessions.some(s => s.getLabel() === session.getLabel()))) {
|
|
1022
987
|
session.setName(`${session.configuration.name} ${++i}`);
|
|
1023
988
|
}
|
|
1024
989
|
let index = -1;
|
|
@@ -1079,13 +1044,13 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1079
1044
|
refreshTopOfCallstack(thread) {
|
|
1080
1045
|
if (thread.session.capabilities.supportsDelayedStackTraceLoading) {
|
|
1081
1046
|
let topCallStack = Promise.resolve();
|
|
1082
|
-
const wholeCallStack = (
|
|
1047
|
+
const wholeCallStack = ( new Promise((c, e) => {
|
|
1083
1048
|
topCallStack = thread.fetchCallStack(1).then(() => {
|
|
1084
|
-
if (!(
|
|
1085
|
-
const deferred = (
|
|
1049
|
+
if (!( this.schedulers.has(thread.getId()))) {
|
|
1050
|
+
const deferred = ( new DeferredPromise());
|
|
1086
1051
|
this.schedulers.set(thread.getId(), {
|
|
1087
1052
|
completeDeferred: deferred,
|
|
1088
|
-
scheduler: (
|
|
1053
|
+
scheduler: ( new RunOnceScheduler(() => {
|
|
1089
1054
|
thread.fetchCallStack(19).then(() => {
|
|
1090
1055
|
const stale = thread.getStaleCallStack();
|
|
1091
1056
|
const current = thread.getCallStack();
|
|
@@ -1100,7 +1065,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1100
1065
|
deferred.complete();
|
|
1101
1066
|
this.schedulers.delete(thread.getId());
|
|
1102
1067
|
});
|
|
1103
|
-
}, 420))
|
|
1068
|
+
}, 420))
|
|
1104
1069
|
});
|
|
1105
1070
|
}
|
|
1106
1071
|
const entry = this.schedulers.get(thread.getId());
|
|
@@ -1108,7 +1073,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1108
1073
|
entry.completeDeferred.p.then(c, e);
|
|
1109
1074
|
this._onDidChangeCallStack.fire();
|
|
1110
1075
|
});
|
|
1111
|
-
}))
|
|
1076
|
+
}));
|
|
1112
1077
|
return { topCallStack, wholeCallStack };
|
|
1113
1078
|
}
|
|
1114
1079
|
const wholeCallStack = thread.fetchCallStack();
|
|
@@ -1119,10 +1084,10 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1119
1084
|
const uriStr = filter.uri?.toString();
|
|
1120
1085
|
const originalUriStr = filter.originalUri?.toString();
|
|
1121
1086
|
return this.breakpoints.filter(bp => {
|
|
1122
|
-
if (uriStr && (
|
|
1087
|
+
if (uriStr && ( bp.uri.toString()) !== uriStr) {
|
|
1123
1088
|
return false;
|
|
1124
1089
|
}
|
|
1125
|
-
if (originalUriStr && (
|
|
1090
|
+
if (originalUriStr && ( bp.originalUri.toString()) !== originalUriStr) {
|
|
1126
1091
|
return false;
|
|
1127
1092
|
}
|
|
1128
1093
|
if (filter.lineNumber && bp.lineNumber !== filter.lineNumber) {
|
|
@@ -1161,7 +1126,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1161
1126
|
let ebp = this.exceptionBreakpoints.filter((exbp) => exbp.matches(d)).pop();
|
|
1162
1127
|
if (!ebp) {
|
|
1163
1128
|
didChangeBreakpoints = true;
|
|
1164
|
-
ebp = (
|
|
1129
|
+
ebp = ( new ExceptionBreakpoint(
|
|
1165
1130
|
d.filter,
|
|
1166
1131
|
d.label,
|
|
1167
1132
|
!!d.default,
|
|
@@ -1169,7 +1134,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1169
1134
|
undefined ,
|
|
1170
1135
|
d.description,
|
|
1171
1136
|
d.conditionDescription
|
|
1172
|
-
))
|
|
1137
|
+
));
|
|
1173
1138
|
this.exceptionBreakpoints.push(ebp);
|
|
1174
1139
|
}
|
|
1175
1140
|
ebp.setSupportedSession(sessionId, true);
|
|
@@ -1197,7 +1162,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1197
1162
|
this._onDidChangeBreakpoints.fire(undefined);
|
|
1198
1163
|
}
|
|
1199
1164
|
addBreakpoints(uri, rawData, fireEvent = true) {
|
|
1200
|
-
const newBreakpoints = (
|
|
1165
|
+
const newBreakpoints = ( rawData.map(rawBp => ( new Breakpoint(
|
|
1201
1166
|
uri,
|
|
1202
1167
|
rawBp.lineNumber,
|
|
1203
1168
|
rawBp.column,
|
|
@@ -1210,7 +1175,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1210
1175
|
this.uriIdentityService,
|
|
1211
1176
|
this.logService,
|
|
1212
1177
|
rawBp.id
|
|
1213
|
-
))))
|
|
1178
|
+
))));
|
|
1214
1179
|
this.breakpoints = this.breakpoints.concat(newBreakpoints);
|
|
1215
1180
|
this.breakpointsActivated = true;
|
|
1216
1181
|
this.sortAndDeDup();
|
|
@@ -1220,7 +1185,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1220
1185
|
return newBreakpoints;
|
|
1221
1186
|
}
|
|
1222
1187
|
removeBreakpoints(toRemove) {
|
|
1223
|
-
this.breakpoints = this.breakpoints.filter(bp => !(
|
|
1188
|
+
this.breakpoints = this.breakpoints.filter(bp => !( toRemove.some(toRemove => toRemove.getId() === bp.getId())));
|
|
1224
1189
|
this._onDidChangeBreakpoints.fire({ removed: toRemove, sessionOnly: false });
|
|
1225
1190
|
}
|
|
1226
1191
|
updateBreakpoints(data) {
|
|
@@ -1304,7 +1269,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1304
1269
|
}
|
|
1305
1270
|
sortAndDeDup() {
|
|
1306
1271
|
this.breakpoints = this.breakpoints.sort((first, second) => {
|
|
1307
|
-
if ((
|
|
1272
|
+
if (( first.uri.toString()) !== ( second.uri.toString())) {
|
|
1308
1273
|
return resources.basenameOrAuthority(first.uri).localeCompare(resources.basenameOrAuthority(second.uri));
|
|
1309
1274
|
}
|
|
1310
1275
|
if (first.lineNumber === second.lineNumber) {
|
|
@@ -1315,7 +1280,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1315
1280
|
}
|
|
1316
1281
|
return first.lineNumber - second.lineNumber;
|
|
1317
1282
|
});
|
|
1318
|
-
this.breakpoints = distinct(this.breakpoints, bp => `${(
|
|
1283
|
+
this.breakpoints = distinct(this.breakpoints, bp => `${( bp.uri.toString())}:${bp.lineNumber}:${bp.column}`);
|
|
1319
1284
|
}
|
|
1320
1285
|
setEnablement(element, enable) {
|
|
1321
1286
|
if (element instanceof Breakpoint || element instanceof FunctionBreakpoint || element instanceof ExceptionBreakpoint || element instanceof DataBreakpoint || element instanceof InstructionBreakpoint) {
|
|
@@ -1362,7 +1327,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1362
1327
|
this._onDidChangeBreakpoints.fire({ changed: changed, sessionOnly: false });
|
|
1363
1328
|
}
|
|
1364
1329
|
addFunctionBreakpoint(functionName, id) {
|
|
1365
|
-
const newFunctionBreakpoint = (
|
|
1330
|
+
const newFunctionBreakpoint = ( new FunctionBreakpoint(functionName, true, undefined, undefined, undefined, id));
|
|
1366
1331
|
this.functionBreakpoints.push(newFunctionBreakpoint);
|
|
1367
1332
|
this._onDidChangeBreakpoints.fire({ added: [newFunctionBreakpoint], sessionOnly: false });
|
|
1368
1333
|
return newFunctionBreakpoint;
|
|
@@ -1395,7 +1360,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1395
1360
|
this._onDidChangeBreakpoints.fire({ removed, sessionOnly: false });
|
|
1396
1361
|
}
|
|
1397
1362
|
addDataBreakpoint(label, dataId, canPersist, accessTypes, accessType) {
|
|
1398
|
-
const newDataBreakpoint = (
|
|
1363
|
+
const newDataBreakpoint = ( new DataBreakpoint(
|
|
1399
1364
|
label,
|
|
1400
1365
|
dataId,
|
|
1401
1366
|
canPersist,
|
|
@@ -1405,7 +1370,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1405
1370
|
undefined,
|
|
1406
1371
|
accessTypes,
|
|
1407
1372
|
accessType
|
|
1408
|
-
))
|
|
1373
|
+
));
|
|
1409
1374
|
this.dataBreakpoints.push(newDataBreakpoint);
|
|
1410
1375
|
this._onDidChangeBreakpoints.fire({ added: [newDataBreakpoint], sessionOnly: false });
|
|
1411
1376
|
}
|
|
@@ -1422,7 +1387,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1422
1387
|
this._onDidChangeBreakpoints.fire({ removed, sessionOnly: false });
|
|
1423
1388
|
}
|
|
1424
1389
|
addInstructionBreakpoint(instructionReference, offset, address, condition, hitCondition) {
|
|
1425
|
-
const newInstructionBreakpoint = (
|
|
1390
|
+
const newInstructionBreakpoint = ( new InstructionBreakpoint(
|
|
1426
1391
|
instructionReference,
|
|
1427
1392
|
offset,
|
|
1428
1393
|
false,
|
|
@@ -1431,7 +1396,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1431
1396
|
condition,
|
|
1432
1397
|
undefined,
|
|
1433
1398
|
address
|
|
1434
|
-
))
|
|
1399
|
+
));
|
|
1435
1400
|
this.instructionBreakpoints.push(newInstructionBreakpoint);
|
|
1436
1401
|
this._onDidChangeBreakpoints.fire({ added: [newInstructionBreakpoint], sessionOnly: true });
|
|
1437
1402
|
}
|
|
@@ -1456,7 +1421,7 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1456
1421
|
return this.watchExpressions;
|
|
1457
1422
|
}
|
|
1458
1423
|
addWatchExpression(name) {
|
|
1459
|
-
const we = (
|
|
1424
|
+
const we = ( new Expression(name || ''));
|
|
1460
1425
|
this.watchExpressions.push(we);
|
|
1461
1426
|
this._onDidChangeWatchExpressions.fire(we);
|
|
1462
1427
|
return we;
|
|
@@ -1490,10 +1455,10 @@ let DebugModel = class DebugModel extends Disposable {
|
|
|
1490
1455
|
this._onDidChangeCallStack.fire(undefined);
|
|
1491
1456
|
}
|
|
1492
1457
|
};
|
|
1493
|
-
DebugModel = (
|
|
1494
|
-
(
|
|
1495
|
-
(
|
|
1496
|
-
(
|
|
1497
|
-
], DebugModel))
|
|
1458
|
+
DebugModel = ( __decorate([
|
|
1459
|
+
( __param(1, ITextFileService)),
|
|
1460
|
+
( __param(2, IUriIdentityService)),
|
|
1461
|
+
( __param(3, ILogService))
|
|
1462
|
+
], DebugModel));
|
|
1498
1463
|
|
|
1499
1464
|
export { BaseBreakpoint, Breakpoint, DataBreakpoint, DebugModel, Enablement, ErrorScope, ExceptionBreakpoint, Expression, ExpressionContainer, FunctionBreakpoint, InstructionBreakpoint, MemoryRegion, Scope, StackFrame, Thread, ThreadAndSessionIds, Variable, getUriForDebugMemory };
|