@theia/debug 1.17.0-next.ff9e0507 → 1.18.0-next.04e2816d
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/lib/browser/breakpoint/breakpoint-manager.js +159 -382
- package/lib/browser/breakpoint/breakpoint-manager.js.map +1 -1
- package/lib/browser/breakpoint/breakpoint-marker.js +4 -15
- package/lib/browser/breakpoint/breakpoint-marker.js.map +1 -1
- package/lib/browser/console/debug-console-contribution.d.ts.map +1 -1
- package/lib/browser/console/debug-console-contribution.js +132 -221
- package/lib/browser/console/debug-console-contribution.js.map +1 -1
- package/lib/browser/console/debug-console-items.js +231 -451
- package/lib/browser/console/debug-console-items.js.map +1 -1
- package/lib/browser/console/debug-console-session.js +86 -223
- package/lib/browser/console/debug-console-session.js.map +1 -1
- package/lib/browser/debug-configuration-manager.js +281 -623
- package/lib/browser/debug-configuration-manager.js.map +1 -1
- package/lib/browser/debug-configuration-model.js +31 -108
- package/lib/browser/debug-configuration-model.js.map +1 -1
- package/lib/browser/debug-frontend-application-contribution.d.ts +1 -0
- package/lib/browser/debug-frontend-application-contribution.d.ts.map +1 -1
- package/lib/browser/debug-frontend-application-contribution.js +577 -780
- package/lib/browser/debug-frontend-application-contribution.js.map +1 -1
- package/lib/browser/debug-frontend-module.js +46 -82
- package/lib/browser/debug-frontend-module.js.map +1 -1
- package/lib/browser/debug-keybinding-contexts.js +41 -59
- package/lib/browser/debug-keybinding-contexts.js.map +1 -1
- package/lib/browser/debug-monaco-contribution.js +17 -17
- package/lib/browser/debug-monaco-contribution.js.map +1 -1
- package/lib/browser/debug-package.spec.js +2 -2
- package/lib/browser/debug-package.spec.js.map +1 -1
- package/lib/browser/debug-preferences.js +7 -11
- package/lib/browser/debug-preferences.js.map +1 -1
- package/lib/browser/debug-prefix-configuration.js +101 -117
- package/lib/browser/debug-prefix-configuration.js.map +1 -1
- package/lib/browser/debug-resource.js +29 -79
- package/lib/browser/debug-resource.js.map +1 -1
- package/lib/browser/debug-schema-updater.js +54 -193
- package/lib/browser/debug-schema-updater.js.map +1 -1
- package/lib/browser/debug-session-connection.js +137 -235
- package/lib/browser/debug-session-connection.js.map +1 -1
- package/lib/browser/debug-session-contribution.js +91 -120
- package/lib/browser/debug-session-contribution.js.map +1 -1
- package/lib/browser/debug-session-manager.js +368 -652
- package/lib/browser/debug-session-manager.js.map +1 -1
- package/lib/browser/debug-session.js +556 -1279
- package/lib/browser/debug-session.js.map +1 -1
- package/lib/browser/debug-tab-bar-decorator.js +32 -38
- package/lib/browser/debug-tab-bar-decorator.js.map +1 -1
- package/lib/browser/debug-watch-manager.js +41 -138
- package/lib/browser/debug-watch-manager.js.map +1 -1
- package/lib/browser/editor/debug-breakpoint-widget.js +142 -255
- package/lib/browser/editor/debug-breakpoint-widget.js.map +1 -1
- package/lib/browser/editor/debug-editor-model.js +299 -474
- package/lib/browser/editor/debug-editor-model.js.map +1 -1
- package/lib/browser/editor/debug-editor-service.js +128 -206
- package/lib/browser/editor/debug-editor-service.js.map +1 -1
- package/lib/browser/editor/debug-exception-widget.js +56 -119
- package/lib/browser/editor/debug-exception-widget.js.map +1 -1
- package/lib/browser/editor/debug-expression-provider.js +21 -24
- package/lib/browser/editor/debug-expression-provider.js.map +1 -1
- package/lib/browser/editor/debug-hover-source.js +83 -249
- package/lib/browser/editor/debug-hover-source.js.map +1 -1
- package/lib/browser/editor/debug-hover-widget.js +151 -224
- package/lib/browser/editor/debug-hover-widget.js.map +1 -1
- package/lib/browser/editor/debug-inline-value-decorator.js +96 -193
- package/lib/browser/editor/debug-inline-value-decorator.js.map +1 -1
- package/lib/browser/model/debug-breakpoint.js +52 -102
- package/lib/browser/model/debug-breakpoint.js.map +1 -1
- package/lib/browser/model/debug-function-breakpoint.js +54 -124
- package/lib/browser/model/debug-function-breakpoint.js.map +1 -1
- package/lib/browser/model/debug-source-breakpoint.js +111 -265
- package/lib/browser/model/debug-source-breakpoint.js.map +1 -1
- package/lib/browser/model/debug-source.js +45 -126
- package/lib/browser/model/debug-source.js.map +1 -1
- package/lib/browser/model/debug-stack-frame.js +85 -199
- package/lib/browser/model/debug-stack-frame.js.map +1 -1
- package/lib/browser/model/debug-thread.js +132 -304
- package/lib/browser/model/debug-thread.js.map +1 -1
- package/lib/browser/preferences/launch-preferences.js +3 -3
- package/lib/browser/preferences/launch-preferences.js.map +1 -1
- package/lib/browser/view/debug-action.js +13 -29
- package/lib/browser/view/debug-action.js.map +1 -1
- package/lib/browser/view/debug-breakpoints-source.js +42 -169
- package/lib/browser/view/debug-breakpoints-source.js.map +1 -1
- package/lib/browser/view/debug-breakpoints-widget.js +43 -82
- package/lib/browser/view/debug-breakpoints-widget.js.map +1 -1
- package/lib/browser/view/debug-configuration-widget.js +89 -136
- package/lib/browser/view/debug-configuration-widget.js.map +1 -1
- package/lib/browser/view/debug-exception-breakpoint.js +7 -9
- package/lib/browser/view/debug-exception-breakpoint.js.map +1 -1
- package/lib/browser/view/debug-session-widget.js +80 -114
- package/lib/browser/view/debug-session-widget.js.map +1 -1
- package/lib/browser/view/debug-stack-frames-source.js +58 -169
- package/lib/browser/view/debug-stack-frames-source.js.map +1 -1
- package/lib/browser/view/debug-stack-frames-widget.js +89 -155
- package/lib/browser/view/debug-stack-frames-widget.js.map +1 -1
- package/lib/browser/view/debug-threads-source.js +37 -124
- package/lib/browser/view/debug-threads-source.js.map +1 -1
- package/lib/browser/view/debug-threads-widget.js +61 -99
- package/lib/browser/view/debug-threads-widget.js.map +1 -1
- package/lib/browser/view/debug-toolbar-widget.js +58 -76
- package/lib/browser/view/debug-toolbar-widget.js.map +1 -1
- package/lib/browser/view/debug-variables-source.js +32 -102
- package/lib/browser/view/debug-variables-source.js.map +1 -1
- package/lib/browser/view/debug-variables-widget.js +35 -74
- package/lib/browser/view/debug-variables-widget.js.map +1 -1
- package/lib/browser/view/debug-view-model.js +172 -381
- package/lib/browser/view/debug-view-model.js.map +1 -1
- package/lib/browser/view/debug-watch-expression.js +34 -112
- package/lib/browser/view/debug-watch-expression.js.map +1 -1
- package/lib/browser/view/debug-watch-source.js +30 -87
- package/lib/browser/view/debug-watch-source.js.map +1 -1
- package/lib/browser/view/debug-watch-widget.js +35 -74
- package/lib/browser/view/debug-watch-widget.js.map +1 -1
- package/lib/browser/view/debug-widget.js +63 -105
- package/lib/browser/view/debug-widget.js.map +1 -1
- package/lib/common/debug-service.js +5 -5
- package/lib/common/debug-service.js.map +1 -1
- package/lib/node/debug-adapter-contribution-registry.js +133 -489
- package/lib/node/debug-adapter-contribution-registry.js.map +1 -1
- package/lib/node/debug-adapter-factory.js +38 -57
- package/lib/node/debug-adapter-factory.js.map +1 -1
- package/lib/node/debug-adapter-session-manager.js +50 -98
- package/lib/node/debug-adapter-session-manager.js.map +1 -1
- package/lib/node/debug-adapter-session.js +44 -93
- package/lib/node/debug-adapter-session.js.map +1 -1
- package/lib/node/debug-backend-module.js +13 -17
- package/lib/node/debug-backend-module.js.map +1 -1
- package/lib/node/debug-service-impl.js +71 -213
- package/lib/node/debug-service-impl.js.map +1 -1
- package/lib/node/vscode/vscode-debug-adapter-contribution.js +153 -294
- package/lib/node/vscode/vscode-debug-adapter-contribution.js.map +1 -1
- package/package.json +16 -16
- package/src/browser/console/debug-console-contribution.tsx +3 -3
- package/src/browser/debug-frontend-application-contribution.ts +69 -18
- package/src/browser/debug-prefix-configuration.ts +1 -1
- package/src/browser/style/index.css +28 -10
- package/src/browser/view/debug-action.tsx +2 -2
- package/src/browser/view/debug-configuration-widget.tsx +3 -3
- package/src/browser/view/debug-session-widget.ts +2 -2
- package/src/browser/view/debug-toolbar-widget.tsx +8 -8
- package/src/browser/view/debug-widget.ts +2 -2
|
@@ -14,19 +14,6 @@
|
|
|
14
14
|
*
|
|
15
15
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
16
|
********************************************************************************/
|
|
17
|
-
var __extends = (this && this.__extends) || (function () {
|
|
18
|
-
var extendStatics = function (d, b) {
|
|
19
|
-
extendStatics = Object.setPrototypeOf ||
|
|
20
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
21
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
22
|
-
return extendStatics(d, b);
|
|
23
|
-
};
|
|
24
|
-
return function (d, b) {
|
|
25
|
-
extendStatics(d, b);
|
|
26
|
-
function __() { this.constructor = d; }
|
|
27
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
30
17
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
31
18
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
32
19
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -36,120 +23,91 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
36
23
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
37
24
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
38
25
|
};
|
|
39
|
-
var
|
|
40
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
41
|
-
if (m) return m.call(o);
|
|
42
|
-
if (o && typeof o.length === "number") return {
|
|
43
|
-
next: function () {
|
|
44
|
-
if (o && i >= o.length) o = void 0;
|
|
45
|
-
return { value: o && o[i++], done: !o };
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
49
|
-
};
|
|
26
|
+
var DebugWidget_1;
|
|
50
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
28
|
exports.DebugWidget = void 0;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
63
|
-
}
|
|
64
|
-
DebugWidget_1 = DebugWidget;
|
|
65
|
-
DebugWidget.createContainer = function (parent) {
|
|
66
|
-
var child = debug_session_widget_1.DebugSessionWidget.createContainer(parent, {});
|
|
29
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
30
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
31
|
+
const debug_session_widget_1 = require("./debug-session-widget");
|
|
32
|
+
const debug_configuration_widget_1 = require("./debug-configuration-widget");
|
|
33
|
+
const debug_view_model_1 = require("./debug-view-model");
|
|
34
|
+
const debug_session_manager_1 = require("../debug-session-manager");
|
|
35
|
+
const progress_bar_factory_1 = require("@theia/core/lib/browser/progress-bar-factory");
|
|
36
|
+
let DebugWidget = DebugWidget_1 = class DebugWidget extends browser_1.BaseWidget {
|
|
37
|
+
static createContainer(parent) {
|
|
38
|
+
const child = debug_session_widget_1.DebugSessionWidget.createContainer(parent, {});
|
|
67
39
|
child.bind(debug_configuration_widget_1.DebugConfigurationWidget).toSelf();
|
|
68
40
|
child.bind(DebugWidget_1).toSelf();
|
|
69
41
|
return child;
|
|
70
|
-
}
|
|
71
|
-
|
|
42
|
+
}
|
|
43
|
+
static createWidget(parent) {
|
|
72
44
|
return DebugWidget_1.createContainer(parent).get(DebugWidget_1);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
var e_1, _a;
|
|
76
|
-
var _this = this;
|
|
45
|
+
}
|
|
46
|
+
init() {
|
|
77
47
|
this.id = DebugWidget_1.ID;
|
|
78
48
|
this.title.label = DebugWidget_1.LABEL;
|
|
79
49
|
this.title.caption = DebugWidget_1.LABEL;
|
|
80
50
|
this.title.closable = true;
|
|
81
|
-
this.title.iconClass = 'debug-
|
|
51
|
+
this.title.iconClass = browser_1.codicon('debug-alt');
|
|
82
52
|
this.addClass('theia-debug-container');
|
|
83
53
|
this.toDispose.pushAll([
|
|
84
54
|
this.toolbar,
|
|
85
55
|
this.sessionWidget,
|
|
86
|
-
this.sessionManager.onDidCreateDebugSession(
|
|
87
|
-
this.sessionManager.onDidDestroyDebugSession(
|
|
56
|
+
this.sessionManager.onDidCreateDebugSession(session => this.model.push(session)),
|
|
57
|
+
this.sessionManager.onDidDestroyDebugSession(session => this.model.delete(session))
|
|
88
58
|
]);
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
var session = _c.value;
|
|
92
|
-
this.model.push(session);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
96
|
-
finally {
|
|
97
|
-
try {
|
|
98
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
99
|
-
}
|
|
100
|
-
finally { if (e_1) throw e_1.error; }
|
|
59
|
+
for (const session of this.sessionManager.sessions) {
|
|
60
|
+
this.model.push(session);
|
|
101
61
|
}
|
|
102
|
-
|
|
62
|
+
const layout = this.layout = new browser_1.PanelLayout();
|
|
103
63
|
layout.addWidget(this.toolbar);
|
|
104
64
|
layout.addWidget(this.sessionWidget);
|
|
105
65
|
this.toDispose.push(this.progressBarFactory({ container: this.node, insertMode: 'prepend', locationId: 'debug' }));
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
|
|
66
|
+
}
|
|
67
|
+
onActivateRequest(msg) {
|
|
68
|
+
super.onActivateRequest(msg);
|
|
109
69
|
this.toolbar.focus();
|
|
110
|
-
}
|
|
111
|
-
|
|
70
|
+
}
|
|
71
|
+
getTrackableWidgets() {
|
|
112
72
|
return this.sessionWidget.getTrackableWidgets();
|
|
113
|
-
}
|
|
114
|
-
|
|
73
|
+
}
|
|
74
|
+
storeState() {
|
|
115
75
|
return this.sessionWidget.storeState();
|
|
116
|
-
}
|
|
117
|
-
|
|
76
|
+
}
|
|
77
|
+
restoreState(oldState) {
|
|
118
78
|
this.sessionWidget.restoreState(oldState);
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
return DebugWidget;
|
|
153
|
-
}(browser_1.BaseWidget));
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
DebugWidget.ID = 'debug';
|
|
82
|
+
DebugWidget.LABEL = 'Debug';
|
|
83
|
+
__decorate([
|
|
84
|
+
inversify_1.inject(debug_view_model_1.DebugViewModel),
|
|
85
|
+
__metadata("design:type", debug_view_model_1.DebugViewModel)
|
|
86
|
+
], DebugWidget.prototype, "model", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
inversify_1.inject(debug_session_manager_1.DebugSessionManager),
|
|
89
|
+
__metadata("design:type", debug_session_manager_1.DebugSessionManager)
|
|
90
|
+
], DebugWidget.prototype, "sessionManager", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
inversify_1.inject(debug_configuration_widget_1.DebugConfigurationWidget),
|
|
93
|
+
__metadata("design:type", debug_configuration_widget_1.DebugConfigurationWidget)
|
|
94
|
+
], DebugWidget.prototype, "toolbar", void 0);
|
|
95
|
+
__decorate([
|
|
96
|
+
inversify_1.inject(debug_session_widget_1.DebugSessionWidget),
|
|
97
|
+
__metadata("design:type", debug_session_widget_1.DebugSessionWidget)
|
|
98
|
+
], DebugWidget.prototype, "sessionWidget", void 0);
|
|
99
|
+
__decorate([
|
|
100
|
+
inversify_1.inject(progress_bar_factory_1.ProgressBarFactory),
|
|
101
|
+
__metadata("design:type", Function)
|
|
102
|
+
], DebugWidget.prototype, "progressBarFactory", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
inversify_1.postConstruct(),
|
|
105
|
+
__metadata("design:type", Function),
|
|
106
|
+
__metadata("design:paramtypes", []),
|
|
107
|
+
__metadata("design:returntype", void 0)
|
|
108
|
+
], DebugWidget.prototype, "init", null);
|
|
109
|
+
DebugWidget = DebugWidget_1 = __decorate([
|
|
110
|
+
inversify_1.injectable()
|
|
111
|
+
], DebugWidget);
|
|
154
112
|
exports.DebugWidget = DebugWidget;
|
|
155
113
|
//# sourceMappingURL=debug-widget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-widget.js","sourceRoot":"","sources":["../../../src/browser/view/debug-widget.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF
|
|
1
|
+
{"version":3,"file":"debug-widget.js","sourceRoot":"","sources":["../../../src/browser/view/debug-widget.ts"],"names":[],"mappings":"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"}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
********************************************************************************/
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.DebugError = exports.DebugAdapterPath = exports.DebugService = exports.DebugPath = void 0;
|
|
19
|
-
|
|
19
|
+
const application_error_1 = require("@theia/core/lib/common/application-error");
|
|
20
20
|
/**
|
|
21
21
|
* The WS endpoint path to the Debug service.
|
|
22
22
|
*/
|
|
@@ -31,9 +31,9 @@ exports.DebugService = Symbol('DebugService');
|
|
|
31
31
|
exports.DebugAdapterPath = '/services/debug-adapter';
|
|
32
32
|
var DebugError;
|
|
33
33
|
(function (DebugError) {
|
|
34
|
-
DebugError.NotFound = application_error_1.ApplicationError.declare(-41000,
|
|
35
|
-
message:
|
|
36
|
-
data: { type
|
|
37
|
-
})
|
|
34
|
+
DebugError.NotFound = application_error_1.ApplicationError.declare(-41000, (type) => ({
|
|
35
|
+
message: `'${type}' debugger type is not supported.`,
|
|
36
|
+
data: { type }
|
|
37
|
+
}));
|
|
38
38
|
})(DebugError = exports.DebugError || (exports.DebugError = {}));
|
|
39
39
|
//# sourceMappingURL=debug-service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-service.js","sourceRoot":"","sources":["../../src/common/debug-service.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAKlF,
|
|
1
|
+
{"version":3,"file":"debug-service.js","sourceRoot":"","sources":["../../src/common/debug-service.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAKlF,gFAA4E;AAS5E;;GAEG;AACU,QAAA,SAAS,GAAG,iBAAiB,CAAC;AAE3C;;GAEG;AACU,QAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAiEnD;;GAEG;AACU,QAAA,gBAAgB,GAAG,yBAAyB,CAAC;AAE1D,IAAiB,UAAU,CAK1B;AALD,WAAiB,UAAU;IACV,mBAAQ,GAAG,oCAAgB,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC;QACxE,OAAO,EAAE,IAAI,IAAI,mCAAmC;QACpD,IAAI,EAAE,EAAE,IAAI,EAAE;KACjB,CAAC,CAAC,CAAC;AACR,CAAC,EALgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAK1B"}
|
|
@@ -23,547 +23,191 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
23
23
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
24
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
25
|
};
|
|
26
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
27
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
28
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
29
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
30
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
31
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
32
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
36
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
37
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
38
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
39
|
-
function step(op) {
|
|
40
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
41
|
-
while (_) try {
|
|
42
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
43
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
44
|
-
switch (op[0]) {
|
|
45
|
-
case 0: case 1: t = op; break;
|
|
46
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
47
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
48
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
49
|
-
default:
|
|
50
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
51
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
52
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
53
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
54
|
-
if (t[2]) _.ops.pop();
|
|
55
|
-
_.trys.pop(); continue;
|
|
56
|
-
}
|
|
57
|
-
op = body.call(thisArg, _);
|
|
58
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
59
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
var __values = (this && this.__values) || function(o) {
|
|
63
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
64
|
-
if (m) return m.call(o);
|
|
65
|
-
if (o && typeof o.length === "number") return {
|
|
66
|
-
next: function () {
|
|
67
|
-
if (o && i >= o.length) o = void 0;
|
|
68
|
-
return { value: o && o[i++], done: !o };
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
72
|
-
};
|
|
73
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
74
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
75
|
-
if (!m) return o;
|
|
76
|
-
var i = m.call(o), r, ar = [], e;
|
|
77
|
-
try {
|
|
78
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
79
|
-
}
|
|
80
|
-
catch (error) { e = { error: error }; }
|
|
81
|
-
finally {
|
|
82
|
-
try {
|
|
83
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
84
|
-
}
|
|
85
|
-
finally { if (e) throw e.error; }
|
|
86
|
-
}
|
|
87
|
-
return ar;
|
|
88
|
-
};
|
|
89
|
-
var __spread = (this && this.__spread) || function () {
|
|
90
|
-
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
91
|
-
return ar;
|
|
92
|
-
};
|
|
93
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
94
27
|
exports.DebugAdapterContributionRegistry = void 0;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const core_1 = require("@theia/core");
|
|
30
|
+
const debug_service_1 = require("../common/debug-service");
|
|
31
|
+
const debug_model_1 = require("../common/debug-model");
|
|
99
32
|
/**
|
|
100
33
|
* Contributions registry.
|
|
101
34
|
*/
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
var e_1, _c;
|
|
108
|
-
return __generator(this, function (_d) {
|
|
109
|
-
switch (_d.label) {
|
|
110
|
-
case 0:
|
|
111
|
-
_d.trys.push([0, 5, 6, 7]);
|
|
112
|
-
_a = __values(this.contributions.getContributions()), _b = _a.next();
|
|
113
|
-
_d.label = 1;
|
|
114
|
-
case 1:
|
|
115
|
-
if (!!_b.done) return [3 /*break*/, 4];
|
|
116
|
-
contribution = _b.value;
|
|
117
|
-
if (!(contribution.type === debugType || contribution.type === '*' || debugType === '*')) return [3 /*break*/, 3];
|
|
118
|
-
return [4 /*yield*/, contribution];
|
|
119
|
-
case 2:
|
|
120
|
-
_d.sent();
|
|
121
|
-
_d.label = 3;
|
|
122
|
-
case 3:
|
|
123
|
-
_b = _a.next();
|
|
124
|
-
return [3 /*break*/, 1];
|
|
125
|
-
case 4: return [3 /*break*/, 7];
|
|
126
|
-
case 5:
|
|
127
|
-
e_1_1 = _d.sent();
|
|
128
|
-
e_1 = { error: e_1_1 };
|
|
129
|
-
return [3 /*break*/, 7];
|
|
130
|
-
case 6:
|
|
131
|
-
try {
|
|
132
|
-
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
133
|
-
}
|
|
134
|
-
finally { if (e_1) throw e_1.error; }
|
|
135
|
-
return [7 /*endfinally*/];
|
|
136
|
-
case 7: return [2 /*return*/];
|
|
35
|
+
let DebugAdapterContributionRegistry = class DebugAdapterContributionRegistry {
|
|
36
|
+
*getContributions(debugType) {
|
|
37
|
+
for (const contribution of this.contributions.getContributions()) {
|
|
38
|
+
if (contribution.type === debugType || contribution.type === '*' || debugType === '*') {
|
|
39
|
+
yield contribution;
|
|
137
40
|
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
var e_2, _a;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
debugTypes() {
|
|
142
44
|
if (!this._debugTypes) {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
var contribution = _c.value;
|
|
147
|
-
result.add(contribution.type);
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
151
|
-
finally {
|
|
152
|
-
try {
|
|
153
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
154
|
-
}
|
|
155
|
-
finally { if (e_2) throw e_2.error; }
|
|
45
|
+
const result = new Set();
|
|
46
|
+
for (const contribution of this.contributions.getContributions()) {
|
|
47
|
+
result.add(contribution.type);
|
|
156
48
|
}
|
|
157
|
-
this._debugTypes =
|
|
49
|
+
this._debugTypes = [...result];
|
|
158
50
|
}
|
|
159
51
|
return this._debugTypes;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
_e.trys.push([1, 8, 9, 10]);
|
|
172
|
-
_a = __values(this.contributions.getContributions()), _b = _a.next();
|
|
173
|
-
_e.label = 2;
|
|
174
|
-
case 2:
|
|
175
|
-
if (!!_b.done) return [3 /*break*/, 7];
|
|
176
|
-
contribution = _b.value;
|
|
177
|
-
if (!(contribution.languages && contribution.label)) return [3 /*break*/, 6];
|
|
178
|
-
return [4 /*yield*/, contribution.label];
|
|
179
|
-
case 3:
|
|
180
|
-
label = _e.sent();
|
|
181
|
-
_c = label;
|
|
182
|
-
if (!_c) return [3 /*break*/, 5];
|
|
183
|
-
return [4 /*yield*/, contribution.languages];
|
|
184
|
-
case 4:
|
|
185
|
-
_c = ((_e.sent()) || []).indexOf(language) !== -1;
|
|
186
|
-
_e.label = 5;
|
|
187
|
-
case 5:
|
|
188
|
-
if (_c) {
|
|
189
|
-
debuggers.push({
|
|
190
|
-
type: contribution.type,
|
|
191
|
-
label: label
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
_e.label = 6;
|
|
195
|
-
case 6:
|
|
196
|
-
_b = _a.next();
|
|
197
|
-
return [3 /*break*/, 2];
|
|
198
|
-
case 7: return [3 /*break*/, 10];
|
|
199
|
-
case 8:
|
|
200
|
-
e_3_1 = _e.sent();
|
|
201
|
-
e_3 = { error: e_3_1 };
|
|
202
|
-
return [3 /*break*/, 10];
|
|
203
|
-
case 9:
|
|
204
|
-
try {
|
|
205
|
-
if (_b && !_b.done && (_d = _a.return)) _d.call(_a);
|
|
206
|
-
}
|
|
207
|
-
finally { if (e_3) throw e_3.error; }
|
|
208
|
-
return [7 /*endfinally*/];
|
|
209
|
-
case 10: return [2 /*return*/, debuggers];
|
|
52
|
+
}
|
|
53
|
+
async getDebuggersForLanguage(language) {
|
|
54
|
+
const debuggers = [];
|
|
55
|
+
for (const contribution of this.contributions.getContributions()) {
|
|
56
|
+
if (contribution.languages && contribution.label) {
|
|
57
|
+
const label = await contribution.label;
|
|
58
|
+
if (label && (await contribution.languages || []).indexOf(language) !== -1) {
|
|
59
|
+
debuggers.push({
|
|
60
|
+
type: contribution.type,
|
|
61
|
+
label
|
|
62
|
+
});
|
|
210
63
|
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return debuggers;
|
|
67
|
+
}
|
|
214
68
|
/**
|
|
215
69
|
* Provides initial [debug configuration](#DebugConfiguration).
|
|
216
70
|
* @param debugType The registered debug type
|
|
217
71
|
* @returns An array of [debug configurations](#DebugConfiguration)
|
|
218
72
|
*/
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
_d.trys.push([1, 8, 9, 10]);
|
|
230
|
-
_a = __values(this.getContributions(debugType)), _b = _a.next();
|
|
231
|
-
_d.label = 2;
|
|
232
|
-
case 2:
|
|
233
|
-
if (!!_b.done) return [3 /*break*/, 7];
|
|
234
|
-
contribution = _b.value;
|
|
235
|
-
if (!contribution.provideDebugConfigurations) return [3 /*break*/, 6];
|
|
236
|
-
_d.label = 3;
|
|
237
|
-
case 3:
|
|
238
|
-
_d.trys.push([3, 5, , 6]);
|
|
239
|
-
return [4 /*yield*/, contribution.provideDebugConfigurations(workspaceFolderUri)];
|
|
240
|
-
case 4:
|
|
241
|
-
result = _d.sent();
|
|
242
|
-
configurations.push.apply(configurations, __spread(result));
|
|
243
|
-
return [3 /*break*/, 6];
|
|
244
|
-
case 5:
|
|
245
|
-
e_4 = _d.sent();
|
|
246
|
-
console.error('provideDebugConfigurations failed:', e_4);
|
|
247
|
-
return [3 /*break*/, 6];
|
|
248
|
-
case 6:
|
|
249
|
-
_b = _a.next();
|
|
250
|
-
return [3 /*break*/, 2];
|
|
251
|
-
case 7: return [3 /*break*/, 10];
|
|
252
|
-
case 8:
|
|
253
|
-
e_5_1 = _d.sent();
|
|
254
|
-
e_5 = { error: e_5_1 };
|
|
255
|
-
return [3 /*break*/, 10];
|
|
256
|
-
case 9:
|
|
257
|
-
try {
|
|
258
|
-
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
259
|
-
}
|
|
260
|
-
finally { if (e_5) throw e_5.error; }
|
|
261
|
-
return [7 /*endfinally*/];
|
|
262
|
-
case 10: return [2 /*return*/, configurations];
|
|
73
|
+
async provideDebugConfigurations(debugType, workspaceFolderUri) {
|
|
74
|
+
const configurations = [];
|
|
75
|
+
for (const contribution of this.getContributions(debugType)) {
|
|
76
|
+
if (contribution.provideDebugConfigurations) {
|
|
77
|
+
try {
|
|
78
|
+
const result = await contribution.provideDebugConfigurations(workspaceFolderUri);
|
|
79
|
+
configurations.push(...result);
|
|
80
|
+
}
|
|
81
|
+
catch (e) {
|
|
82
|
+
console.error('provideDebugConfigurations failed:', e);
|
|
263
83
|
}
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return configurations;
|
|
87
|
+
}
|
|
267
88
|
/**
|
|
268
89
|
* Resolves a [debug configuration](#DebugConfiguration) by filling in missing values
|
|
269
90
|
* or by adding/changing/removing attributes before variable substitution.
|
|
270
91
|
* @param debugConfiguration The [debug configuration](#DebugConfiguration) to resolve.
|
|
271
92
|
* @returns The resolved debug configuration.
|
|
272
93
|
*/
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
current =
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
contribution = _b.value;
|
|
289
|
-
if (!contribution.resolveDebugConfiguration) return [3 /*break*/, 6];
|
|
290
|
-
_d.label = 3;
|
|
291
|
-
case 3:
|
|
292
|
-
_d.trys.push([3, 5, , 6]);
|
|
293
|
-
return [4 /*yield*/, contribution.resolveDebugConfiguration(config, workspaceFolderUri)];
|
|
294
|
-
case 4:
|
|
295
|
-
next = _d.sent();
|
|
296
|
-
if (next) {
|
|
297
|
-
current = next;
|
|
298
|
-
}
|
|
299
|
-
else {
|
|
300
|
-
return [2 /*return*/, current];
|
|
301
|
-
}
|
|
302
|
-
return [3 /*break*/, 6];
|
|
303
|
-
case 5:
|
|
304
|
-
e_6 = _d.sent();
|
|
305
|
-
console.error('resolveDebugConfiguration failed:', e_6);
|
|
306
|
-
return [3 /*break*/, 6];
|
|
307
|
-
case 6:
|
|
308
|
-
_b = _a.next();
|
|
309
|
-
return [3 /*break*/, 2];
|
|
310
|
-
case 7: return [3 /*break*/, 10];
|
|
311
|
-
case 8:
|
|
312
|
-
e_7_1 = _d.sent();
|
|
313
|
-
e_7 = { error: e_7_1 };
|
|
314
|
-
return [3 /*break*/, 10];
|
|
315
|
-
case 9:
|
|
316
|
-
try {
|
|
317
|
-
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
318
|
-
}
|
|
319
|
-
finally { if (e_7) throw e_7.error; }
|
|
320
|
-
return [7 /*endfinally*/];
|
|
321
|
-
case 10: return [2 /*return*/, current];
|
|
94
|
+
async resolveDebugConfiguration(config, workspaceFolderUri) {
|
|
95
|
+
let current = config;
|
|
96
|
+
for (const contribution of this.getContributions(config.type)) {
|
|
97
|
+
if (contribution.resolveDebugConfiguration) {
|
|
98
|
+
try {
|
|
99
|
+
const next = await contribution.resolveDebugConfiguration(config, workspaceFolderUri);
|
|
100
|
+
if (next) {
|
|
101
|
+
current = next;
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
return current;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
catch (e) {
|
|
108
|
+
console.error('resolveDebugConfiguration failed:', e);
|
|
322
109
|
}
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return current;
|
|
113
|
+
}
|
|
326
114
|
/**
|
|
327
115
|
* Resolves a [debug configuration](#DebugConfiguration) by filling in missing values
|
|
328
116
|
* or by adding/changing/removing attributes with substituted variables.
|
|
329
117
|
* @param debugConfiguration The [debug configuration](#DebugConfiguration) to resolve.
|
|
330
118
|
* @returns The resolved debug configuration.
|
|
331
119
|
*/
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
current =
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
_d.label = 2;
|
|
345
|
-
case 2:
|
|
346
|
-
if (!!_b.done) return [3 /*break*/, 7];
|
|
347
|
-
contribution = _b.value;
|
|
348
|
-
if (!contribution.resolveDebugConfigurationWithSubstitutedVariables) return [3 /*break*/, 6];
|
|
349
|
-
_d.label = 3;
|
|
350
|
-
case 3:
|
|
351
|
-
_d.trys.push([3, 5, , 6]);
|
|
352
|
-
return [4 /*yield*/, contribution.resolveDebugConfigurationWithSubstitutedVariables(config, workspaceFolderUri)];
|
|
353
|
-
case 4:
|
|
354
|
-
next = _d.sent();
|
|
355
|
-
if (next) {
|
|
356
|
-
current = next;
|
|
357
|
-
}
|
|
358
|
-
else {
|
|
359
|
-
return [2 /*return*/, current];
|
|
360
|
-
}
|
|
361
|
-
return [3 /*break*/, 6];
|
|
362
|
-
case 5:
|
|
363
|
-
e_8 = _d.sent();
|
|
364
|
-
console.error('resolveDebugConfigurationWithSubstitutedVariables failed:', e_8);
|
|
365
|
-
return [3 /*break*/, 6];
|
|
366
|
-
case 6:
|
|
367
|
-
_b = _a.next();
|
|
368
|
-
return [3 /*break*/, 2];
|
|
369
|
-
case 7: return [3 /*break*/, 10];
|
|
370
|
-
case 8:
|
|
371
|
-
e_9_1 = _d.sent();
|
|
372
|
-
e_9 = { error: e_9_1 };
|
|
373
|
-
return [3 /*break*/, 10];
|
|
374
|
-
case 9:
|
|
375
|
-
try {
|
|
376
|
-
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
377
|
-
}
|
|
378
|
-
finally { if (e_9) throw e_9.error; }
|
|
379
|
-
return [7 /*endfinally*/];
|
|
380
|
-
case 10: return [2 /*return*/, current];
|
|
120
|
+
async resolveDebugConfigurationWithSubstitutedVariables(config, workspaceFolderUri) {
|
|
121
|
+
let current = config;
|
|
122
|
+
for (const contribution of this.getContributions(config.type)) {
|
|
123
|
+
if (contribution.resolveDebugConfigurationWithSubstitutedVariables) {
|
|
124
|
+
try {
|
|
125
|
+
const next = await contribution.resolveDebugConfigurationWithSubstitutedVariables(config, workspaceFolderUri);
|
|
126
|
+
if (next) {
|
|
127
|
+
current = next;
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
return current;
|
|
131
|
+
}
|
|
381
132
|
}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
133
|
+
catch (e) {
|
|
134
|
+
console.error('resolveDebugConfigurationWithSubstitutedVariables failed:', e);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return current;
|
|
139
|
+
}
|
|
385
140
|
/**
|
|
386
141
|
* Provides schema attributes.
|
|
387
142
|
* @param debugType The registered debug type
|
|
388
143
|
* @returns Schema attributes for the given debug type
|
|
389
144
|
*/
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
_d = (_c = schemas.push).apply;
|
|
411
|
-
_e = [schemas];
|
|
412
|
-
return [4 /*yield*/, contribution.getSchemaAttributes()];
|
|
413
|
-
case 4:
|
|
414
|
-
_d.apply(_c, _e.concat([__spread.apply(void 0, [_g.sent()])]));
|
|
415
|
-
return [3 /*break*/, 6];
|
|
416
|
-
case 5:
|
|
417
|
-
e_10 = _g.sent();
|
|
418
|
-
console.error('getSchemaAttributes failed:', e_10);
|
|
419
|
-
return [3 /*break*/, 6];
|
|
420
|
-
case 6:
|
|
421
|
-
_b = _a.next();
|
|
422
|
-
return [3 /*break*/, 2];
|
|
423
|
-
case 7: return [3 /*break*/, 10];
|
|
424
|
-
case 8:
|
|
425
|
-
e_11_1 = _g.sent();
|
|
426
|
-
e_11 = { error: e_11_1 };
|
|
427
|
-
return [3 /*break*/, 10];
|
|
428
|
-
case 9:
|
|
429
|
-
try {
|
|
430
|
-
if (_b && !_b.done && (_f = _a.return)) _f.call(_a);
|
|
431
|
-
}
|
|
432
|
-
finally { if (e_11) throw e_11.error; }
|
|
433
|
-
return [7 /*endfinally*/];
|
|
434
|
-
case 10: return [2 /*return*/, schemas];
|
|
145
|
+
async getSchemaAttributes(debugType) {
|
|
146
|
+
const schemas = [];
|
|
147
|
+
for (const contribution of this.getContributions(debugType)) {
|
|
148
|
+
if (contribution.getSchemaAttributes) {
|
|
149
|
+
try {
|
|
150
|
+
schemas.push(...await contribution.getSchemaAttributes());
|
|
151
|
+
}
|
|
152
|
+
catch (e) {
|
|
153
|
+
console.error('getSchemaAttributes failed:', e);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return schemas;
|
|
158
|
+
}
|
|
159
|
+
async getConfigurationSnippets() {
|
|
160
|
+
const schemas = [];
|
|
161
|
+
for (const contribution of this.getContributions('*')) {
|
|
162
|
+
if (contribution.getConfigurationSnippets) {
|
|
163
|
+
try {
|
|
164
|
+
schemas.push(...await contribution.getConfigurationSnippets());
|
|
435
165
|
}
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
};
|
|
439
|
-
DebugAdapterContributionRegistry.prototype.getConfigurationSnippets = function () {
|
|
440
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
441
|
-
var schemas, _a, _b, contribution, _c, _d, _e, e_12, e_13_1;
|
|
442
|
-
var e_13, _f;
|
|
443
|
-
return __generator(this, function (_g) {
|
|
444
|
-
switch (_g.label) {
|
|
445
|
-
case 0:
|
|
446
|
-
schemas = [];
|
|
447
|
-
_g.label = 1;
|
|
448
|
-
case 1:
|
|
449
|
-
_g.trys.push([1, 8, 9, 10]);
|
|
450
|
-
_a = __values(this.getContributions('*')), _b = _a.next();
|
|
451
|
-
_g.label = 2;
|
|
452
|
-
case 2:
|
|
453
|
-
if (!!_b.done) return [3 /*break*/, 7];
|
|
454
|
-
contribution = _b.value;
|
|
455
|
-
if (!contribution.getConfigurationSnippets) return [3 /*break*/, 6];
|
|
456
|
-
_g.label = 3;
|
|
457
|
-
case 3:
|
|
458
|
-
_g.trys.push([3, 5, , 6]);
|
|
459
|
-
_d = (_c = schemas.push).apply;
|
|
460
|
-
_e = [schemas];
|
|
461
|
-
return [4 /*yield*/, contribution.getConfigurationSnippets()];
|
|
462
|
-
case 4:
|
|
463
|
-
_d.apply(_c, _e.concat([__spread.apply(void 0, [_g.sent()])]));
|
|
464
|
-
return [3 /*break*/, 6];
|
|
465
|
-
case 5:
|
|
466
|
-
e_12 = _g.sent();
|
|
467
|
-
console.error('getConfigurationSnippets failed:', e_12);
|
|
468
|
-
return [3 /*break*/, 6];
|
|
469
|
-
case 6:
|
|
470
|
-
_b = _a.next();
|
|
471
|
-
return [3 /*break*/, 2];
|
|
472
|
-
case 7: return [3 /*break*/, 10];
|
|
473
|
-
case 8:
|
|
474
|
-
e_13_1 = _g.sent();
|
|
475
|
-
e_13 = { error: e_13_1 };
|
|
476
|
-
return [3 /*break*/, 10];
|
|
477
|
-
case 9:
|
|
478
|
-
try {
|
|
479
|
-
if (_b && !_b.done && (_f = _a.return)) _f.call(_a);
|
|
480
|
-
}
|
|
481
|
-
finally { if (e_13) throw e_13.error; }
|
|
482
|
-
return [7 /*endfinally*/];
|
|
483
|
-
case 10: return [2 /*return*/, schemas];
|
|
166
|
+
catch (e) {
|
|
167
|
+
console.error('getConfigurationSnippets failed:', e);
|
|
484
168
|
}
|
|
485
|
-
}
|
|
486
|
-
}
|
|
487
|
-
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
return schemas;
|
|
172
|
+
}
|
|
488
173
|
/**
|
|
489
174
|
* Provides a [debug adapter executable](#DebugAdapterExecutable)
|
|
490
175
|
* based on [debug configuration](#DebugConfiguration) to launch a new debug adapter.
|
|
491
176
|
* @param config The resolved [debug configuration](#DebugConfiguration).
|
|
492
177
|
* @returns The [debug adapter executable](#DebugAdapterExecutable).
|
|
493
178
|
*/
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
case 0:
|
|
501
|
-
_d.trys.push([0, 5, 6, 7]);
|
|
502
|
-
_a = __values(this.getContributions(config.type)), _b = _a.next();
|
|
503
|
-
_d.label = 1;
|
|
504
|
-
case 1:
|
|
505
|
-
if (!!_b.done) return [3 /*break*/, 4];
|
|
506
|
-
contribution = _b.value;
|
|
507
|
-
if (!contribution.provideDebugAdapterExecutable) return [3 /*break*/, 3];
|
|
508
|
-
return [4 /*yield*/, contribution.provideDebugAdapterExecutable(config)];
|
|
509
|
-
case 2:
|
|
510
|
-
executable = _d.sent();
|
|
511
|
-
if (executable) {
|
|
512
|
-
return [2 /*return*/, executable];
|
|
513
|
-
}
|
|
514
|
-
_d.label = 3;
|
|
515
|
-
case 3:
|
|
516
|
-
_b = _a.next();
|
|
517
|
-
return [3 /*break*/, 1];
|
|
518
|
-
case 4: return [3 /*break*/, 7];
|
|
519
|
-
case 5:
|
|
520
|
-
e_14_1 = _d.sent();
|
|
521
|
-
e_14 = { error: e_14_1 };
|
|
522
|
-
return [3 /*break*/, 7];
|
|
523
|
-
case 6:
|
|
524
|
-
try {
|
|
525
|
-
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
526
|
-
}
|
|
527
|
-
finally { if (e_14) throw e_14.error; }
|
|
528
|
-
return [7 /*endfinally*/];
|
|
529
|
-
case 7: throw debug_service_1.DebugError.NotFound(config.type);
|
|
179
|
+
async provideDebugAdapterExecutable(config) {
|
|
180
|
+
for (const contribution of this.getContributions(config.type)) {
|
|
181
|
+
if (contribution.provideDebugAdapterExecutable) {
|
|
182
|
+
const executable = await contribution.provideDebugAdapterExecutable(config);
|
|
183
|
+
if (executable) {
|
|
184
|
+
return executable;
|
|
530
185
|
}
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
throw debug_service_1.DebugError.NotFound(config.type);
|
|
189
|
+
}
|
|
534
190
|
/**
|
|
535
191
|
* Returns a [debug adapter session factory](#DebugAdapterSessionFactory).
|
|
536
192
|
* @param debugType The registered debug type
|
|
537
193
|
* @returns An [debug adapter session factory](#DebugAdapterSessionFactory)
|
|
538
194
|
*/
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
var contribution = _c.value;
|
|
544
|
-
if (contribution.debugAdapterSessionFactory) {
|
|
545
|
-
return contribution.debugAdapterSessionFactory;
|
|
546
|
-
}
|
|
195
|
+
debugAdapterSessionFactory(debugType) {
|
|
196
|
+
for (const contribution of this.getContributions(debugType)) {
|
|
197
|
+
if (contribution.debugAdapterSessionFactory) {
|
|
198
|
+
return contribution.debugAdapterSessionFactory;
|
|
547
199
|
}
|
|
548
200
|
}
|
|
549
|
-
catch (e_15_1) { e_15 = { error: e_15_1 }; }
|
|
550
|
-
finally {
|
|
551
|
-
try {
|
|
552
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
553
|
-
}
|
|
554
|
-
finally { if (e_15) throw e_15.error; }
|
|
555
|
-
}
|
|
556
201
|
return undefined;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
}());
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
__decorate([
|
|
205
|
+
inversify_1.inject(core_1.ContributionProvider),
|
|
206
|
+
inversify_1.named(debug_model_1.DebugAdapterContribution),
|
|
207
|
+
__metadata("design:type", Object)
|
|
208
|
+
], DebugAdapterContributionRegistry.prototype, "contributions", void 0);
|
|
209
|
+
DebugAdapterContributionRegistry = __decorate([
|
|
210
|
+
inversify_1.injectable()
|
|
211
|
+
], DebugAdapterContributionRegistry);
|
|
568
212
|
exports.DebugAdapterContributionRegistry = DebugAdapterContributionRegistry;
|
|
569
213
|
//# sourceMappingURL=debug-adapter-contribution-registry.js.map
|