@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-prefix-configuration.js","sourceRoot":"","sources":["../../src/browser/debug-prefix-configuration.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF
|
|
1
|
+
{"version":3,"file":"debug-prefix-configuration.js","sourceRoot":"","sources":["../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;8BACY,uDAAyB;2EAAC;AAGxE;IADC,kBAAM,CAAC,2BAAiB,CAAC;IAAE,oBAAQ,EAAE;;mEACkB;AAGxD;IADC,kBAAM,CAAC,6BAAmB,CAAC;;qEACgC;AAG5D;IADC,kBAAM,CAAC,0BAAgB,CAAC;8BACY,0BAAgB;kEAAC;AAGtD;IADC,kBAAM,CAAC,8BAAa,CAAC;8BACY,8BAAa;+DAAC;AAGhD;IADC,kBAAM,CAAC,mBAAS,CAAC;;2DACsB;AAWxC;IADC,yBAAa,EAAE;;;;0DAaf;AAnDQ,wBAAwB;IADpC,sBAAU,EAAE;GACA,wBAAwB,CA0IpC;AA1IY,4DAAwB"}
|
|
@@ -23,94 +23,44 @@ 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
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
63
27
|
exports.DebugResourceResolver = exports.DebugResource = void 0;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const debug_session_manager_1 = require("./debug-session-manager");
|
|
30
|
+
const debug_source_1 = require("./model/debug-source");
|
|
31
|
+
class DebugResource {
|
|
32
|
+
constructor(uri, manager) {
|
|
69
33
|
this.uri = uri;
|
|
70
34
|
this.manager = manager;
|
|
71
35
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
return [4 /*yield*/, currentSession.toSource(this.uri)];
|
|
84
|
-
case 1:
|
|
85
|
-
source = _a.sent();
|
|
86
|
-
if (!source) {
|
|
87
|
-
throw new Error("There is no source for '" + this.uri + "'");
|
|
88
|
-
}
|
|
89
|
-
return [2 /*return*/, source.load()];
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
});
|
|
93
|
-
};
|
|
94
|
-
return DebugResource;
|
|
95
|
-
}());
|
|
96
|
-
exports.DebugResource = DebugResource;
|
|
97
|
-
var DebugResourceResolver = /** @class */ (function () {
|
|
98
|
-
function DebugResourceResolver() {
|
|
36
|
+
dispose() { }
|
|
37
|
+
async readContents() {
|
|
38
|
+
const { currentSession } = this.manager;
|
|
39
|
+
if (!currentSession) {
|
|
40
|
+
throw new Error(`There is no active debug session to load content '${this.uri}'`);
|
|
41
|
+
}
|
|
42
|
+
const source = await currentSession.toSource(this.uri);
|
|
43
|
+
if (!source) {
|
|
44
|
+
throw new Error(`There is no source for '${this.uri}'`);
|
|
45
|
+
}
|
|
46
|
+
return source.load();
|
|
99
47
|
}
|
|
100
|
-
|
|
48
|
+
}
|
|
49
|
+
exports.DebugResource = DebugResource;
|
|
50
|
+
let DebugResourceResolver = class DebugResourceResolver {
|
|
51
|
+
resolve(uri) {
|
|
101
52
|
if (uri.scheme !== debug_source_1.DebugSource.SCHEME) {
|
|
102
53
|
throw new Error('The given URI is not a valid debug URI: ' + uri);
|
|
103
54
|
}
|
|
104
55
|
return new DebugResource(uri, this.manager);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}());
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
__decorate([
|
|
59
|
+
inversify_1.inject(debug_session_manager_1.DebugSessionManager),
|
|
60
|
+
__metadata("design:type", debug_session_manager_1.DebugSessionManager)
|
|
61
|
+
], DebugResourceResolver.prototype, "manager", void 0);
|
|
62
|
+
DebugResourceResolver = __decorate([
|
|
63
|
+
inversify_1.injectable()
|
|
64
|
+
], DebugResourceResolver);
|
|
115
65
|
exports.DebugResourceResolver = DebugResourceResolver;
|
|
116
66
|
//# sourceMappingURL=debug-resource.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-resource.js","sourceRoot":"","sources":["../../src/browser/debug-resource.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF
|
|
1
|
+
{"version":3,"file":"debug-resource.js","sourceRoot":"","sources":["../../src/browser/debug-resource.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,4DAAkE;AAGlE,mEAA8D;AAC9D,uDAAmD;AAEnD,MAAa,aAAa;IAEtB,YACW,GAAQ,EACI,OAA4B;QADxC,QAAG,GAAH,GAAG,CAAK;QACI,YAAO,GAAP,OAAO,CAAqB;IAC/C,CAAC;IAEL,OAAO,KAAW,CAAC;IAEnB,KAAK,CAAC,YAAY;QACd,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC;QACxC,IAAI,CAAC,cAAc,EAAE;YACjB,MAAM,IAAI,KAAK,CAAC,qDAAqD,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;SACrF;QACD,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvD,IAAI,CAAC,MAAM,EAAE;YACT,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,CAAC,GAAG,GAAG,CAAC,CAAC;SAC3D;QACD,OAAO,MAAM,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC;CAEJ;AArBD,sCAqBC;AAGD,IAAa,qBAAqB,GAAlC,MAAa,qBAAqB;IAK9B,OAAO,CAAC,GAAQ;QACZ,IAAI,GAAG,CAAC,MAAM,KAAK,0BAAW,CAAC,MAAM,EAAE;YACnC,MAAM,IAAI,KAAK,CAAC,0CAA0C,GAAG,GAAG,CAAC,CAAC;SACrE;QACD,OAAO,IAAI,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAChD,CAAC;CAEJ,CAAA;AATG;IADC,kBAAM,CAAC,2CAAmB,CAAC;8BACA,2CAAmB;sDAAC;AAHvC,qBAAqB;IADjC,sBAAU,EAAE;GACA,qBAAqB,CAYjC;AAZY,sDAAqB"}
|
|
@@ -14,17 +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 __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
17
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
29
18
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
30
19
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -34,201 +23,73 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
34
23
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
35
24
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
36
25
|
};
|
|
37
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
38
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
39
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
40
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
41
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
42
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
43
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
47
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
48
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
49
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
50
|
-
function step(op) {
|
|
51
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
52
|
-
while (_) try {
|
|
53
|
-
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;
|
|
54
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
55
|
-
switch (op[0]) {
|
|
56
|
-
case 0: case 1: t = op; break;
|
|
57
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
58
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
59
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
60
|
-
default:
|
|
61
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
62
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
63
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
64
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
65
|
-
if (t[2]) _.ops.pop();
|
|
66
|
-
_.trys.pop(); continue;
|
|
67
|
-
}
|
|
68
|
-
op = body.call(thisArg, _);
|
|
69
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
70
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
var __values = (this && this.__values) || function(o) {
|
|
74
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
75
|
-
if (m) return m.call(o);
|
|
76
|
-
if (o && typeof o.length === "number") return {
|
|
77
|
-
next: function () {
|
|
78
|
-
if (o && i >= o.length) o = void 0;
|
|
79
|
-
return { value: o && o[i++], done: !o };
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
83
|
-
};
|
|
84
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
85
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
86
|
-
if (!m) return o;
|
|
87
|
-
var i = m.call(o), r, ar = [], e;
|
|
88
|
-
try {
|
|
89
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
90
|
-
}
|
|
91
|
-
catch (error) { e = { error: error }; }
|
|
92
|
-
finally {
|
|
93
|
-
try {
|
|
94
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
95
|
-
}
|
|
96
|
-
finally { if (e) throw e.error; }
|
|
97
|
-
}
|
|
98
|
-
return ar;
|
|
99
|
-
};
|
|
100
|
-
var __spread = (this && this.__spread) || function () {
|
|
101
|
-
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
102
|
-
return ar;
|
|
103
|
-
};
|
|
104
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
105
27
|
exports.launchSchemaId = exports.DebugSchemaUpdater = void 0;
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const common_1 = require("@theia/core/lib/common");
|
|
30
|
+
const uri_1 = require("@theia/core/lib/common/uri");
|
|
31
|
+
const debug_service_1 = require("../common/debug-service");
|
|
32
|
+
const debug_preferences_1 = require("./debug-preferences");
|
|
33
|
+
const variable_input_schema_1 = require("@theia/variable-resolver/lib/browser/variable-input-schema");
|
|
34
|
+
const browser_1 = require("@theia/workspace/lib/browser");
|
|
35
|
+
let DebugSchemaUpdater = class DebugSchemaUpdater {
|
|
36
|
+
constructor() {
|
|
115
37
|
this.uri = new uri_1.default(exports.launchSchemaId);
|
|
116
38
|
}
|
|
117
|
-
|
|
39
|
+
init() {
|
|
118
40
|
this.inmemoryResources.add(this.uri, '');
|
|
119
|
-
}
|
|
120
|
-
|
|
41
|
+
}
|
|
42
|
+
registerSchemas(context) {
|
|
121
43
|
context.registerSchema({
|
|
122
44
|
fileMatch: ['launch.json'],
|
|
123
45
|
url: this.uri.toString()
|
|
124
46
|
});
|
|
125
47
|
this.workspaceService.updateSchema('launch', { $ref: this.uri.toString() });
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
schema = __assign({}, common_1.deepClone(launchSchema));
|
|
138
|
-
items = schema.properties['configurations'].items;
|
|
139
|
-
attributePromises = types.map(function (type) { return _this.debug.getSchemaAttributes(type); });
|
|
140
|
-
_m.label = 2;
|
|
141
|
-
case 2:
|
|
142
|
-
_m.trys.push([2, 7, 8, 9]);
|
|
143
|
-
return [4 /*yield*/, Promise.all(attributePromises)];
|
|
144
|
-
case 3:
|
|
145
|
-
_a = __values.apply(void 0, [_m.sent()]), _b = _a.next();
|
|
146
|
-
_m.label = 4;
|
|
147
|
-
case 4:
|
|
148
|
-
if (!!_b.done) return [3 /*break*/, 6];
|
|
149
|
-
attributes = _b.value;
|
|
150
|
-
try {
|
|
151
|
-
for (attributes_1 = (e_2 = void 0, __values(attributes)), attributes_1_1 = attributes_1.next(); !attributes_1_1.done; attributes_1_1 = attributes_1.next()) {
|
|
152
|
-
attribute = attributes_1_1.value;
|
|
153
|
-
properties = {};
|
|
154
|
-
try {
|
|
155
|
-
for (_c = (e_3 = void 0, __values(['debugViewLocation', 'openDebug', 'internalConsoleOptions'])), _d = _c.next(); !_d.done; _d = _c.next()) {
|
|
156
|
-
key = _d.value;
|
|
157
|
-
properties[key] = debug_preferences_1.debugPreferencesSchema.properties["debug." + key];
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
161
|
-
finally {
|
|
162
|
-
try {
|
|
163
|
-
if (_d && !_d.done && (_k = _c.return)) _k.call(_c);
|
|
164
|
-
}
|
|
165
|
-
finally { if (e_3) throw e_3.error; }
|
|
166
|
-
}
|
|
167
|
-
attribute.properties = Object.assign(properties, attribute.properties);
|
|
168
|
-
items.oneOf.push(attribute);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
172
|
-
finally {
|
|
173
|
-
try {
|
|
174
|
-
if (attributes_1_1 && !attributes_1_1.done && (_j = attributes_1.return)) _j.call(attributes_1);
|
|
175
|
-
}
|
|
176
|
-
finally { if (e_2) throw e_2.error; }
|
|
177
|
-
}
|
|
178
|
-
_m.label = 5;
|
|
179
|
-
case 5:
|
|
180
|
-
_b = _a.next();
|
|
181
|
-
return [3 /*break*/, 4];
|
|
182
|
-
case 6: return [3 /*break*/, 9];
|
|
183
|
-
case 7:
|
|
184
|
-
e_1_1 = _m.sent();
|
|
185
|
-
e_1 = { error: e_1_1 };
|
|
186
|
-
return [3 /*break*/, 9];
|
|
187
|
-
case 8:
|
|
188
|
-
try {
|
|
189
|
-
if (_b && !_b.done && (_h = _a.return)) _h.call(_a);
|
|
190
|
-
}
|
|
191
|
-
finally { if (e_1) throw e_1.error; }
|
|
192
|
-
return [7 /*endfinally*/];
|
|
193
|
-
case 9:
|
|
194
|
-
_f = (_e = (_l = items.defaultSnippets).push).apply;
|
|
195
|
-
_g = [_l];
|
|
196
|
-
return [4 /*yield*/, this.debug.getConfigurationSnippets()];
|
|
197
|
-
case 10:
|
|
198
|
-
_f.apply(_e, _g.concat([__spread.apply(void 0, [_m.sent()])]));
|
|
199
|
-
contents = JSON.stringify(schema);
|
|
200
|
-
this.inmemoryResources.update(this.uri, contents);
|
|
201
|
-
return [2 /*return*/];
|
|
48
|
+
}
|
|
49
|
+
async update() {
|
|
50
|
+
const types = await this.debug.debugTypes();
|
|
51
|
+
const schema = Object.assign({}, common_1.deepClone(launchSchema));
|
|
52
|
+
const items = schema.properties['configurations'].items;
|
|
53
|
+
const attributePromises = types.map(type => this.debug.getSchemaAttributes(type));
|
|
54
|
+
for (const attributes of await Promise.all(attributePromises)) {
|
|
55
|
+
for (const attribute of attributes) {
|
|
56
|
+
const properties = {};
|
|
57
|
+
for (const key of ['debugViewLocation', 'openDebug', 'internalConsoleOptions']) {
|
|
58
|
+
properties[key] = debug_preferences_1.debugPreferencesSchema.properties[`debug.${key}`];
|
|
202
59
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
60
|
+
attribute.properties = Object.assign(properties, attribute.properties);
|
|
61
|
+
items.oneOf.push(attribute);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
items.defaultSnippets.push(...await this.debug.getConfigurationSnippets());
|
|
65
|
+
const contents = JSON.stringify(schema);
|
|
66
|
+
this.inmemoryResources.update(this.uri, contents);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
__decorate([
|
|
70
|
+
inversify_1.inject(common_1.InMemoryResources),
|
|
71
|
+
__metadata("design:type", common_1.InMemoryResources)
|
|
72
|
+
], DebugSchemaUpdater.prototype, "inmemoryResources", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
inversify_1.inject(browser_1.WorkspaceService),
|
|
75
|
+
__metadata("design:type", browser_1.WorkspaceService)
|
|
76
|
+
], DebugSchemaUpdater.prototype, "workspaceService", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
inversify_1.inject(debug_service_1.DebugService),
|
|
79
|
+
__metadata("design:type", Object)
|
|
80
|
+
], DebugSchemaUpdater.prototype, "debug", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
inversify_1.postConstruct(),
|
|
83
|
+
__metadata("design:type", Function),
|
|
84
|
+
__metadata("design:paramtypes", []),
|
|
85
|
+
__metadata("design:returntype", void 0)
|
|
86
|
+
], DebugSchemaUpdater.prototype, "init", null);
|
|
87
|
+
DebugSchemaUpdater = __decorate([
|
|
88
|
+
inversify_1.injectable()
|
|
89
|
+
], DebugSchemaUpdater);
|
|
229
90
|
exports.DebugSchemaUpdater = DebugSchemaUpdater;
|
|
230
91
|
exports.launchSchemaId = 'vscode://schemas/launch';
|
|
231
|
-
|
|
92
|
+
const launchSchema = {
|
|
232
93
|
$id: exports.launchSchemaId,
|
|
233
94
|
type: 'object',
|
|
234
95
|
title: 'Launch',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-schema-updater.js","sourceRoot":"","sources":["../../src/browser/debug-schema-updater.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF
|
|
1
|
+
{"version":3,"file":"debug-schema-updater.js","sourceRoot":"","sources":["../../src/browser/debug-schema-updater.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,4DAAiF;AAEjF,mDAAsE;AAEtE,oDAA6C;AAC7C,2DAAuD;AACvD,2DAA6D;AAC7D,sGAA0F;AAC1F,0DAAgE;AAGhE,IAAa,kBAAkB,GAA/B,MAAa,kBAAkB;IAA/B;QAEuB,QAAG,GAAG,IAAI,aAAG,CAAC,sBAAc,CAAC,CAAC;IAwCrD,CAAC;IAjCa,IAAI;QACV,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED,eAAe,CAAC,OAAkC;QAC9C,OAAO,CAAC,cAAc,CAAC;YACnB,SAAS,EAAE,CAAC,aAAa,CAAC;YAC1B,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE;SAC3B,CAAC,CAAC;QACH,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAChF,CAAC;IAED,KAAK,CAAC,MAAM;QACR,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,CAAC;QAC5C,MAAM,MAAM,qBAAQ,kBAAS,CAAC,YAAY,CAAC,CAAE,CAAC;QAC9C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AGf;AAXQ,kBAAkB;IAD9B,sBAAU,EAAE;GACA,kBAAkB,CA0C9B;AA1CY,gDAAkB;AA4ClB,QAAA,cAAc,GAAG,yBAAyB,CAAC;AACxD,MAAM,YAAY,GAAgB;IAC9B,GAAG,EAAE,sBAAc;IACnB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,QAAQ;IACf,QAAQ,EAAE,EAAE;IACZ,OAAO,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE;IACjD,UAAU,EAAE;QACR,OAAO,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,8BAA8B;YAC3C,OAAO,EAAE,OAAO;SACnB;QACD,cAAc,EAAE;YACZ,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,6FAA6F;YAC1G,KAAK,EAAE;gBACH,eAAe,EAAE,EAAE;gBACnB,MAAM,EAAE,QAAQ;gBAChB,KAAK,EAAE,EAAE;aACZ;SACJ;QACD,MAAM,EAAE,oCAAY,CAAC,WAAY,CAAC,MAAM;KAC3C;CACJ,CAAC"}
|
|
@@ -14,47 +14,11 @@
|
|
|
14
14
|
*
|
|
15
15
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
16
|
********************************************************************************/
|
|
17
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
-
function step(op) {
|
|
31
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
-
while (_) try {
|
|
33
|
-
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;
|
|
34
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
-
switch (op[0]) {
|
|
36
|
-
case 0: case 1: t = op; break;
|
|
37
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
-
default:
|
|
41
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
-
if (t[2]) _.ops.pop();
|
|
46
|
-
_.trys.pop(); continue;
|
|
47
|
-
}
|
|
48
|
-
op = body.call(thisArg, _);
|
|
49
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
18
|
exports.DebugSessionConnection = void 0;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
19
|
+
const promise_util_1 = require("@theia/core/lib/common/promise-util");
|
|
20
|
+
const core_1 = require("@theia/core");
|
|
21
|
+
const standardDebugEvents = new Set([
|
|
58
22
|
'breakpoint',
|
|
59
23
|
'capabilities',
|
|
60
24
|
'continued',
|
|
@@ -72,9 +36,8 @@ var standardDebugEvents = new Set([
|
|
|
72
36
|
'terminated',
|
|
73
37
|
'thread'
|
|
74
38
|
]);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
var _this = this;
|
|
39
|
+
class DebugSessionConnection {
|
|
40
|
+
constructor(sessionId, connectionFactory, traceOutputChannel) {
|
|
78
41
|
this.sessionId = sessionId;
|
|
79
42
|
this.connectionFactory = connectionFactory;
|
|
80
43
|
this.traceOutputChannel = traceOutputChannel;
|
|
@@ -83,145 +46,103 @@ var DebugSessionConnection = /** @class */ (function () {
|
|
|
83
46
|
this.requestHandlers = new Map();
|
|
84
47
|
this.onDidCustomEventEmitter = new core_1.Emitter();
|
|
85
48
|
this.onDidCustomEvent = this.onDidCustomEventEmitter.event;
|
|
86
|
-
this.toDispose = new core_1.DisposableCollection(this.onDidCustomEventEmitter, core_1.Disposable.create(
|
|
49
|
+
this.toDispose = new core_1.DisposableCollection(this.onDidCustomEventEmitter, core_1.Disposable.create(() => this.pendingRequests.clear()), core_1.Disposable.create(() => this.emitters.clear()));
|
|
87
50
|
this.allThreadsContinued = true;
|
|
88
51
|
this.emitters = new Map();
|
|
89
52
|
this.connection = this.createConnection();
|
|
90
53
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
enumerable: false,
|
|
96
|
-
configurable: true
|
|
97
|
-
});
|
|
98
|
-
DebugSessionConnection.prototype.checkDisposed = function () {
|
|
54
|
+
get disposed() {
|
|
55
|
+
return this.toDispose.disposed;
|
|
56
|
+
}
|
|
57
|
+
checkDisposed() {
|
|
99
58
|
if (this.disposed) {
|
|
100
59
|
throw new Error('the debug session connection is disposed, id: ' + this.sessionId);
|
|
101
60
|
}
|
|
102
|
-
}
|
|
103
|
-
|
|
61
|
+
}
|
|
62
|
+
dispose() {
|
|
104
63
|
this.toDispose.dispose();
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
case 1: return [4 /*yield*/, this.connectionFactory(this.sessionId)];
|
|
116
|
-
case 2:
|
|
117
|
-
connection_1 = _a.sent();
|
|
118
|
-
connection_1.onClose(function (code, reason) {
|
|
119
|
-
connection_1.dispose();
|
|
120
|
-
_this.fire('exited', { code: code, reason: reason });
|
|
121
|
-
});
|
|
122
|
-
connection_1.onMessage(function (data) { return _this.handleMessage(data); });
|
|
123
|
-
return [2 /*return*/, connection_1];
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
};
|
|
128
|
-
DebugSessionConnection.prototype.sendRequest = function (command, args) {
|
|
129
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
130
|
-
var result, response, allThreadsContinued;
|
|
131
|
-
return __generator(this, function (_a) {
|
|
132
|
-
switch (_a.label) {
|
|
133
|
-
case 0: return [4 /*yield*/, this.doSendRequest(command, args)];
|
|
134
|
-
case 1:
|
|
135
|
-
result = _a.sent();
|
|
136
|
-
if (command === 'next' || command === 'stepIn' ||
|
|
137
|
-
command === 'stepOut' || command === 'stepBack' ||
|
|
138
|
-
command === 'reverseContinue' || command === 'restartFrame') {
|
|
139
|
-
this.fireContinuedEvent(args.threadId);
|
|
140
|
-
}
|
|
141
|
-
if (command === 'continue') {
|
|
142
|
-
response = result;
|
|
143
|
-
allThreadsContinued = response && response.body && response.body.allThreadsContinued;
|
|
144
|
-
if (allThreadsContinued !== undefined) {
|
|
145
|
-
this.allThreadsContinued = result.body.allThreadsContinued;
|
|
146
|
-
}
|
|
147
|
-
this.fireContinuedEvent(args.threadId, this.allThreadsContinued);
|
|
148
|
-
return [2 /*return*/, result];
|
|
149
|
-
}
|
|
150
|
-
return [2 /*return*/, result];
|
|
151
|
-
}
|
|
64
|
+
}
|
|
65
|
+
async createConnection() {
|
|
66
|
+
if (this.disposed) {
|
|
67
|
+
throw new Error('Connection has been already disposed.');
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
const connection = await this.connectionFactory(this.sessionId);
|
|
71
|
+
connection.onClose((code, reason) => {
|
|
72
|
+
connection.dispose();
|
|
73
|
+
this.fire('exited', { code, reason });
|
|
152
74
|
});
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
75
|
+
connection.onMessage(data => this.handleMessage(data));
|
|
76
|
+
return connection;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
async sendRequest(command, args) {
|
|
80
|
+
const result = await this.doSendRequest(command, args);
|
|
81
|
+
if (command === 'next' || command === 'stepIn' ||
|
|
82
|
+
command === 'stepOut' || command === 'stepBack' ||
|
|
83
|
+
command === 'reverseContinue' || command === 'restartFrame') {
|
|
84
|
+
this.fireContinuedEvent(args.threadId);
|
|
85
|
+
}
|
|
86
|
+
if (command === 'continue') {
|
|
87
|
+
const response = result;
|
|
88
|
+
const allThreadsContinued = response && response.body && response.body.allThreadsContinued;
|
|
89
|
+
if (allThreadsContinued !== undefined) {
|
|
90
|
+
this.allThreadsContinued = result.body.allThreadsContinued;
|
|
91
|
+
}
|
|
92
|
+
this.fireContinuedEvent(args.threadId, this.allThreadsContinued);
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
97
|
+
sendCustomRequest(command, args) {
|
|
156
98
|
return this.doSendRequest(command, args);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
if (!response.success) {
|
|
188
|
-
result.reject(response);
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
result.resolve(response);
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
return [4 /*yield*/, this.send(request)];
|
|
195
|
-
case 1:
|
|
196
|
-
_a.sent();
|
|
197
|
-
return [2 /*return*/, result.promise];
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
});
|
|
201
|
-
};
|
|
202
|
-
DebugSessionConnection.prototype.send = function (message) {
|
|
203
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
204
|
-
var connection, messageStr;
|
|
205
|
-
return __generator(this, function (_a) {
|
|
206
|
-
switch (_a.label) {
|
|
207
|
-
case 0: return [4 /*yield*/, this.connection];
|
|
208
|
-
case 1:
|
|
209
|
-
connection = _a.sent();
|
|
210
|
-
messageStr = JSON.stringify(message);
|
|
211
|
-
if (this.traceOutputChannel) {
|
|
212
|
-
this.traceOutputChannel.appendLine(this.sessionId.substring(0, 8) + " theia -> adapter: " + messageStr);
|
|
213
|
-
}
|
|
214
|
-
connection.send(messageStr);
|
|
215
|
-
return [2 /*return*/];
|
|
216
|
-
}
|
|
217
|
-
});
|
|
99
|
+
}
|
|
100
|
+
async doSendRequest(command, args) {
|
|
101
|
+
const result = new promise_util_1.Deferred();
|
|
102
|
+
const request = {
|
|
103
|
+
seq: this.sequence++,
|
|
104
|
+
type: 'request',
|
|
105
|
+
command: command,
|
|
106
|
+
arguments: args
|
|
107
|
+
};
|
|
108
|
+
const onDispose = this.toDispose.push(core_1.Disposable.create(() => {
|
|
109
|
+
const pendingRequest = this.pendingRequests.get(request.seq);
|
|
110
|
+
if (pendingRequest) {
|
|
111
|
+
pendingRequest({
|
|
112
|
+
type: 'response',
|
|
113
|
+
request_seq: request.seq,
|
|
114
|
+
command: request.command,
|
|
115
|
+
seq: 0,
|
|
116
|
+
success: false,
|
|
117
|
+
message: 'debug session is closed'
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
}));
|
|
121
|
+
this.pendingRequests.set(request.seq, (response) => {
|
|
122
|
+
onDispose.dispose();
|
|
123
|
+
if (!response.success) {
|
|
124
|
+
result.reject(response);
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
result.resolve(response);
|
|
128
|
+
}
|
|
218
129
|
});
|
|
219
|
-
|
|
220
|
-
|
|
130
|
+
await this.send(request);
|
|
131
|
+
return result.promise;
|
|
132
|
+
}
|
|
133
|
+
async send(message) {
|
|
134
|
+
const connection = await this.connection;
|
|
135
|
+
const messageStr = JSON.stringify(message);
|
|
136
|
+
if (this.traceOutputChannel) {
|
|
137
|
+
this.traceOutputChannel.appendLine(`${this.sessionId.substring(0, 8)} theia -> adapter: ${messageStr}`);
|
|
138
|
+
}
|
|
139
|
+
connection.send(messageStr);
|
|
140
|
+
}
|
|
141
|
+
handleMessage(data) {
|
|
221
142
|
if (this.traceOutputChannel) {
|
|
222
|
-
this.traceOutputChannel.appendLine(this.sessionId.substring(0, 8)
|
|
143
|
+
this.traceOutputChannel.appendLine(`${this.sessionId.substring(0, 8)} theia <- adapter: ${data}`);
|
|
223
144
|
}
|
|
224
|
-
|
|
145
|
+
const message = JSON.parse(data);
|
|
225
146
|
if (message.type === 'request') {
|
|
226
147
|
this.handleRequest(message);
|
|
227
148
|
}
|
|
@@ -231,58 +152,41 @@ var DebugSessionConnection = /** @class */ (function () {
|
|
|
231
152
|
else if (message.type === 'event') {
|
|
232
153
|
this.handleEvent(message);
|
|
233
154
|
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
|
|
155
|
+
}
|
|
156
|
+
handleResponse(response) {
|
|
157
|
+
const callback = this.pendingRequests.get(response.request_seq);
|
|
237
158
|
if (callback) {
|
|
238
159
|
this.pendingRequests.delete(response.request_seq);
|
|
239
160
|
callback(response);
|
|
240
161
|
}
|
|
241
|
-
}
|
|
242
|
-
|
|
162
|
+
}
|
|
163
|
+
onRequest(command, handler) {
|
|
243
164
|
this.requestHandlers.set(command, handler);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
error_1 = _b.sent();
|
|
270
|
-
response.success = false;
|
|
271
|
-
response.message = error_1.message;
|
|
272
|
-
return [3 /*break*/, 4];
|
|
273
|
-
case 4: return [3 /*break*/, 6];
|
|
274
|
-
case 5:
|
|
275
|
-
console.error('Unhandled request', request);
|
|
276
|
-
_b.label = 6;
|
|
277
|
-
case 6: return [4 /*yield*/, this.send(response)];
|
|
278
|
-
case 7:
|
|
279
|
-
_b.sent();
|
|
280
|
-
return [2 /*return*/];
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
});
|
|
284
|
-
};
|
|
285
|
-
DebugSessionConnection.prototype.handleEvent = function (event) {
|
|
165
|
+
}
|
|
166
|
+
async handleRequest(request) {
|
|
167
|
+
const response = {
|
|
168
|
+
type: 'response',
|
|
169
|
+
seq: 0,
|
|
170
|
+
command: request.command,
|
|
171
|
+
request_seq: request.seq,
|
|
172
|
+
success: true,
|
|
173
|
+
};
|
|
174
|
+
const handler = this.requestHandlers.get(request.command);
|
|
175
|
+
if (handler) {
|
|
176
|
+
try {
|
|
177
|
+
response.body = await handler(request);
|
|
178
|
+
}
|
|
179
|
+
catch (error) {
|
|
180
|
+
response.success = false;
|
|
181
|
+
response.message = error.message;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
console.error('Unhandled request', request);
|
|
186
|
+
}
|
|
187
|
+
await this.send(response);
|
|
188
|
+
}
|
|
189
|
+
handleEvent(event) {
|
|
286
190
|
if ('event' in event) {
|
|
287
191
|
if (event.event === 'continued') {
|
|
288
192
|
this.allThreadsContinued = event.body.allThreadsContinued === false ? false : true;
|
|
@@ -297,40 +201,38 @@ var DebugSessionConnection = /** @class */ (function () {
|
|
|
297
201
|
else {
|
|
298
202
|
this.fire('exited', event);
|
|
299
203
|
}
|
|
300
|
-
}
|
|
301
|
-
|
|
204
|
+
}
|
|
205
|
+
on(kind, listener) {
|
|
302
206
|
return this.getEmitter(kind).event(listener);
|
|
303
|
-
}
|
|
304
|
-
|
|
207
|
+
}
|
|
208
|
+
fire(kind, e) {
|
|
305
209
|
this.doFire(kind, e);
|
|
306
|
-
}
|
|
307
|
-
|
|
210
|
+
}
|
|
211
|
+
doFire(kind, e) {
|
|
308
212
|
this.getEmitter(kind).fire(e);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
|
|
213
|
+
}
|
|
214
|
+
getEmitter(kind) {
|
|
215
|
+
const emitter = this.emitters.get(kind) || this.newEmitter();
|
|
312
216
|
this.emitters.set(kind, emitter);
|
|
313
217
|
return emitter;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
|
|
218
|
+
}
|
|
219
|
+
newEmitter() {
|
|
220
|
+
const emitter = new core_1.Emitter();
|
|
317
221
|
this.checkDisposed();
|
|
318
222
|
this.toDispose.push(emitter);
|
|
319
223
|
return emitter;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
if (allThreadsContinued === void 0) { allThreadsContinued = false; }
|
|
224
|
+
}
|
|
225
|
+
fireContinuedEvent(threadId, allThreadsContinued = false) {
|
|
323
226
|
this.fire('continued', {
|
|
324
227
|
type: 'event',
|
|
325
228
|
event: 'continued',
|
|
326
229
|
body: {
|
|
327
|
-
threadId
|
|
328
|
-
allThreadsContinued
|
|
230
|
+
threadId,
|
|
231
|
+
allThreadsContinued
|
|
329
232
|
},
|
|
330
233
|
seq: -1
|
|
331
234
|
});
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
}());
|
|
235
|
+
}
|
|
236
|
+
}
|
|
335
237
|
exports.DebugSessionConnection = DebugSessionConnection;
|
|
336
238
|
//# sourceMappingURL=debug-session-connection.js.map
|