@codingame/monaco-vscode-debug-service-override 25.1.2 → 26.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 +41 -29
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +379 -255
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +606 -325
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +132 -91
- package/vscode/src/vs/workbench/contrib/debug/browser/debugChatIntegration.js +105 -103
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +258 -147
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +14 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +163 -121
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +92 -41
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +13 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +68 -39
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +290 -214
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +409 -260
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.js +14 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +19 -21
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +126 -100
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +8 -9
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +160 -89
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +87 -71
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +270 -181
- package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +79 -48
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +149 -113
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css +24 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +201 -189
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +28 -35
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.js +10 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.js +66 -86
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +24 -31
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +177 -138
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +55 -33
- package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +2 -4
- package/vscode/src/vs/workbench/contrib/debug/common/debugAccessibilityAnnouncer.js +8 -12
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +23 -19
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +9 -15
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +156 -133
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +81 -52
- package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +3 -5
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +22 -14
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +46 -30
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +74 -52
- package/vscode/src/vs/workbench/contrib/debug/common/replAccessibilityAnnouncer.js +11 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +7 -7
|
@@ -17,10 +17,12 @@ class DebugMemoryFileSystemProvider extends Disposable {
|
|
|
17
17
|
this.changeEmitter = ( new Emitter());
|
|
18
18
|
this.onDidChangeCapabilities = Event.None;
|
|
19
19
|
this.onDidChangeFile = this.changeEmitter.event;
|
|
20
|
-
this.capabilities = 0
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
this.capabilities = 0 | FileSystemProviderCapabilities.PathCaseSensitive | FileSystemProviderCapabilities.FileOpenReadWriteClose;
|
|
21
|
+
this._register(debugService.onDidEndSession((
|
|
22
|
+
{
|
|
23
|
+
session
|
|
24
|
+
}
|
|
25
|
+
) => {
|
|
24
26
|
for (const [fd, memory] of this.fdMemory) {
|
|
25
27
|
if (memory.session === session) {
|
|
26
28
|
this.close(fd);
|
|
@@ -30,13 +32,20 @@ class DebugMemoryFileSystemProvider extends Disposable {
|
|
|
30
32
|
}
|
|
31
33
|
watch(resource, opts) {
|
|
32
34
|
if (opts.recursive) {
|
|
33
|
-
return toDisposable(() => {
|
|
35
|
+
return toDisposable(() => {});
|
|
34
36
|
}
|
|
35
|
-
const {
|
|
37
|
+
const {
|
|
38
|
+
session,
|
|
39
|
+
memoryReference,
|
|
40
|
+
offset
|
|
41
|
+
} = this.parseUri(resource);
|
|
36
42
|
const disposable = ( new DisposableStore());
|
|
37
43
|
disposable.add(session.onDidChangeState(() => {
|
|
38
44
|
if (session.state === State.Running || session.state === State.Inactive) {
|
|
39
|
-
this.changeEmitter.fire([{
|
|
45
|
+
this.changeEmitter.fire([{
|
|
46
|
+
type: FileChangeType.DELETED,
|
|
47
|
+
resource
|
|
48
|
+
}]);
|
|
40
49
|
}
|
|
41
50
|
}));
|
|
42
51
|
disposable.add(session.onDidInvalidateMemory(e => {
|
|
@@ -46,18 +55,23 @@ class DebugMemoryFileSystemProvider extends Disposable {
|
|
|
46
55
|
if (offset && (e.body.offset >= offset.toOffset || e.body.offset + e.body.count < offset.fromOffset)) {
|
|
47
56
|
return;
|
|
48
57
|
}
|
|
49
|
-
this.changeEmitter.fire([{
|
|
58
|
+
this.changeEmitter.fire([{
|
|
59
|
+
resource,
|
|
60
|
+
type: FileChangeType.UPDATED
|
|
61
|
+
}]);
|
|
50
62
|
}));
|
|
51
63
|
return disposable;
|
|
52
64
|
}
|
|
53
65
|
stat(file) {
|
|
54
|
-
const {
|
|
66
|
+
const {
|
|
67
|
+
readOnly
|
|
68
|
+
} = this.parseUri(file);
|
|
55
69
|
return Promise.resolve({
|
|
56
70
|
type: FileType.File,
|
|
57
71
|
mtime: 0,
|
|
58
72
|
ctime: 0,
|
|
59
73
|
size: 0,
|
|
60
|
-
permissions: readOnly ? FilePermission.Readonly : undefined
|
|
74
|
+
permissions: readOnly ? FilePermission.Readonly : undefined
|
|
61
75
|
});
|
|
62
76
|
}
|
|
63
77
|
mkdir() {
|
|
@@ -73,13 +87,20 @@ class DebugMemoryFileSystemProvider extends Disposable {
|
|
|
73
87
|
throw createFileSystemProviderError(`Not allowed`, FileSystemProviderErrorCode.NoPermissions);
|
|
74
88
|
}
|
|
75
89
|
open(resource, _opts) {
|
|
76
|
-
const {
|
|
90
|
+
const {
|
|
91
|
+
session,
|
|
92
|
+
memoryReference,
|
|
93
|
+
offset
|
|
94
|
+
} = this.parseUri(resource);
|
|
77
95
|
const fd = this.memoryFdCounter++;
|
|
78
96
|
let region = session.getMemory(memoryReference);
|
|
79
97
|
if (offset) {
|
|
80
98
|
region = ( new MemoryRegionView(region, offset));
|
|
81
99
|
}
|
|
82
|
-
this.fdMemory.set(fd, {
|
|
100
|
+
this.fdMemory.set(fd, {
|
|
101
|
+
session,
|
|
102
|
+
region
|
|
103
|
+
});
|
|
83
104
|
return Promise.resolve(fd);
|
|
84
105
|
}
|
|
85
106
|
close(fd) {
|
|
@@ -88,60 +109,75 @@ class DebugMemoryFileSystemProvider extends Disposable {
|
|
|
88
109
|
return Promise.resolve();
|
|
89
110
|
}
|
|
90
111
|
async writeFile(resource, content) {
|
|
91
|
-
const {
|
|
112
|
+
const {
|
|
113
|
+
offset
|
|
114
|
+
} = this.parseUri(resource);
|
|
92
115
|
if (!offset) {
|
|
93
|
-
throw createFileSystemProviderError(
|
|
116
|
+
throw createFileSystemProviderError(
|
|
117
|
+
`Range must be present to read a file`,
|
|
118
|
+
FileSystemProviderErrorCode.FileNotFound
|
|
119
|
+
);
|
|
94
120
|
}
|
|
95
|
-
const fd = await this.open(resource, {
|
|
121
|
+
const fd = await this.open(resource, {
|
|
122
|
+
create: false
|
|
123
|
+
});
|
|
96
124
|
try {
|
|
97
125
|
await this.write(fd, offset.fromOffset, content, 0, content.length);
|
|
98
|
-
}
|
|
99
|
-
finally {
|
|
126
|
+
} finally {
|
|
100
127
|
this.close(fd);
|
|
101
128
|
}
|
|
102
129
|
}
|
|
103
130
|
async readFile(resource) {
|
|
104
|
-
const {
|
|
131
|
+
const {
|
|
132
|
+
offset
|
|
133
|
+
} = this.parseUri(resource);
|
|
105
134
|
if (!offset) {
|
|
106
|
-
throw createFileSystemProviderError(
|
|
135
|
+
throw createFileSystemProviderError(
|
|
136
|
+
`Range must be present to read a file`,
|
|
137
|
+
FileSystemProviderErrorCode.FileNotFound
|
|
138
|
+
);
|
|
107
139
|
}
|
|
108
140
|
const data = ( new Uint8Array(offset.toOffset - offset.fromOffset));
|
|
109
|
-
const fd = await this.open(resource, {
|
|
141
|
+
const fd = await this.open(resource, {
|
|
142
|
+
create: false
|
|
143
|
+
});
|
|
110
144
|
try {
|
|
111
145
|
await this.read(fd, offset.fromOffset, data, 0, data.length);
|
|
112
146
|
return data;
|
|
113
|
-
}
|
|
114
|
-
finally {
|
|
147
|
+
} finally {
|
|
115
148
|
this.close(fd);
|
|
116
149
|
}
|
|
117
150
|
}
|
|
118
151
|
async read(fd, pos, data, offset, length) {
|
|
119
152
|
const memory = this.fdMemory.get(fd);
|
|
120
153
|
if (!memory) {
|
|
121
|
-
throw createFileSystemProviderError(
|
|
154
|
+
throw createFileSystemProviderError(
|
|
155
|
+
`No file with that descriptor open`,
|
|
156
|
+
FileSystemProviderErrorCode.Unavailable
|
|
157
|
+
);
|
|
122
158
|
}
|
|
123
159
|
const ranges = await memory.region.read(pos, length);
|
|
124
160
|
let readSoFar = 0;
|
|
125
161
|
for (const range of ranges) {
|
|
126
162
|
switch (range.type) {
|
|
127
|
-
|
|
163
|
+
case MemoryRangeType.Unreadable:
|
|
164
|
+
return readSoFar;
|
|
165
|
+
case MemoryRangeType.Error:
|
|
166
|
+
if (readSoFar > 0) {
|
|
128
167
|
return readSoFar;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
throw createFileSystemProviderError(range.error, FileSystemProviderErrorCode.Unknown);
|
|
135
|
-
}
|
|
136
|
-
case MemoryRangeType.Valid: {
|
|
168
|
+
} else {
|
|
169
|
+
throw createFileSystemProviderError(range.error, FileSystemProviderErrorCode.Unknown);
|
|
170
|
+
}
|
|
171
|
+
case MemoryRangeType.Valid:
|
|
172
|
+
{
|
|
137
173
|
const start = Math.max(0, pos - range.offset);
|
|
138
174
|
const toWrite = range.data.slice(start, Math.min(range.data.byteLength, start + (length - readSoFar)));
|
|
139
175
|
data.set(toWrite.buffer, offset + readSoFar);
|
|
140
176
|
readSoFar += toWrite.byteLength;
|
|
141
177
|
break;
|
|
142
178
|
}
|
|
143
|
-
|
|
144
|
-
|
|
179
|
+
default:
|
|
180
|
+
assertNever();
|
|
145
181
|
}
|
|
146
182
|
}
|
|
147
183
|
return readSoFar;
|
|
@@ -149,13 +185,19 @@ class DebugMemoryFileSystemProvider extends Disposable {
|
|
|
149
185
|
write(fd, pos, data, offset, length) {
|
|
150
186
|
const memory = this.fdMemory.get(fd);
|
|
151
187
|
if (!memory) {
|
|
152
|
-
throw createFileSystemProviderError(
|
|
188
|
+
throw createFileSystemProviderError(
|
|
189
|
+
`No file with that descriptor open`,
|
|
190
|
+
FileSystemProviderErrorCode.Unavailable
|
|
191
|
+
);
|
|
153
192
|
}
|
|
154
193
|
return memory.region.write(pos, VSBuffer.wrap(data).slice(offset, offset + length));
|
|
155
194
|
}
|
|
156
195
|
parseUri(uri) {
|
|
157
196
|
if (uri.scheme !== DEBUG_MEMORY_SCHEME) {
|
|
158
|
-
throw createFileSystemProviderError(
|
|
197
|
+
throw createFileSystemProviderError(
|
|
198
|
+
`Cannot open file with scheme ${uri.scheme}`,
|
|
199
|
+
FileSystemProviderErrorCode.FileNotFound
|
|
200
|
+
);
|
|
159
201
|
}
|
|
160
202
|
const session = this.debugService.getModel().getSession(uri.authority);
|
|
161
203
|
if (!session) {
|
|
@@ -164,15 +206,18 @@ class DebugMemoryFileSystemProvider extends Disposable {
|
|
|
164
206
|
let offset;
|
|
165
207
|
const rangeMatch = rangeRe.exec(uri.query);
|
|
166
208
|
if (rangeMatch) {
|
|
167
|
-
offset = {
|
|
209
|
+
offset = {
|
|
210
|
+
fromOffset: Number(rangeMatch[1]),
|
|
211
|
+
toOffset: Number(rangeMatch[2])
|
|
212
|
+
};
|
|
168
213
|
}
|
|
169
|
-
const [, memoryReference] = uri.path.split(
|
|
214
|
+
const [, memoryReference] = uri.path.split("/");
|
|
170
215
|
return {
|
|
171
216
|
session,
|
|
172
217
|
offset,
|
|
173
218
|
readOnly: !session.capabilities.supportsWriteMemoryRequest,
|
|
174
219
|
sessionId: uri.authority,
|
|
175
|
-
memoryReference: decodeURIComponent(memoryReference)
|
|
220
|
+
memoryReference: decodeURIComponent(memoryReference)
|
|
176
221
|
};
|
|
177
222
|
}
|
|
178
223
|
}
|
|
@@ -190,7 +235,10 @@ class MemoryRegionView extends Disposable {
|
|
|
190
235
|
const fromOffset = clamp(e.fromOffset - range.fromOffset, 0, this.width);
|
|
191
236
|
const toOffset = clamp(e.toOffset - range.fromOffset, 0, this.width);
|
|
192
237
|
if (toOffset > fromOffset) {
|
|
193
|
-
this.invalidateEmitter.fire({
|
|
238
|
+
this.invalidateEmitter.fire({
|
|
239
|
+
fromOffset,
|
|
240
|
+
toOffset
|
|
241
|
+
});
|
|
194
242
|
}
|
|
195
243
|
}));
|
|
196
244
|
}
|
|
@@ -198,7 +246,10 @@ class MemoryRegionView extends Disposable {
|
|
|
198
246
|
if (fromOffset < 0) {
|
|
199
247
|
throw ( new RangeError(`Invalid fromOffset: ${fromOffset}`));
|
|
200
248
|
}
|
|
201
|
-
return this.parent.read(
|
|
249
|
+
return this.parent.read(
|
|
250
|
+
this.range.fromOffset + fromOffset,
|
|
251
|
+
this.range.fromOffset + Math.min(toOffset, this.width)
|
|
252
|
+
);
|
|
202
253
|
}
|
|
203
254
|
write(offset, data) {
|
|
204
255
|
return this.parent.write(this.range.fromOffset + offset, data);
|
|
@@ -12,21 +12,26 @@ let DebugProgressContribution = class DebugProgressContribution {
|
|
|
12
12
|
constructor(debugService, progressService, viewsService) {
|
|
13
13
|
this.toDispose = [];
|
|
14
14
|
let progressListener;
|
|
15
|
-
const listenOnProgress =
|
|
15
|
+
const listenOnProgress = session => {
|
|
16
16
|
if (progressListener) {
|
|
17
17
|
progressListener.dispose();
|
|
18
18
|
progressListener = undefined;
|
|
19
19
|
}
|
|
20
20
|
if (session) {
|
|
21
|
-
progressListener = session.onDidProgressStart(async
|
|
21
|
+
progressListener = session.onDidProgressStart(async progressStartEvent => {
|
|
22
22
|
const promise = ( new Promise(r => {
|
|
23
|
-
const listener = Event.any(Event.filter(
|
|
23
|
+
const listener = Event.any(Event.filter(
|
|
24
|
+
session.onDidProgressEnd,
|
|
25
|
+
e => e.body.progressId === progressStartEvent.body.progressId
|
|
26
|
+
), session.onDidEndAdapter)(() => {
|
|
24
27
|
listener.dispose();
|
|
25
28
|
r();
|
|
26
29
|
});
|
|
27
30
|
}));
|
|
28
31
|
if (viewsService.isViewContainerVisible(VIEWLET_ID)) {
|
|
29
|
-
progressService.withProgress({
|
|
32
|
+
progressService.withProgress({
|
|
33
|
+
location: VIEWLET_ID
|
|
34
|
+
}, () => promise);
|
|
30
35
|
}
|
|
31
36
|
const source = debugService.getAdapterManager().getDebuggerLabel(session.configuration.type);
|
|
32
37
|
progressService.withProgress({
|
|
@@ -37,16 +42,16 @@ let DebugProgressContribution = class DebugProgressContribution {
|
|
|
37
42
|
delay: 500
|
|
38
43
|
}, progressStep => {
|
|
39
44
|
let total = 0;
|
|
40
|
-
const reportProgress =
|
|
45
|
+
const reportProgress = progress => {
|
|
41
46
|
let increment = undefined;
|
|
42
|
-
if (typeof progress.percentage ===
|
|
47
|
+
if (typeof progress.percentage === "number") {
|
|
43
48
|
increment = progress.percentage - total;
|
|
44
49
|
total += increment;
|
|
45
50
|
}
|
|
46
51
|
progressStep.report({
|
|
47
52
|
message: progress.message,
|
|
48
53
|
increment,
|
|
49
|
-
total: typeof increment ===
|
|
54
|
+
total: typeof increment === "number" ? 100 : undefined
|
|
50
55
|
});
|
|
51
56
|
};
|
|
52
57
|
if (progressStartEvent.body.message) {
|
|
@@ -74,10 +79,6 @@ let DebugProgressContribution = class DebugProgressContribution {
|
|
|
74
79
|
dispose(this.toDispose);
|
|
75
80
|
}
|
|
76
81
|
};
|
|
77
|
-
DebugProgressContribution = ( __decorate([
|
|
78
|
-
( __param(0, IDebugService)),
|
|
79
|
-
( __param(1, IProgressService)),
|
|
80
|
-
( __param(2, IViewsService))
|
|
81
|
-
], DebugProgressContribution));
|
|
82
|
+
DebugProgressContribution = ( __decorate([( __param(0, IDebugService)), ( __param(1, IProgressService)), ( __param(2, IViewsService))], DebugProgressContribution));
|
|
82
83
|
|
|
83
84
|
export { DebugProgressContribution };
|
|
@@ -16,7 +16,7 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
16
16
|
constructor(debugService, contextService, commandService, notificationService) {
|
|
17
17
|
super(DEBUG_QUICK_ACCESS_PREFIX, {
|
|
18
18
|
noResultsPick: {
|
|
19
|
-
label: ( localize(
|
|
19
|
+
label: ( localize(7177, "No matching launch configurations"))
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
this.debugService = debugService;
|
|
@@ -29,7 +29,10 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
29
29
|
if (!this.debugService.getAdapterManager().hasEnabledDebuggers()) {
|
|
30
30
|
return [];
|
|
31
31
|
}
|
|
32
|
-
picks.push({
|
|
32
|
+
picks.push({
|
|
33
|
+
type: "separator",
|
|
34
|
+
label: "launch.json"
|
|
35
|
+
});
|
|
33
36
|
const configManager = this.debugService.getConfigurationManager();
|
|
34
37
|
const selectedConfiguration = configManager.selectedConfiguration;
|
|
35
38
|
let lastGroup;
|
|
@@ -38,33 +41,43 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
38
41
|
if (highlights) {
|
|
39
42
|
const pick = {
|
|
40
43
|
label: config.name,
|
|
41
|
-
description: this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? config.launch.name :
|
|
42
|
-
highlights: {
|
|
44
|
+
description: this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? config.launch.name : "",
|
|
45
|
+
highlights: {
|
|
46
|
+
label: highlights
|
|
47
|
+
},
|
|
43
48
|
buttons: [{
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
49
|
+
iconClass: ThemeIcon.asClassName(debugConfigure),
|
|
50
|
+
tooltip: ( localize(7178, "Configure Launch Configuration"))
|
|
51
|
+
}],
|
|
47
52
|
trigger: () => {
|
|
48
|
-
config.launch.openConfigFile({
|
|
53
|
+
config.launch.openConfigFile({
|
|
54
|
+
preserveFocus: false
|
|
55
|
+
});
|
|
49
56
|
return TriggerAction.CLOSE_PICKER;
|
|
50
57
|
},
|
|
51
58
|
accept: async () => {
|
|
52
59
|
await configManager.selectConfiguration(config.launch, config.name);
|
|
53
60
|
try {
|
|
54
|
-
await this.debugService.startDebugging(config.launch, undefined, {
|
|
55
|
-
|
|
56
|
-
|
|
61
|
+
await this.debugService.startDebugging(config.launch, undefined, {
|
|
62
|
+
startedByUser: true
|
|
63
|
+
});
|
|
64
|
+
} catch (error) {
|
|
57
65
|
this.notificationService.error(error);
|
|
58
66
|
}
|
|
59
67
|
}
|
|
60
68
|
};
|
|
61
69
|
if (selectedConfiguration.name === config.name && selectedConfiguration.launch === config.launch) {
|
|
62
|
-
const separator = {
|
|
70
|
+
const separator = {
|
|
71
|
+
type: "separator",
|
|
72
|
+
label: ( localize(7179, "Most Recent"))
|
|
73
|
+
};
|
|
63
74
|
picks.unshift(separator, pick);
|
|
64
75
|
continue;
|
|
65
76
|
}
|
|
66
77
|
if (lastGroup !== config.presentation?.group) {
|
|
67
|
-
picks.push({
|
|
78
|
+
picks.push({
|
|
79
|
+
type: "separator"
|
|
80
|
+
});
|
|
68
81
|
lastGroup = config.presentation?.group;
|
|
69
82
|
}
|
|
70
83
|
picks.push(pick);
|
|
@@ -73,31 +86,45 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
73
86
|
const dynamicProviders = await configManager.getDynamicProviders();
|
|
74
87
|
if (dynamicProviders.length > 0) {
|
|
75
88
|
picks.push({
|
|
76
|
-
type:
|
|
89
|
+
type: "separator",
|
|
90
|
+
label: ( localize(7180, "contributed"))
|
|
77
91
|
});
|
|
78
92
|
}
|
|
79
|
-
configManager.getRecentDynamicConfigurations().forEach((
|
|
93
|
+
configManager.getRecentDynamicConfigurations().forEach((
|
|
94
|
+
{
|
|
95
|
+
name,
|
|
96
|
+
type
|
|
97
|
+
}
|
|
98
|
+
) => {
|
|
80
99
|
const highlights = matchesFuzzy(filter, name, true);
|
|
81
100
|
if (highlights) {
|
|
82
101
|
picks.push({
|
|
83
102
|
label: name,
|
|
84
|
-
highlights: {
|
|
103
|
+
highlights: {
|
|
104
|
+
label: highlights
|
|
105
|
+
},
|
|
85
106
|
buttons: [{
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
107
|
+
iconClass: ThemeIcon.asClassName(debugRemoveConfig),
|
|
108
|
+
tooltip: ( localize(7181, "Remove Launch Configuration"))
|
|
109
|
+
}],
|
|
89
110
|
trigger: () => {
|
|
90
111
|
configManager.removeRecentDynamicConfigurations(name, type);
|
|
91
112
|
return TriggerAction.CLOSE_PICKER;
|
|
92
113
|
},
|
|
93
114
|
accept: async () => {
|
|
94
|
-
await configManager.selectConfiguration(undefined, name, undefined, {
|
|
115
|
+
await configManager.selectConfiguration(undefined, name, undefined, {
|
|
116
|
+
type
|
|
117
|
+
});
|
|
95
118
|
try {
|
|
96
|
-
const {
|
|
119
|
+
const {
|
|
120
|
+
launch,
|
|
121
|
+
getConfig
|
|
122
|
+
} = configManager.selectedConfiguration;
|
|
97
123
|
const config = await getConfig();
|
|
98
|
-
await this.debugService.startDebugging(launch, config, {
|
|
99
|
-
|
|
100
|
-
|
|
124
|
+
await this.debugService.startDebugging(launch, config, {
|
|
125
|
+
startedByUser: true
|
|
126
|
+
});
|
|
127
|
+
} catch (error) {
|
|
101
128
|
this.notificationService.error(error);
|
|
102
129
|
}
|
|
103
130
|
}
|
|
@@ -107,39 +134,41 @@ let StartDebugQuickAccessProvider = class StartDebugQuickAccessProvider extends
|
|
|
107
134
|
dynamicProviders.forEach(provider => {
|
|
108
135
|
picks.push({
|
|
109
136
|
label: `$(folder) ${provider.label}...`,
|
|
110
|
-
ariaLabel: ( localize(
|
|
137
|
+
ariaLabel: ( localize(7182, "{0} contributed configurations", provider.label)),
|
|
111
138
|
accept: async () => {
|
|
112
139
|
const pick = await provider.pick();
|
|
113
140
|
if (pick) {
|
|
114
|
-
await configManager.selectConfiguration(pick.launch, pick.config.name, pick.config, {
|
|
115
|
-
|
|
141
|
+
await configManager.selectConfiguration(pick.launch, pick.config.name, pick.config, {
|
|
142
|
+
type: provider.type
|
|
143
|
+
});
|
|
144
|
+
this.debugService.startDebugging(pick.launch, pick.config, {
|
|
145
|
+
startedByUser: true
|
|
146
|
+
});
|
|
116
147
|
}
|
|
117
148
|
}
|
|
118
149
|
});
|
|
119
150
|
});
|
|
120
151
|
const visibleLaunches = configManager.getLaunches().filter(launch => !launch.hidden);
|
|
121
152
|
if (visibleLaunches.length > 0) {
|
|
122
|
-
picks.push({
|
|
153
|
+
picks.push({
|
|
154
|
+
type: "separator",
|
|
155
|
+
label: ( localize(7183, "configure"))
|
|
156
|
+
});
|
|
123
157
|
}
|
|
124
158
|
for (const launch of visibleLaunches) {
|
|
125
|
-
const label = this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ?
|
|
126
|
-
( localize(6873, "Add Config ({0})...", launch.name)) :
|
|
127
|
-
( localize(6874, "Add Configuration..."));
|
|
159
|
+
const label = this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? ( localize(7184, "Add Config ({0})...", launch.name)) : ( localize(7185, "Add Configuration..."));
|
|
128
160
|
picks.push({
|
|
129
161
|
label,
|
|
130
|
-
description: this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? launch.name :
|
|
131
|
-
highlights: {
|
|
162
|
+
description: this.contextService.getWorkbenchState() === WorkbenchState.WORKSPACE ? launch.name : "",
|
|
163
|
+
highlights: {
|
|
164
|
+
label: matchesFuzzy(filter, label, true) ?? undefined
|
|
165
|
+
},
|
|
132
166
|
accept: () => this.commandService.executeCommand(ADD_CONFIGURATION_ID, ( launch.uri.toString()))
|
|
133
167
|
});
|
|
134
168
|
}
|
|
135
169
|
return picks;
|
|
136
170
|
}
|
|
137
171
|
};
|
|
138
|
-
StartDebugQuickAccessProvider = ( __decorate([
|
|
139
|
-
( __param(0, IDebugService)),
|
|
140
|
-
( __param(1, IWorkspaceContextService)),
|
|
141
|
-
( __param(2, ICommandService)),
|
|
142
|
-
( __param(3, INotificationService))
|
|
143
|
-
], StartDebugQuickAccessProvider));
|
|
172
|
+
StartDebugQuickAccessProvider = ( __decorate([( __param(0, IDebugService)), ( __param(1, IWorkspaceContextService)), ( __param(2, ICommandService)), ( __param(3, INotificationService))], StartDebugQuickAccessProvider));
|
|
144
173
|
|
|
145
174
|
export { StartDebugQuickAccessProvider };
|