@codingame/monaco-vscode-debug-service-override 1.82.4 → 1.82.5-next.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/debug.d.ts +5 -0
- package/debug.js +24 -0
- package/external/rollup-plugin-styles/dist/runtime/inject-css.js +3 -0
- package/external/tslib/tslib.es6.js +11 -0
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/override/vs/platform/dialogs/common/dialogs.js +8 -0
- package/package.json +2 -2
- package/vscode/src/vs/editor/common/services/languageFeaturesService.js +44 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +200 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointEditorContribution.js +785 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointWidget.js +399 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +1298 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackEditorContribution.js +178 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +960 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +497 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +347 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +299 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +400 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +827 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +621 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +60 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +527 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +681 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +356 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +206 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +82 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +143 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +1174 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +1144 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +106 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +68 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +275 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +314 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +168 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +663 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +105 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +231 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +631 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/breakpointWidget.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/callStackEditorContribution.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugHover.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +6 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +695 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +953 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +48 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +336 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +98 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +575 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +415 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +102 -0
- package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +21 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.js +17 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +100 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +59 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugModel.js +1482 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +346 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugSource.js +123 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +175 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +36 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +117 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +260 -0
- package/vscode/src/vs/workbench/contrib/debug/common/disassemblyViewInput.js +27 -0
- package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +83 -0
- package/vscode/src/vs/workbench/contrib/debug/common/replModel.js +283 -0
- package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +305 -0
- package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +28 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverSchema.js +176 -0
- package/vscode/src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.js +12 -0
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { ExtensionsRegistry } from 'vscode/vscode/vs/workbench/services/extensions/common/extensionsRegistry';
|
|
2
|
+
import * as nls from 'monaco-editor/esm/vs/nls.js';
|
|
3
|
+
import { launchSchemaId } from 'vscode/vscode/vs/workbench/services/configuration/common/configuration';
|
|
4
|
+
import { inputsSchema } from '../../../services/configurationResolver/common/configurationResolverSchema.js';
|
|
5
|
+
|
|
6
|
+
const debuggersExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
7
|
+
extensionPoint: 'debuggers',
|
|
8
|
+
defaultExtensionKind: ['workspace'],
|
|
9
|
+
jsonSchema: {
|
|
10
|
+
description: ( nls.localize('vscode.extension.contributes.debuggers', 'Contributes debug adapters.')),
|
|
11
|
+
type: 'array',
|
|
12
|
+
defaultSnippets: [{ body: [{ type: '' }] }],
|
|
13
|
+
items: {
|
|
14
|
+
additionalProperties: false,
|
|
15
|
+
type: 'object',
|
|
16
|
+
defaultSnippets: [{ body: { type: '', program: '', runtime: '' } }],
|
|
17
|
+
properties: {
|
|
18
|
+
type: {
|
|
19
|
+
description: ( nls.localize(
|
|
20
|
+
'vscode.extension.contributes.debuggers.type',
|
|
21
|
+
"Unique identifier for this debug adapter."
|
|
22
|
+
)),
|
|
23
|
+
type: 'string'
|
|
24
|
+
},
|
|
25
|
+
label: {
|
|
26
|
+
description: ( nls.localize(
|
|
27
|
+
'vscode.extension.contributes.debuggers.label',
|
|
28
|
+
"Display name for this debug adapter."
|
|
29
|
+
)),
|
|
30
|
+
type: 'string'
|
|
31
|
+
},
|
|
32
|
+
program: {
|
|
33
|
+
description: ( nls.localize(
|
|
34
|
+
'vscode.extension.contributes.debuggers.program',
|
|
35
|
+
"Path to the debug adapter program. Path is either absolute or relative to the extension folder."
|
|
36
|
+
)),
|
|
37
|
+
type: 'string'
|
|
38
|
+
},
|
|
39
|
+
args: {
|
|
40
|
+
description: ( nls.localize(
|
|
41
|
+
'vscode.extension.contributes.debuggers.args',
|
|
42
|
+
"Optional arguments to pass to the adapter."
|
|
43
|
+
)),
|
|
44
|
+
type: 'array'
|
|
45
|
+
},
|
|
46
|
+
runtime: {
|
|
47
|
+
description: ( nls.localize(
|
|
48
|
+
'vscode.extension.contributes.debuggers.runtime',
|
|
49
|
+
"Optional runtime in case the program attribute is not an executable but requires a runtime."
|
|
50
|
+
)),
|
|
51
|
+
type: 'string'
|
|
52
|
+
},
|
|
53
|
+
runtimeArgs: {
|
|
54
|
+
description: ( nls.localize(
|
|
55
|
+
'vscode.extension.contributes.debuggers.runtimeArgs',
|
|
56
|
+
"Optional runtime arguments."
|
|
57
|
+
)),
|
|
58
|
+
type: 'array'
|
|
59
|
+
},
|
|
60
|
+
variables: {
|
|
61
|
+
description: ( nls.localize(
|
|
62
|
+
'vscode.extension.contributes.debuggers.variables',
|
|
63
|
+
"Mapping from interactive variables (e.g. ${action.pickProcess}) in `launch.json` to a command."
|
|
64
|
+
)),
|
|
65
|
+
type: 'object'
|
|
66
|
+
},
|
|
67
|
+
initialConfigurations: {
|
|
68
|
+
description: ( nls.localize(
|
|
69
|
+
'vscode.extension.contributes.debuggers.initialConfigurations',
|
|
70
|
+
"Configurations for generating the initial \'launch.json\'."
|
|
71
|
+
)),
|
|
72
|
+
type: ['array', 'string'],
|
|
73
|
+
},
|
|
74
|
+
languages: {
|
|
75
|
+
description: ( nls.localize(
|
|
76
|
+
'vscode.extension.contributes.debuggers.languages',
|
|
77
|
+
"List of languages for which the debug extension could be considered the \"default debugger\"."
|
|
78
|
+
)),
|
|
79
|
+
type: 'array'
|
|
80
|
+
},
|
|
81
|
+
configurationSnippets: {
|
|
82
|
+
description: ( nls.localize(
|
|
83
|
+
'vscode.extension.contributes.debuggers.configurationSnippets',
|
|
84
|
+
"Snippets for adding new configurations in \'launch.json\'."
|
|
85
|
+
)),
|
|
86
|
+
type: 'array'
|
|
87
|
+
},
|
|
88
|
+
configurationAttributes: {
|
|
89
|
+
description: ( nls.localize(
|
|
90
|
+
'vscode.extension.contributes.debuggers.configurationAttributes',
|
|
91
|
+
"JSON schema configurations for validating \'launch.json\'."
|
|
92
|
+
)),
|
|
93
|
+
type: 'object'
|
|
94
|
+
},
|
|
95
|
+
when: {
|
|
96
|
+
description: ( nls.localize(
|
|
97
|
+
'vscode.extension.contributes.debuggers.when',
|
|
98
|
+
"Condition which must be true to enable this type of debugger. Consider using 'shellExecutionSupported', 'virtualWorkspace', 'resourceScheme' or an extension-defined context key as appropriate for this."
|
|
99
|
+
)),
|
|
100
|
+
type: 'string',
|
|
101
|
+
default: ''
|
|
102
|
+
},
|
|
103
|
+
deprecated: {
|
|
104
|
+
description: ( nls.localize(
|
|
105
|
+
'vscode.extension.contributes.debuggers.deprecated',
|
|
106
|
+
"Optional message to mark this debug type as being deprecated."
|
|
107
|
+
)),
|
|
108
|
+
type: 'string',
|
|
109
|
+
default: ''
|
|
110
|
+
},
|
|
111
|
+
windows: {
|
|
112
|
+
description: ( nls.localize(
|
|
113
|
+
'vscode.extension.contributes.debuggers.windows',
|
|
114
|
+
"Windows specific settings."
|
|
115
|
+
)),
|
|
116
|
+
type: 'object',
|
|
117
|
+
properties: {
|
|
118
|
+
runtime: {
|
|
119
|
+
description: ( nls.localize(
|
|
120
|
+
'vscode.extension.contributes.debuggers.windows.runtime',
|
|
121
|
+
"Runtime used for Windows."
|
|
122
|
+
)),
|
|
123
|
+
type: 'string'
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
osx: {
|
|
128
|
+
description: ( nls.localize('vscode.extension.contributes.debuggers.osx', "macOS specific settings.")),
|
|
129
|
+
type: 'object',
|
|
130
|
+
properties: {
|
|
131
|
+
runtime: {
|
|
132
|
+
description: ( nls.localize(
|
|
133
|
+
'vscode.extension.contributes.debuggers.osx.runtime',
|
|
134
|
+
"Runtime used for macOS."
|
|
135
|
+
)),
|
|
136
|
+
type: 'string'
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
linux: {
|
|
141
|
+
description: ( nls.localize('vscode.extension.contributes.debuggers.linux', "Linux specific settings.")),
|
|
142
|
+
type: 'object',
|
|
143
|
+
properties: {
|
|
144
|
+
runtime: {
|
|
145
|
+
description: ( nls.localize(
|
|
146
|
+
'vscode.extension.contributes.debuggers.linux.runtime',
|
|
147
|
+
"Runtime used for Linux."
|
|
148
|
+
)),
|
|
149
|
+
type: 'string'
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
strings: {
|
|
154
|
+
description: ( nls.localize(
|
|
155
|
+
'vscode.extension.contributes.debuggers.strings',
|
|
156
|
+
"UI strings contributed by this debug adapter."
|
|
157
|
+
)),
|
|
158
|
+
type: 'object',
|
|
159
|
+
properties: {
|
|
160
|
+
unverifiedBreakpoints: {
|
|
161
|
+
description: ( nls.localize(
|
|
162
|
+
'vscode.extension.contributes.debuggers.strings.unverifiedBreakpoints',
|
|
163
|
+
"When there are unverified breakpoints in a language supported by this debug adapter, this message will appear on the breakpoint hover and in the breakpoints view. Markdown and command links are supported."
|
|
164
|
+
)),
|
|
165
|
+
type: 'string'
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}));
|
|
173
|
+
const breakpointsExtPoint = ( ExtensionsRegistry.registerExtensionPoint({
|
|
174
|
+
extensionPoint: 'breakpoints',
|
|
175
|
+
jsonSchema: {
|
|
176
|
+
description: ( nls.localize('vscode.extension.contributes.breakpoints', 'Contributes breakpoints.')),
|
|
177
|
+
type: 'array',
|
|
178
|
+
defaultSnippets: [{ body: [{ language: '' }] }],
|
|
179
|
+
items: {
|
|
180
|
+
type: 'object',
|
|
181
|
+
additionalProperties: false,
|
|
182
|
+
defaultSnippets: [{ body: { language: '' } }],
|
|
183
|
+
properties: {
|
|
184
|
+
language: {
|
|
185
|
+
description: ( nls.localize(
|
|
186
|
+
'vscode.extension.contributes.breakpoints.language',
|
|
187
|
+
"Allow breakpoints for this language."
|
|
188
|
+
)),
|
|
189
|
+
type: 'string'
|
|
190
|
+
},
|
|
191
|
+
when: {
|
|
192
|
+
description: ( nls.localize(
|
|
193
|
+
'vscode.extension.contributes.breakpoints.when',
|
|
194
|
+
"Condition which must be true to enable breakpoints in this language. Consider matching this to the debugger when clause as appropriate."
|
|
195
|
+
)),
|
|
196
|
+
type: 'string',
|
|
197
|
+
default: ''
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}));
|
|
203
|
+
const presentationSchema = {
|
|
204
|
+
type: 'object',
|
|
205
|
+
description: ( nls.localize(
|
|
206
|
+
'presentation',
|
|
207
|
+
"Presentation options on how to show this configuration in the debug configuration dropdown and the command palette."
|
|
208
|
+
)),
|
|
209
|
+
properties: {
|
|
210
|
+
hidden: {
|
|
211
|
+
type: 'boolean',
|
|
212
|
+
default: false,
|
|
213
|
+
description: ( nls.localize(
|
|
214
|
+
'presentation.hidden',
|
|
215
|
+
"Controls if this configuration should be shown in the configuration dropdown and the command palette."
|
|
216
|
+
))
|
|
217
|
+
},
|
|
218
|
+
group: {
|
|
219
|
+
type: 'string',
|
|
220
|
+
default: '',
|
|
221
|
+
description: ( nls.localize(
|
|
222
|
+
'presentation.group',
|
|
223
|
+
"Group that this configuration belongs to. Used for grouping and sorting in the configuration dropdown and the command palette."
|
|
224
|
+
))
|
|
225
|
+
},
|
|
226
|
+
order: {
|
|
227
|
+
type: 'number',
|
|
228
|
+
default: 1,
|
|
229
|
+
description: ( nls.localize(
|
|
230
|
+
'presentation.order',
|
|
231
|
+
"Order of this configuration within a group. Used for grouping and sorting in the configuration dropdown and the command palette."
|
|
232
|
+
))
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
default: {
|
|
236
|
+
hidden: false,
|
|
237
|
+
group: '',
|
|
238
|
+
order: 1
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
const defaultCompound = { name: 'Compound', configurations: [] };
|
|
242
|
+
const launchSchema = {
|
|
243
|
+
id: launchSchemaId,
|
|
244
|
+
type: 'object',
|
|
245
|
+
title: ( nls.localize('app.launch.json.title', "Launch")),
|
|
246
|
+
allowTrailingCommas: true,
|
|
247
|
+
allowComments: true,
|
|
248
|
+
required: [],
|
|
249
|
+
default: { version: '0.2.0', configurations: [], compounds: [] },
|
|
250
|
+
properties: {
|
|
251
|
+
version: {
|
|
252
|
+
type: 'string',
|
|
253
|
+
description: ( nls.localize('app.launch.json.version', "Version of this file format.")),
|
|
254
|
+
default: '0.2.0'
|
|
255
|
+
},
|
|
256
|
+
configurations: {
|
|
257
|
+
type: 'array',
|
|
258
|
+
description: ( nls.localize(
|
|
259
|
+
'app.launch.json.configurations',
|
|
260
|
+
"List of configurations. Add new configurations or edit existing ones by using IntelliSense."
|
|
261
|
+
)),
|
|
262
|
+
items: {
|
|
263
|
+
defaultSnippets: [],
|
|
264
|
+
'type': 'object',
|
|
265
|
+
oneOf: []
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
compounds: {
|
|
269
|
+
type: 'array',
|
|
270
|
+
description: ( nls.localize(
|
|
271
|
+
'app.launch.json.compounds',
|
|
272
|
+
"List of compounds. Each compound references multiple configurations which will get launched together."
|
|
273
|
+
)),
|
|
274
|
+
items: {
|
|
275
|
+
type: 'object',
|
|
276
|
+
required: ['name', 'configurations'],
|
|
277
|
+
properties: {
|
|
278
|
+
name: {
|
|
279
|
+
type: 'string',
|
|
280
|
+
description: ( nls.localize(
|
|
281
|
+
'app.launch.json.compound.name',
|
|
282
|
+
"Name of compound. Appears in the launch configuration drop down menu."
|
|
283
|
+
))
|
|
284
|
+
},
|
|
285
|
+
presentation: presentationSchema,
|
|
286
|
+
configurations: {
|
|
287
|
+
type: 'array',
|
|
288
|
+
default: [],
|
|
289
|
+
items: {
|
|
290
|
+
oneOf: [{
|
|
291
|
+
enum: [],
|
|
292
|
+
description: ( nls.localize('useUniqueNames', "Please use unique configuration names."))
|
|
293
|
+
}, {
|
|
294
|
+
type: 'object',
|
|
295
|
+
required: ['name'],
|
|
296
|
+
properties: {
|
|
297
|
+
name: {
|
|
298
|
+
enum: [],
|
|
299
|
+
description: ( nls.localize(
|
|
300
|
+
'app.launch.json.compound.name',
|
|
301
|
+
"Name of compound. Appears in the launch configuration drop down menu."
|
|
302
|
+
))
|
|
303
|
+
},
|
|
304
|
+
folder: {
|
|
305
|
+
enum: [],
|
|
306
|
+
description: ( nls.localize(
|
|
307
|
+
'app.launch.json.compound.folder',
|
|
308
|
+
"Name of folder in which the compound is located."
|
|
309
|
+
))
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}]
|
|
313
|
+
},
|
|
314
|
+
description: ( nls.localize(
|
|
315
|
+
'app.launch.json.compounds.configurations',
|
|
316
|
+
"Names of configurations that will be started as part of this compound."
|
|
317
|
+
))
|
|
318
|
+
},
|
|
319
|
+
stopAll: {
|
|
320
|
+
type: 'boolean',
|
|
321
|
+
default: false,
|
|
322
|
+
description: ( nls.localize(
|
|
323
|
+
'app.launch.json.compound.stopAll',
|
|
324
|
+
"Controls whether manually terminating one session will stop all of the compound sessions."
|
|
325
|
+
))
|
|
326
|
+
},
|
|
327
|
+
preLaunchTask: {
|
|
328
|
+
type: 'string',
|
|
329
|
+
default: '',
|
|
330
|
+
description: ( nls.localize(
|
|
331
|
+
'compoundPrelaunchTask',
|
|
332
|
+
"Task to run before any of the compound configurations start."
|
|
333
|
+
))
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
default: defaultCompound
|
|
337
|
+
},
|
|
338
|
+
default: [
|
|
339
|
+
defaultCompound
|
|
340
|
+
]
|
|
341
|
+
},
|
|
342
|
+
inputs: inputsSchema.definitions.inputs
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
export { breakpointsExtPoint, debuggersExtPoint, launchSchema, presentationSchema };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import * as nls from 'monaco-editor/esm/vs/nls.js';
|
|
2
|
+
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
3
|
+
import { normalize, isAbsolute } from 'monaco-editor/esm/vs/base/common/path.js';
|
|
4
|
+
import * as resources from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
5
|
+
import { DEBUG_SCHEME } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
6
|
+
import { SIDE_GROUP, ACTIVE_GROUP } from 'vscode/vscode/vs/workbench/services/editor/common/editorService';
|
|
7
|
+
import { Schemas } from 'monaco-editor/esm/vs/base/common/network.js';
|
|
8
|
+
import { isUri } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugUtils';
|
|
9
|
+
|
|
10
|
+
const UNKNOWN_SOURCE_LABEL = ( nls.localize('unknownSource', "Unknown Source"));
|
|
11
|
+
class Source {
|
|
12
|
+
constructor(raw_, sessionId, uriIdentityService, logService) {
|
|
13
|
+
let path;
|
|
14
|
+
if (raw_) {
|
|
15
|
+
this.raw = raw_;
|
|
16
|
+
path = this.raw.path || this.raw.name || '';
|
|
17
|
+
this.available = true;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
this.raw = { name: UNKNOWN_SOURCE_LABEL };
|
|
21
|
+
this.available = false;
|
|
22
|
+
path = `${DEBUG_SCHEME}:${UNKNOWN_SOURCE_LABEL}`;
|
|
23
|
+
}
|
|
24
|
+
this.uri = getUriFromSource(this.raw, path, sessionId, uriIdentityService, logService);
|
|
25
|
+
}
|
|
26
|
+
get name() {
|
|
27
|
+
return this.raw.name || resources.basenameOrAuthority(this.uri);
|
|
28
|
+
}
|
|
29
|
+
get origin() {
|
|
30
|
+
return this.raw.origin;
|
|
31
|
+
}
|
|
32
|
+
get presentationHint() {
|
|
33
|
+
return this.raw.presentationHint;
|
|
34
|
+
}
|
|
35
|
+
get reference() {
|
|
36
|
+
return this.raw.sourceReference;
|
|
37
|
+
}
|
|
38
|
+
get inMemory() {
|
|
39
|
+
return this.uri.scheme === DEBUG_SCHEME;
|
|
40
|
+
}
|
|
41
|
+
openInEditor(editorService, selection, preserveFocus, sideBySide, pinned) {
|
|
42
|
+
return !this.available ? Promise.resolve(undefined) : editorService.openEditor({
|
|
43
|
+
resource: this.uri,
|
|
44
|
+
description: this.origin,
|
|
45
|
+
options: {
|
|
46
|
+
preserveFocus,
|
|
47
|
+
selection,
|
|
48
|
+
revealIfOpened: true,
|
|
49
|
+
selectionRevealType: 1 ,
|
|
50
|
+
pinned
|
|
51
|
+
}
|
|
52
|
+
}, sideBySide ? SIDE_GROUP : ACTIVE_GROUP);
|
|
53
|
+
}
|
|
54
|
+
static getEncodedDebugData(modelUri) {
|
|
55
|
+
let path;
|
|
56
|
+
let sourceReference;
|
|
57
|
+
let sessionId;
|
|
58
|
+
switch (modelUri.scheme) {
|
|
59
|
+
case Schemas.file:
|
|
60
|
+
path = normalize(modelUri.fsPath);
|
|
61
|
+
break;
|
|
62
|
+
case DEBUG_SCHEME:
|
|
63
|
+
path = modelUri.path;
|
|
64
|
+
if (modelUri.query) {
|
|
65
|
+
const keyvalues = modelUri.query.split('&');
|
|
66
|
+
for (const keyvalue of keyvalues) {
|
|
67
|
+
const pair = keyvalue.split('=');
|
|
68
|
+
if (pair.length === 2) {
|
|
69
|
+
switch (pair[0]) {
|
|
70
|
+
case 'session':
|
|
71
|
+
sessionId = pair[1];
|
|
72
|
+
break;
|
|
73
|
+
case 'ref':
|
|
74
|
+
sourceReference = parseInt(pair[1]);
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
default:
|
|
82
|
+
path = ( modelUri.toString());
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
name: resources.basenameOrAuthority(modelUri),
|
|
87
|
+
path,
|
|
88
|
+
sourceReference,
|
|
89
|
+
sessionId
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function getUriFromSource(raw, path, sessionId, uriIdentityService, logService) {
|
|
94
|
+
const _getUriFromSource = (path) => {
|
|
95
|
+
if (typeof raw.sourceReference === 'number' && raw.sourceReference > 0) {
|
|
96
|
+
return ( URI.from({
|
|
97
|
+
scheme: DEBUG_SCHEME,
|
|
98
|
+
path,
|
|
99
|
+
query: `session=${sessionId}&ref=${raw.sourceReference}`
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
102
|
+
if (path && isUri(path)) {
|
|
103
|
+
return uriIdentityService.asCanonicalUri(( URI.parse(path)));
|
|
104
|
+
}
|
|
105
|
+
if (path && isAbsolute(path)) {
|
|
106
|
+
return uriIdentityService.asCanonicalUri(URI.file(path));
|
|
107
|
+
}
|
|
108
|
+
return uriIdentityService.asCanonicalUri(( URI.from({
|
|
109
|
+
scheme: DEBUG_SCHEME,
|
|
110
|
+
path,
|
|
111
|
+
query: `session=${sessionId}`
|
|
112
|
+
})));
|
|
113
|
+
};
|
|
114
|
+
try {
|
|
115
|
+
return _getUriFromSource(path);
|
|
116
|
+
}
|
|
117
|
+
catch (err) {
|
|
118
|
+
logService.error('Invalid path from debug adapter: ' + path);
|
|
119
|
+
return _getUriFromSource('/invalidDebugSource');
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export { Source, UNKNOWN_SOURCE_LABEL, getUriFromSource };
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
|
|
3
|
+
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
4
|
+
import { Breakpoint, FunctionBreakpoint, ExceptionBreakpoint, DataBreakpoint, Expression } from './debugModel.js';
|
|
5
|
+
import { ITextFileService } from 'vscode/vscode/vs/workbench/services/textfile/common/textfiles';
|
|
6
|
+
import { IUriIdentityService } from 'monaco-editor/esm/vs/platform/uriIdentity/common/uriIdentity.js';
|
|
7
|
+
import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
8
|
+
import { observableValue } from 'monaco-editor/esm/vs/base/common/observable.js';
|
|
9
|
+
import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
10
|
+
|
|
11
|
+
const DEBUG_BREAKPOINTS_KEY = 'debug.breakpoint';
|
|
12
|
+
const DEBUG_FUNCTION_BREAKPOINTS_KEY = 'debug.functionbreakpoint';
|
|
13
|
+
const DEBUG_DATA_BREAKPOINTS_KEY = 'debug.databreakpoint';
|
|
14
|
+
const DEBUG_EXCEPTION_BREAKPOINTS_KEY = 'debug.exceptionbreakpoint';
|
|
15
|
+
const DEBUG_WATCH_EXPRESSIONS_KEY = 'debug.watchexpressions';
|
|
16
|
+
const DEBUG_CHOSEN_ENVIRONMENTS_KEY = 'debug.chosenenvironment';
|
|
17
|
+
const DEBUG_UX_STATE_KEY = 'debug.uxstate';
|
|
18
|
+
let DebugStorage = class DebugStorage extends Disposable {
|
|
19
|
+
constructor(storageService, textFileService, uriIdentityService, logService) {
|
|
20
|
+
super();
|
|
21
|
+
this.storageService = storageService;
|
|
22
|
+
this.textFileService = textFileService;
|
|
23
|
+
this.uriIdentityService = uriIdentityService;
|
|
24
|
+
this.logService = logService;
|
|
25
|
+
this.breakpoints = observableValue('debugBreakpoints', this.loadBreakpoints());
|
|
26
|
+
this.functionBreakpoints = observableValue('debugFunctionBreakpoints', this.loadFunctionBreakpoints());
|
|
27
|
+
this.exceptionBreakpoints = observableValue('debugExceptionBreakpoints', this.loadExceptionBreakpoints());
|
|
28
|
+
this.dataBreakpoints = observableValue('debugDataBreakpoints', this.loadDataBreakpoints());
|
|
29
|
+
this.watchExpressions = observableValue('debugWatchExpressions', this.loadWatchExpressions());
|
|
30
|
+
this._register(storageService.onDidChangeValue(1 , undefined, this._store)(e => {
|
|
31
|
+
if (e.external) {
|
|
32
|
+
switch (e.key) {
|
|
33
|
+
case DEBUG_BREAKPOINTS_KEY:
|
|
34
|
+
return this.breakpoints.set(this.loadBreakpoints(), undefined);
|
|
35
|
+
case DEBUG_FUNCTION_BREAKPOINTS_KEY:
|
|
36
|
+
return this.functionBreakpoints.set(this.loadFunctionBreakpoints(), undefined);
|
|
37
|
+
case DEBUG_EXCEPTION_BREAKPOINTS_KEY:
|
|
38
|
+
return this.exceptionBreakpoints.set(this.loadExceptionBreakpoints(), undefined);
|
|
39
|
+
case DEBUG_DATA_BREAKPOINTS_KEY:
|
|
40
|
+
return this.dataBreakpoints.set(this.loadDataBreakpoints(), undefined);
|
|
41
|
+
case DEBUG_WATCH_EXPRESSIONS_KEY:
|
|
42
|
+
return this.watchExpressions.set(this.loadWatchExpressions(), undefined);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
loadDebugUxState() {
|
|
48
|
+
return this.storageService.get(DEBUG_UX_STATE_KEY, 1 , 'default');
|
|
49
|
+
}
|
|
50
|
+
storeDebugUxState(value) {
|
|
51
|
+
this.storageService.store(DEBUG_UX_STATE_KEY, value, 1 , 1 );
|
|
52
|
+
}
|
|
53
|
+
loadBreakpoints() {
|
|
54
|
+
let result;
|
|
55
|
+
try {
|
|
56
|
+
result = ( JSON.parse(this.storageService.get(DEBUG_BREAKPOINTS_KEY, 1 , '[]')).map((breakpoint) => {
|
|
57
|
+
return ( new Breakpoint(( URI.parse(breakpoint.uri.external || breakpoint.source.uri.external)), breakpoint.lineNumber, breakpoint.column, breakpoint.enabled, breakpoint.condition, breakpoint.hitCondition, breakpoint.logMessage, breakpoint.adapterData, this.textFileService, this.uriIdentityService, this.logService, breakpoint.id));
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
catch (e) { }
|
|
61
|
+
return result || [];
|
|
62
|
+
}
|
|
63
|
+
loadFunctionBreakpoints() {
|
|
64
|
+
let result;
|
|
65
|
+
try {
|
|
66
|
+
result = ( JSON.parse(this.storageService.get(DEBUG_FUNCTION_BREAKPOINTS_KEY, 1 , '[]')).map((fb) => {
|
|
67
|
+
return ( new FunctionBreakpoint(fb.name, fb.enabled, fb.hitCondition, fb.condition, fb.logMessage, fb.id));
|
|
68
|
+
}));
|
|
69
|
+
}
|
|
70
|
+
catch (e) { }
|
|
71
|
+
return result || [];
|
|
72
|
+
}
|
|
73
|
+
loadExceptionBreakpoints() {
|
|
74
|
+
let result;
|
|
75
|
+
try {
|
|
76
|
+
result = ( JSON.parse(this.storageService.get(DEBUG_EXCEPTION_BREAKPOINTS_KEY, 1 , '[]')).map((exBreakpoint) => {
|
|
77
|
+
return ( new ExceptionBreakpoint(
|
|
78
|
+
exBreakpoint.filter,
|
|
79
|
+
exBreakpoint.label,
|
|
80
|
+
exBreakpoint.enabled,
|
|
81
|
+
exBreakpoint.supportsCondition,
|
|
82
|
+
exBreakpoint.condition,
|
|
83
|
+
exBreakpoint.description,
|
|
84
|
+
exBreakpoint.conditionDescription,
|
|
85
|
+
!!exBreakpoint.fallback
|
|
86
|
+
));
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
catch (e) { }
|
|
90
|
+
return result || [];
|
|
91
|
+
}
|
|
92
|
+
loadDataBreakpoints() {
|
|
93
|
+
let result;
|
|
94
|
+
try {
|
|
95
|
+
result = ( JSON.parse(this.storageService.get(DEBUG_DATA_BREAKPOINTS_KEY, 1 , '[]')).map((dbp) => {
|
|
96
|
+
return ( new DataBreakpoint(
|
|
97
|
+
dbp.description,
|
|
98
|
+
dbp.dataId,
|
|
99
|
+
true,
|
|
100
|
+
dbp.enabled,
|
|
101
|
+
dbp.hitCondition,
|
|
102
|
+
dbp.condition,
|
|
103
|
+
dbp.logMessage,
|
|
104
|
+
dbp.accessTypes,
|
|
105
|
+
dbp.accessType,
|
|
106
|
+
dbp.id
|
|
107
|
+
));
|
|
108
|
+
}));
|
|
109
|
+
}
|
|
110
|
+
catch (e) { }
|
|
111
|
+
return result || [];
|
|
112
|
+
}
|
|
113
|
+
loadWatchExpressions() {
|
|
114
|
+
let result;
|
|
115
|
+
try {
|
|
116
|
+
result = ( JSON.parse(this.storageService.get(DEBUG_WATCH_EXPRESSIONS_KEY, 1 , '[]')).map((watchStoredData) => {
|
|
117
|
+
return ( new Expression(watchStoredData.name, watchStoredData.id));
|
|
118
|
+
}));
|
|
119
|
+
}
|
|
120
|
+
catch (e) { }
|
|
121
|
+
return result || [];
|
|
122
|
+
}
|
|
123
|
+
loadChosenEnvironments() {
|
|
124
|
+
return JSON.parse(this.storageService.get(DEBUG_CHOSEN_ENVIRONMENTS_KEY, 1 , '{}'));
|
|
125
|
+
}
|
|
126
|
+
storeChosenEnvironments(environments) {
|
|
127
|
+
this.storageService.store(DEBUG_CHOSEN_ENVIRONMENTS_KEY, JSON.stringify(environments), 1 , 1 );
|
|
128
|
+
}
|
|
129
|
+
storeWatchExpressions(watchExpressions) {
|
|
130
|
+
if (watchExpressions.length) {
|
|
131
|
+
this.storageService.store(DEBUG_WATCH_EXPRESSIONS_KEY, JSON.stringify(( watchExpressions.map(we => ({ name: we.name, id: we.getId() })))), 1 , 1 );
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
this.storageService.remove(DEBUG_WATCH_EXPRESSIONS_KEY, 1 );
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
storeBreakpoints(debugModel) {
|
|
138
|
+
const breakpoints = debugModel.getBreakpoints();
|
|
139
|
+
if (breakpoints.length) {
|
|
140
|
+
this.storageService.store(DEBUG_BREAKPOINTS_KEY, JSON.stringify(breakpoints), 1 , 1 );
|
|
141
|
+
}
|
|
142
|
+
else {
|
|
143
|
+
this.storageService.remove(DEBUG_BREAKPOINTS_KEY, 1 );
|
|
144
|
+
}
|
|
145
|
+
const functionBreakpoints = debugModel.getFunctionBreakpoints();
|
|
146
|
+
if (functionBreakpoints.length) {
|
|
147
|
+
this.storageService.store(DEBUG_FUNCTION_BREAKPOINTS_KEY, JSON.stringify(functionBreakpoints), 1 , 1 );
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
this.storageService.remove(DEBUG_FUNCTION_BREAKPOINTS_KEY, 1 );
|
|
151
|
+
}
|
|
152
|
+
const dataBreakpoints = debugModel.getDataBreakpoints().filter(dbp => dbp.canPersist);
|
|
153
|
+
if (dataBreakpoints.length) {
|
|
154
|
+
this.storageService.store(DEBUG_DATA_BREAKPOINTS_KEY, JSON.stringify(dataBreakpoints), 1 , 1 );
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
this.storageService.remove(DEBUG_DATA_BREAKPOINTS_KEY, 1 );
|
|
158
|
+
}
|
|
159
|
+
const exceptionBreakpoints = debugModel.getExceptionBreakpoints();
|
|
160
|
+
if (exceptionBreakpoints.length) {
|
|
161
|
+
this.storageService.store(DEBUG_EXCEPTION_BREAKPOINTS_KEY, JSON.stringify(exceptionBreakpoints), 1 , 1 );
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
this.storageService.remove(DEBUG_EXCEPTION_BREAKPOINTS_KEY, 1 );
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
DebugStorage = ( __decorate([
|
|
169
|
+
( __param(0, IStorageService)),
|
|
170
|
+
( __param(1, ITextFileService)),
|
|
171
|
+
( __param(2, IUriIdentityService)),
|
|
172
|
+
( __param(3, ILogService))
|
|
173
|
+
], DebugStorage));
|
|
174
|
+
|
|
175
|
+
export { DebugStorage };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
|
|
2
|
+
import { ITelemetryService } from 'monaco-editor/esm/vs/platform/telemetry/common/telemetry.js';
|
|
3
|
+
|
|
4
|
+
let DebugTelemetry = class DebugTelemetry {
|
|
5
|
+
constructor(model, telemetryService) {
|
|
6
|
+
this.model = model;
|
|
7
|
+
this.telemetryService = telemetryService;
|
|
8
|
+
}
|
|
9
|
+
logDebugSessionStart(dbgr, launchJsonExists) {
|
|
10
|
+
const extension = dbgr.getMainExtensionDescriptor();
|
|
11
|
+
this.telemetryService.publicLog('debugSessionStart', {
|
|
12
|
+
type: dbgr.type,
|
|
13
|
+
breakpointCount: this.model.getBreakpoints().length,
|
|
14
|
+
exceptionBreakpoints: this.model.getExceptionBreakpoints(),
|
|
15
|
+
watchExpressionsCount: this.model.getWatchExpressions().length,
|
|
16
|
+
extensionName: extension.identifier.value,
|
|
17
|
+
isBuiltin: extension.isBuiltin,
|
|
18
|
+
launchJsonExists
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
logDebugSessionStop(session, adapterExitEvent) {
|
|
22
|
+
const breakpoints = this.model.getBreakpoints();
|
|
23
|
+
this.telemetryService.publicLog('debugSessionStop', {
|
|
24
|
+
type: session && session.configuration.type,
|
|
25
|
+
success: adapterExitEvent.emittedStopped || breakpoints.length === 0,
|
|
26
|
+
sessionLengthInSeconds: adapterExitEvent.sessionLengthInSeconds,
|
|
27
|
+
breakpointCount: breakpoints.length,
|
|
28
|
+
watchExpressionsCount: this.model.getWatchExpressions().length
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
DebugTelemetry = ( __decorate([
|
|
33
|
+
( __param(1, ITelemetryService))
|
|
34
|
+
], DebugTelemetry));
|
|
35
|
+
|
|
36
|
+
export { DebugTelemetry };
|