@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-stack-frame.js","sourceRoot":"","sources":["../../../src/browser/model/debug-stack-frame.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF
|
|
1
|
+
{"version":3,"file":"debug-stack-frame.js","sourceRoot":"","sources":["../../../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B,CAAC;CAEJ;AA3HD,0CA2HC"}
|
|
@@ -14,325 +14,154 @@
|
|
|
14
14
|
*
|
|
15
15
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
16
|
********************************************************************************/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
36
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
37
|
-
});
|
|
38
|
-
};
|
|
39
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
40
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
41
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
42
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
43
|
-
function step(op) {
|
|
44
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
45
|
-
while (_) try {
|
|
46
|
-
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;
|
|
47
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
48
|
-
switch (op[0]) {
|
|
49
|
-
case 0: case 1: t = op; break;
|
|
50
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
51
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
52
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
53
|
-
default:
|
|
54
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
55
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
56
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
57
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
58
|
-
if (t[2]) _.ops.pop();
|
|
59
|
-
_.trys.pop(); continue;
|
|
60
|
-
}
|
|
61
|
-
op = body.call(thisArg, _);
|
|
62
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
63
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.DebugThread = exports.DebugThreadData = void 0;
|
|
19
|
+
const React = require("@theia/core/shared/react");
|
|
20
|
+
const core_1 = require("@theia/core");
|
|
21
|
+
const debug_stack_frame_1 = require("./debug-stack-frame");
|
|
22
|
+
class DebugThreadData {
|
|
23
|
+
}
|
|
24
|
+
exports.DebugThreadData = DebugThreadData;
|
|
25
|
+
class DebugThread extends DebugThreadData {
|
|
26
|
+
constructor(session) {
|
|
27
|
+
super();
|
|
28
|
+
this.session = session;
|
|
29
|
+
this.onDidChangedEmitter = new core_1.Emitter();
|
|
30
|
+
this.onDidChanged = this.onDidChangedEmitter.event;
|
|
31
|
+
this._frames = new Map();
|
|
32
|
+
this.pendingFetch = Promise.resolve([]);
|
|
33
|
+
this._pendingFetchCount = 0;
|
|
34
|
+
this.pendingFetchCancel = new core_1.CancellationTokenSource();
|
|
64
35
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
68
|
-
if (m) return m.call(o);
|
|
69
|
-
if (o && typeof o.length === "number") return {
|
|
70
|
-
next: function () {
|
|
71
|
-
if (o && i >= o.length) o = void 0;
|
|
72
|
-
return { value: o && o[i++], done: !o };
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
76
|
-
};
|
|
77
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
78
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
79
|
-
if (!m) return o;
|
|
80
|
-
var i = m.call(o), r, ar = [], e;
|
|
81
|
-
try {
|
|
82
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
36
|
+
get id() {
|
|
37
|
+
return this.session.id + ':' + this.raw.id;
|
|
83
38
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
try {
|
|
87
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
88
|
-
}
|
|
89
|
-
finally { if (e) throw e.error; }
|
|
39
|
+
get currentFrame() {
|
|
40
|
+
return this._currentFrame;
|
|
90
41
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
95
|
-
return ar;
|
|
96
|
-
};
|
|
97
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
98
|
-
exports.DebugThread = exports.DebugThreadData = void 0;
|
|
99
|
-
var React = require("@theia/core/shared/react");
|
|
100
|
-
var core_1 = require("@theia/core");
|
|
101
|
-
var debug_stack_frame_1 = require("./debug-stack-frame");
|
|
102
|
-
var DebugThreadData = /** @class */ (function () {
|
|
103
|
-
function DebugThreadData() {
|
|
42
|
+
set currentFrame(frame) {
|
|
43
|
+
this._currentFrame = frame;
|
|
44
|
+
this.onDidChangedEmitter.fire(undefined);
|
|
104
45
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
exports.DebugThreadData = DebugThreadData;
|
|
108
|
-
var DebugThread = /** @class */ (function (_super) {
|
|
109
|
-
__extends(DebugThread, _super);
|
|
110
|
-
function DebugThread(session) {
|
|
111
|
-
var _this = _super.call(this) || this;
|
|
112
|
-
_this.session = session;
|
|
113
|
-
_this.onDidChangedEmitter = new core_1.Emitter();
|
|
114
|
-
_this.onDidChanged = _this.onDidChangedEmitter.event;
|
|
115
|
-
_this._frames = new Map();
|
|
116
|
-
_this.pendingFetch = Promise.resolve([]);
|
|
117
|
-
_this._pendingFetchCount = 0;
|
|
118
|
-
_this.pendingFetchCancel = new core_1.CancellationTokenSource();
|
|
119
|
-
return _this;
|
|
46
|
+
get stopped() {
|
|
47
|
+
return !!this.stoppedDetails;
|
|
120
48
|
}
|
|
121
|
-
|
|
122
|
-
get: function () {
|
|
123
|
-
return this.session.id + ':' + this.raw.id;
|
|
124
|
-
},
|
|
125
|
-
enumerable: false,
|
|
126
|
-
configurable: true
|
|
127
|
-
});
|
|
128
|
-
Object.defineProperty(DebugThread.prototype, "currentFrame", {
|
|
129
|
-
get: function () {
|
|
130
|
-
return this._currentFrame;
|
|
131
|
-
},
|
|
132
|
-
set: function (frame) {
|
|
133
|
-
this._currentFrame = frame;
|
|
134
|
-
this.onDidChangedEmitter.fire(undefined);
|
|
135
|
-
},
|
|
136
|
-
enumerable: false,
|
|
137
|
-
configurable: true
|
|
138
|
-
});
|
|
139
|
-
Object.defineProperty(DebugThread.prototype, "stopped", {
|
|
140
|
-
get: function () {
|
|
141
|
-
return !!this.stoppedDetails;
|
|
142
|
-
},
|
|
143
|
-
enumerable: false,
|
|
144
|
-
configurable: true
|
|
145
|
-
});
|
|
146
|
-
DebugThread.prototype.update = function (data) {
|
|
49
|
+
update(data) {
|
|
147
50
|
Object.assign(this, data);
|
|
148
51
|
if ('stoppedDetails' in data) {
|
|
149
52
|
this.clearFrames();
|
|
150
53
|
}
|
|
151
|
-
}
|
|
152
|
-
|
|
54
|
+
}
|
|
55
|
+
clear() {
|
|
153
56
|
this.update({
|
|
154
57
|
raw: this.raw,
|
|
155
58
|
stoppedDetails: undefined
|
|
156
59
|
});
|
|
157
|
-
}
|
|
158
|
-
|
|
60
|
+
}
|
|
61
|
+
continue() {
|
|
159
62
|
return this.session.sendRequest('continue', this.toArgs());
|
|
160
|
-
}
|
|
161
|
-
|
|
63
|
+
}
|
|
64
|
+
stepOver() {
|
|
162
65
|
return this.session.sendRequest('next', this.toArgs());
|
|
163
|
-
}
|
|
164
|
-
|
|
66
|
+
}
|
|
67
|
+
stepIn() {
|
|
165
68
|
return this.session.sendRequest('stepIn', this.toArgs());
|
|
166
|
-
}
|
|
167
|
-
|
|
69
|
+
}
|
|
70
|
+
stepOut() {
|
|
168
71
|
return this.session.sendRequest('stepOut', this.toArgs());
|
|
169
|
-
}
|
|
170
|
-
|
|
72
|
+
}
|
|
73
|
+
pause() {
|
|
171
74
|
return this.session.sendRequest('pause', this.toArgs());
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
75
|
+
}
|
|
76
|
+
async getExceptionInfo() {
|
|
77
|
+
if (this.stoppedDetails && this.stoppedDetails.reason === 'exception') {
|
|
78
|
+
if (this.session.capabilities.supportsExceptionInfoRequest) {
|
|
79
|
+
const response = await this.session.sendRequest('exceptionInfo', this.toArgs());
|
|
80
|
+
return {
|
|
81
|
+
id: response.body.exceptionId,
|
|
82
|
+
description: response.body.description,
|
|
83
|
+
details: response.body.details
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
description: this.stoppedDetails.text
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
get supportsTerminate() {
|
|
93
|
+
return !!this.session.capabilities.supportsTerminateThreadsRequest;
|
|
94
|
+
}
|
|
95
|
+
async terminate() {
|
|
96
|
+
if (this.supportsTerminate) {
|
|
97
|
+
await this.session.sendRequest('terminateThreads', {
|
|
98
|
+
threadIds: [this.raw.id]
|
|
194
99
|
});
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
_a.label = 2;
|
|
216
|
-
case 2: return [2 /*return*/];
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
get frames() {
|
|
103
|
+
return this._frames.values();
|
|
104
|
+
}
|
|
105
|
+
get topFrame() {
|
|
106
|
+
return this.frames.next().value;
|
|
107
|
+
}
|
|
108
|
+
get frameCount() {
|
|
109
|
+
return this._frames.size;
|
|
110
|
+
}
|
|
111
|
+
async fetchFrames(levels = 20) {
|
|
112
|
+
const cancel = this.pendingFetchCancel.token;
|
|
113
|
+
this._pendingFetchCount += 1;
|
|
114
|
+
return this.pendingFetch = this.pendingFetch.then(async () => {
|
|
115
|
+
try {
|
|
116
|
+
const start = this.frameCount;
|
|
117
|
+
const frames = await this.doFetchFrames(start, levels);
|
|
118
|
+
if (cancel.isCancellationRequested) {
|
|
119
|
+
return [];
|
|
217
120
|
}
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
});
|
|
228
|
-
Object.defineProperty(DebugThread.prototype, "topFrame", {
|
|
229
|
-
get: function () {
|
|
230
|
-
return this.frames.next().value;
|
|
231
|
-
},
|
|
232
|
-
enumerable: false,
|
|
233
|
-
configurable: true
|
|
234
|
-
});
|
|
235
|
-
Object.defineProperty(DebugThread.prototype, "frameCount", {
|
|
236
|
-
get: function () {
|
|
237
|
-
return this._frames.size;
|
|
238
|
-
},
|
|
239
|
-
enumerable: false,
|
|
240
|
-
configurable: true
|
|
241
|
-
});
|
|
242
|
-
DebugThread.prototype.fetchFrames = function (levels) {
|
|
243
|
-
if (levels === void 0) { levels = 20; }
|
|
244
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
245
|
-
var cancel;
|
|
246
|
-
var _this = this;
|
|
247
|
-
return __generator(this, function (_a) {
|
|
248
|
-
cancel = this.pendingFetchCancel.token;
|
|
249
|
-
this._pendingFetchCount += 1;
|
|
250
|
-
return [2 /*return*/, this.pendingFetch = this.pendingFetch.then(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
251
|
-
var start, frames_1, e_1;
|
|
252
|
-
return __generator(this, function (_a) {
|
|
253
|
-
switch (_a.label) {
|
|
254
|
-
case 0:
|
|
255
|
-
_a.trys.push([0, 2, 3, 4]);
|
|
256
|
-
start = this.frameCount;
|
|
257
|
-
return [4 /*yield*/, this.doFetchFrames(start, levels)];
|
|
258
|
-
case 1:
|
|
259
|
-
frames_1 = _a.sent();
|
|
260
|
-
if (cancel.isCancellationRequested) {
|
|
261
|
-
return [2 /*return*/, []];
|
|
262
|
-
}
|
|
263
|
-
return [2 /*return*/, this.doUpdateFrames(frames_1)];
|
|
264
|
-
case 2:
|
|
265
|
-
e_1 = _a.sent();
|
|
266
|
-
console.error('fetchFrames failed:', e_1);
|
|
267
|
-
return [2 /*return*/, []];
|
|
268
|
-
case 3:
|
|
269
|
-
if (!cancel.isCancellationRequested) {
|
|
270
|
-
this._pendingFetchCount -= 1;
|
|
271
|
-
}
|
|
272
|
-
return [7 /*endfinally*/];
|
|
273
|
-
case 4: return [2 /*return*/];
|
|
274
|
-
}
|
|
275
|
-
});
|
|
276
|
-
}); })];
|
|
277
|
-
});
|
|
278
|
-
});
|
|
279
|
-
};
|
|
280
|
-
Object.defineProperty(DebugThread.prototype, "pendingFrameCount", {
|
|
281
|
-
get: function () {
|
|
282
|
-
return this._pendingFetchCount;
|
|
283
|
-
},
|
|
284
|
-
enumerable: false,
|
|
285
|
-
configurable: true
|
|
286
|
-
});
|
|
287
|
-
DebugThread.prototype.doFetchFrames = function (startFrame, levels) {
|
|
288
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
289
|
-
var response, e_2;
|
|
290
|
-
return __generator(this, function (_a) {
|
|
291
|
-
switch (_a.label) {
|
|
292
|
-
case 0:
|
|
293
|
-
_a.trys.push([0, 2, , 3]);
|
|
294
|
-
return [4 /*yield*/, this.session.sendRequest('stackTrace', this.toArgs({ startFrame: startFrame, levels: levels }))];
|
|
295
|
-
case 1:
|
|
296
|
-
response = _a.sent();
|
|
297
|
-
if (this.stoppedDetails) {
|
|
298
|
-
this.stoppedDetails.totalFrames = response.body.totalFrames;
|
|
299
|
-
}
|
|
300
|
-
return [2 /*return*/, response.body.stackFrames];
|
|
301
|
-
case 2:
|
|
302
|
-
e_2 = _a.sent();
|
|
303
|
-
if (this.stoppedDetails) {
|
|
304
|
-
this.stoppedDetails.framesErrorMessage = e_2.message;
|
|
305
|
-
}
|
|
306
|
-
return [2 /*return*/, []];
|
|
307
|
-
case 3: return [2 /*return*/];
|
|
121
|
+
return this.doUpdateFrames(frames);
|
|
122
|
+
}
|
|
123
|
+
catch (e) {
|
|
124
|
+
console.error('fetchFrames failed:', e);
|
|
125
|
+
return [];
|
|
126
|
+
}
|
|
127
|
+
finally {
|
|
128
|
+
if (!cancel.isCancellationRequested) {
|
|
129
|
+
this._pendingFetchCount -= 1;
|
|
308
130
|
}
|
|
309
|
-
}
|
|
131
|
+
}
|
|
310
132
|
});
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
133
|
+
}
|
|
134
|
+
get pendingFrameCount() {
|
|
135
|
+
return this._pendingFetchCount;
|
|
136
|
+
}
|
|
137
|
+
async doFetchFrames(startFrame, levels) {
|
|
315
138
|
try {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
var frame = this._frames.get(id) || new debug_stack_frame_1.DebugStackFrame(this, this.session);
|
|
320
|
-
this._frames.set(id, frame);
|
|
321
|
-
frame.update({ raw: raw });
|
|
322
|
-
result.add(frame);
|
|
139
|
+
const response = await this.session.sendRequest('stackTrace', this.toArgs({ startFrame, levels }));
|
|
140
|
+
if (this.stoppedDetails) {
|
|
141
|
+
this.stoppedDetails.totalFrames = response.body.totalFrames;
|
|
323
142
|
}
|
|
143
|
+
return response.body.stackFrames;
|
|
324
144
|
}
|
|
325
|
-
catch (
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
if (frames_2_1 && !frames_2_1.done && (_a = frames_2.return)) _a.call(frames_2);
|
|
145
|
+
catch (e) {
|
|
146
|
+
if (this.stoppedDetails) {
|
|
147
|
+
this.stoppedDetails.framesErrorMessage = e.message;
|
|
329
148
|
}
|
|
330
|
-
|
|
149
|
+
return [];
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
doUpdateFrames(frames) {
|
|
153
|
+
const result = new Set();
|
|
154
|
+
for (const raw of frames) {
|
|
155
|
+
const id = raw.id;
|
|
156
|
+
const frame = this._frames.get(id) || new debug_stack_frame_1.DebugStackFrame(this, this.session);
|
|
157
|
+
this._frames.set(id, frame);
|
|
158
|
+
frame.update({ raw });
|
|
159
|
+
result.add(frame);
|
|
331
160
|
}
|
|
332
161
|
this.updateCurrentFrame();
|
|
333
|
-
return
|
|
334
|
-
}
|
|
335
|
-
|
|
162
|
+
return [...result.values()];
|
|
163
|
+
}
|
|
164
|
+
clearFrames() {
|
|
336
165
|
// Clear all frames
|
|
337
166
|
this._frames.clear();
|
|
338
167
|
// Cancel all request promises
|
|
@@ -342,27 +171,26 @@ var DebugThread = /** @class */ (function (_super) {
|
|
|
342
171
|
this.pendingFetch = Promise.resolve([]);
|
|
343
172
|
this._pendingFetchCount = 0;
|
|
344
173
|
this.updateCurrentFrame();
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
174
|
+
}
|
|
175
|
+
updateCurrentFrame() {
|
|
176
|
+
const { currentFrame } = this;
|
|
177
|
+
const frameId = currentFrame && currentFrame.raw.id;
|
|
349
178
|
this.currentFrame = typeof frameId === 'number' &&
|
|
350
179
|
this._frames.get(frameId) ||
|
|
351
180
|
this._frames.values().next().value;
|
|
352
|
-
}
|
|
353
|
-
|
|
181
|
+
}
|
|
182
|
+
toArgs(arg) {
|
|
354
183
|
return Object.assign({}, arg, {
|
|
355
184
|
threadId: this.raw.id
|
|
356
185
|
});
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
186
|
+
}
|
|
187
|
+
render() {
|
|
188
|
+
const reason = this.stoppedDetails && this.stoppedDetails.reason;
|
|
189
|
+
const status = this.stoppedDetails ? reason ? `Paused on ${reason}` : 'Paused' : 'Running';
|
|
361
190
|
return React.createElement("div", { className: 'theia-debug-thread', title: 'Thread' },
|
|
362
191
|
React.createElement("span", { className: 'label' }, this.raw.name),
|
|
363
192
|
React.createElement("span", { className: 'status' }, status));
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
}(DebugThreadData));
|
|
193
|
+
}
|
|
194
|
+
}
|
|
367
195
|
exports.DebugThread = DebugThread;
|
|
368
196
|
//# sourceMappingURL=debug-thread.js.map
|