@theia/debug 1.17.0-next.ff9e0507 → 1.18.0-next.05f289b3
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-console-contribution.js","sourceRoot":"","sources":["../../../src/browser/console/debug-console-contribution.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF
|
|
1
|
+
{"version":3,"file":"debug-console-contribution.js","sourceRoot":"","sources":["../../../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AqB;uEAAC;AAGvD;IADC,kBAAM,CAAC,kDAA0B,CAAC;;4EAC8B;AAGjE;IADC,kBAAM,CAAC,2CAAmB,CAAC;8BACG,2CAAmB;qEAAC;AAenD;IADC,yBAAa,EAAE;;;;oDAkBf;AAzCQ,wBAAwB;IADpC,sBAAU,EAAE;;GACA,wBAAwB,CA+LpC;AA/LY,4DAAwB"}
|
|
@@ -14,423 +14,231 @@
|
|
|
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
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
31
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
32
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
33
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
34
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
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 };
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
var __values = (this && this.__values) || function(o) {
|
|
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
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
78
18
|
exports.DebugScope = exports.ExpressionItem = exports.DebugVirtualVariable = exports.DebugVariable = exports.ExpressionContainer = void 0;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
19
|
+
const React = require("@theia/core/shared/react");
|
|
20
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
21
|
+
const console_session_1 = require("@theia/console/lib/browser/console-session");
|
|
22
|
+
const severity_1 = require("@theia/core/lib/common/severity");
|
|
23
|
+
class ExpressionContainer {
|
|
24
|
+
constructor(options) {
|
|
85
25
|
this.sessionProvider = options.session;
|
|
86
26
|
this.variablesReference = options.variablesReference || 0;
|
|
87
27
|
this.namedVariables = options.namedVariables;
|
|
88
28
|
this.indexedVariables = options.indexedVariables;
|
|
89
29
|
this.startOfVariables = options.startOfVariables || 0;
|
|
90
30
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
enumerable: false,
|
|
96
|
-
configurable: true
|
|
97
|
-
});
|
|
98
|
-
ExpressionContainer.prototype.render = function () {
|
|
31
|
+
get session() {
|
|
32
|
+
return this.sessionProvider();
|
|
33
|
+
}
|
|
34
|
+
render() {
|
|
99
35
|
return undefined;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
case 2:
|
|
138
|
-
if (this.indexedVariables) {
|
|
139
|
-
chunkSize = ExpressionContainer.BASE_CHUNK_SIZE;
|
|
140
|
-
while (this.indexedVariables > chunkSize * ExpressionContainer.BASE_CHUNK_SIZE) {
|
|
141
|
-
chunkSize *= ExpressionContainer.BASE_CHUNK_SIZE;
|
|
142
|
-
}
|
|
143
|
-
if (this.indexedVariables > chunkSize) {
|
|
144
|
-
numberOfChunks = Math.ceil(this.indexedVariables / chunkSize);
|
|
145
|
-
for (i = 0; i < numberOfChunks; i++) {
|
|
146
|
-
start = this.startOfVariables + i * chunkSize;
|
|
147
|
-
count = Math.min(chunkSize, this.indexedVariables - i * chunkSize);
|
|
148
|
-
variablesReference = this.variablesReference;
|
|
149
|
-
result.push(new DebugVirtualVariable({
|
|
150
|
-
session: this.sessionProvider,
|
|
151
|
-
variablesReference: variablesReference,
|
|
152
|
-
namedVariables: 0,
|
|
153
|
-
indexedVariables: count,
|
|
154
|
-
startOfVariables: start,
|
|
155
|
-
name: "[" + start + ".." + (start + count - 1) + "]"
|
|
156
|
-
}));
|
|
157
|
-
}
|
|
158
|
-
return [2 /*return*/, result];
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
return [4 /*yield*/, this.fetch(result, 'indexed', this.startOfVariables, this.indexedVariables)];
|
|
162
|
-
case 3:
|
|
163
|
-
_a.sent();
|
|
164
|
-
return [2 /*return*/, result];
|
|
36
|
+
}
|
|
37
|
+
get hasElements() {
|
|
38
|
+
return !!this.variablesReference;
|
|
39
|
+
}
|
|
40
|
+
async getElements() {
|
|
41
|
+
if (!this.hasElements || !this.session) {
|
|
42
|
+
return [][Symbol.iterator]();
|
|
43
|
+
}
|
|
44
|
+
if (!this.elements) {
|
|
45
|
+
this.elements = this.doResolve();
|
|
46
|
+
}
|
|
47
|
+
return (await this.elements)[Symbol.iterator]();
|
|
48
|
+
}
|
|
49
|
+
async doResolve() {
|
|
50
|
+
const result = [];
|
|
51
|
+
if (this.namedVariables) {
|
|
52
|
+
await this.fetch(result, 'named');
|
|
53
|
+
}
|
|
54
|
+
if (this.indexedVariables) {
|
|
55
|
+
let chunkSize = ExpressionContainer.BASE_CHUNK_SIZE;
|
|
56
|
+
while (this.indexedVariables > chunkSize * ExpressionContainer.BASE_CHUNK_SIZE) {
|
|
57
|
+
chunkSize *= ExpressionContainer.BASE_CHUNK_SIZE;
|
|
58
|
+
}
|
|
59
|
+
if (this.indexedVariables > chunkSize) {
|
|
60
|
+
const numberOfChunks = Math.ceil(this.indexedVariables / chunkSize);
|
|
61
|
+
for (let i = 0; i < numberOfChunks; i++) {
|
|
62
|
+
const start = this.startOfVariables + i * chunkSize;
|
|
63
|
+
const count = Math.min(chunkSize, this.indexedVariables - i * chunkSize);
|
|
64
|
+
const { variablesReference } = this;
|
|
65
|
+
result.push(new DebugVirtualVariable({
|
|
66
|
+
session: this.sessionProvider,
|
|
67
|
+
variablesReference,
|
|
68
|
+
namedVariables: 0,
|
|
69
|
+
indexedVariables: count,
|
|
70
|
+
startOfVariables: start,
|
|
71
|
+
name: `[${start}..${start + count - 1}]`
|
|
72
|
+
}));
|
|
165
73
|
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
return
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
names = new Set();
|
|
183
|
-
try {
|
|
184
|
-
for (variables_1 = __values(variables), variables_1_1 = variables_1.next(); !variables_1_1.done; variables_1_1 = variables_1.next()) {
|
|
185
|
-
variable = variables_1_1.value;
|
|
186
|
-
if (!names.has(variable.name)) {
|
|
187
|
-
result.push(new DebugVariable(this.sessionProvider, variable, this));
|
|
188
|
-
names.add(variable.name);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
193
|
-
finally {
|
|
194
|
-
try {
|
|
195
|
-
if (variables_1_1 && !variables_1_1.done && (_a = variables_1.return)) _a.call(variables_1);
|
|
196
|
-
}
|
|
197
|
-
finally { if (e_2) throw e_2.error; }
|
|
198
|
-
}
|
|
199
|
-
return [3 /*break*/, 3];
|
|
200
|
-
case 2:
|
|
201
|
-
e_1 = _b.sent();
|
|
202
|
-
result.push({
|
|
203
|
-
severity: severity_1.Severity.Error,
|
|
204
|
-
visible: !!e_1.message,
|
|
205
|
-
render: function () { return e_1.message; }
|
|
206
|
-
});
|
|
207
|
-
return [3 /*break*/, 3];
|
|
208
|
-
case 3: return [2 /*return*/];
|
|
74
|
+
return result;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
await this.fetch(result, 'indexed', this.startOfVariables, this.indexedVariables);
|
|
78
|
+
return result;
|
|
79
|
+
}
|
|
80
|
+
async fetch(result, filter, start, count) {
|
|
81
|
+
try {
|
|
82
|
+
const { variablesReference } = this;
|
|
83
|
+
const response = await this.session.sendRequest('variables', { variablesReference, filter, start, count });
|
|
84
|
+
const { variables } = response.body;
|
|
85
|
+
const names = new Set();
|
|
86
|
+
for (const variable of variables) {
|
|
87
|
+
if (!names.has(variable.name)) {
|
|
88
|
+
result.push(new DebugVariable(this.sessionProvider, variable, this));
|
|
89
|
+
names.add(variable.name);
|
|
209
90
|
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
catch (e) {
|
|
94
|
+
result.push({
|
|
95
|
+
severity: severity_1.Severity.Error,
|
|
96
|
+
visible: !!e.message,
|
|
97
|
+
render: () => e.message
|
|
210
98
|
});
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
return ExpressionContainer;
|
|
215
|
-
}());
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
216
102
|
exports.ExpressionContainer = ExpressionContainer;
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
session
|
|
103
|
+
ExpressionContainer.BASE_CHUNK_SIZE = 100;
|
|
104
|
+
class DebugVariable extends ExpressionContainer {
|
|
105
|
+
constructor(session, variable, parent) {
|
|
106
|
+
super({
|
|
107
|
+
session,
|
|
222
108
|
variablesReference: variable.variablesReference,
|
|
223
109
|
namedVariables: variable.namedVariables,
|
|
224
110
|
indexedVariables: variable.indexedVariables
|
|
225
|
-
})
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
},
|
|
243
|
-
enumerable: false,
|
|
244
|
-
configurable: true
|
|
245
|
-
});
|
|
246
|
-
Object.defineProperty(DebugVariable.prototype, "value", {
|
|
247
|
-
get: function () {
|
|
248
|
-
return this._value || this.variable.value;
|
|
249
|
-
},
|
|
250
|
-
enumerable: false,
|
|
251
|
-
configurable: true
|
|
252
|
-
});
|
|
253
|
-
DebugVariable.prototype.render = function () {
|
|
254
|
-
var _a = this, type = _a.type, value = _a.value, name = _a.name;
|
|
111
|
+
});
|
|
112
|
+
this.variable = variable;
|
|
113
|
+
this.parent = parent;
|
|
114
|
+
this.setValueRef = (valueRef) => this.valueRef = valueRef || undefined;
|
|
115
|
+
this.setNameRef = (nameRef) => this.nameRef = nameRef || undefined;
|
|
116
|
+
}
|
|
117
|
+
get name() {
|
|
118
|
+
return this.variable.name;
|
|
119
|
+
}
|
|
120
|
+
get type() {
|
|
121
|
+
return this._type || this.variable.type;
|
|
122
|
+
}
|
|
123
|
+
get value() {
|
|
124
|
+
return this._value || this.variable.value;
|
|
125
|
+
}
|
|
126
|
+
render() {
|
|
127
|
+
const { type, value, name } = this;
|
|
255
128
|
return React.createElement("div", { className: this.variableClassName },
|
|
256
129
|
React.createElement("span", { title: type || name, className: 'name', ref: this.setNameRef },
|
|
257
130
|
name,
|
|
258
131
|
!!value && ': '),
|
|
259
132
|
React.createElement("span", { title: value, ref: this.setValueRef }, value));
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
this._value = response.body.value;
|
|
307
|
-
this._type = response.body.type;
|
|
308
|
-
this.variablesReference = response.body.variablesReference || 0;
|
|
309
|
-
this.namedVariables = response.body.namedVariables;
|
|
310
|
-
this.indexedVariables = response.body.indexedVariables;
|
|
311
|
-
this.elements = undefined;
|
|
312
|
-
this.session['fireDidChange']();
|
|
313
|
-
return [3 /*break*/, 4];
|
|
314
|
-
case 3:
|
|
315
|
-
error_1 = _b.sent();
|
|
316
|
-
console.error('setValue failed:', error_1);
|
|
317
|
-
return [3 /*break*/, 4];
|
|
318
|
-
case 4: return [2 /*return*/];
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
});
|
|
322
|
-
};
|
|
323
|
-
Object.defineProperty(DebugVariable.prototype, "supportCopyValue", {
|
|
324
|
-
get: function () {
|
|
325
|
-
return !!this.valueRef && document.queryCommandSupported('copy');
|
|
326
|
-
},
|
|
327
|
-
enumerable: false,
|
|
328
|
-
configurable: true
|
|
329
|
-
});
|
|
330
|
-
DebugVariable.prototype.copyValue = function () {
|
|
331
|
-
var selection = document.getSelection();
|
|
133
|
+
}
|
|
134
|
+
get variableClassName() {
|
|
135
|
+
const { type, value } = this;
|
|
136
|
+
const classNames = ['theia-debug-console-variable'];
|
|
137
|
+
if (type === 'number' || type === 'boolean' || type === 'string') {
|
|
138
|
+
classNames.push(type);
|
|
139
|
+
}
|
|
140
|
+
else if (!isNaN(+value)) {
|
|
141
|
+
classNames.push('number');
|
|
142
|
+
}
|
|
143
|
+
else if (DebugVariable.booleanRegex.test(value)) {
|
|
144
|
+
classNames.push('boolean');
|
|
145
|
+
}
|
|
146
|
+
else if (DebugVariable.stringRegex.test(value)) {
|
|
147
|
+
classNames.push('string');
|
|
148
|
+
}
|
|
149
|
+
return classNames.join(' ');
|
|
150
|
+
}
|
|
151
|
+
get supportSetVariable() {
|
|
152
|
+
return !!this.session && !!this.session.capabilities.supportsSetVariable;
|
|
153
|
+
}
|
|
154
|
+
async setValue(value) {
|
|
155
|
+
if (!this.session) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
const { name, parent } = this;
|
|
159
|
+
const variablesReference = parent['variablesReference'];
|
|
160
|
+
try {
|
|
161
|
+
const response = await this.session.sendRequest('setVariable', { variablesReference, name, value });
|
|
162
|
+
this._value = response.body.value;
|
|
163
|
+
this._type = response.body.type;
|
|
164
|
+
this.variablesReference = response.body.variablesReference || 0;
|
|
165
|
+
this.namedVariables = response.body.namedVariables;
|
|
166
|
+
this.indexedVariables = response.body.indexedVariables;
|
|
167
|
+
this.elements = undefined;
|
|
168
|
+
this.session['fireDidChange']();
|
|
169
|
+
}
|
|
170
|
+
catch (error) {
|
|
171
|
+
console.error('setValue failed:', error);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
get supportCopyValue() {
|
|
175
|
+
return !!this.valueRef && document.queryCommandSupported('copy');
|
|
176
|
+
}
|
|
177
|
+
copyValue() {
|
|
178
|
+
const selection = document.getSelection();
|
|
332
179
|
if (this.valueRef && selection) {
|
|
333
180
|
selection.selectAllChildren(this.valueRef);
|
|
334
181
|
document.execCommand('copy');
|
|
335
182
|
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
configurable: true
|
|
343
|
-
});
|
|
344
|
-
DebugVariable.prototype.copyAsExpression = function () {
|
|
345
|
-
var selection = document.getSelection();
|
|
183
|
+
}
|
|
184
|
+
get supportCopyAsExpression() {
|
|
185
|
+
return !!this.nameRef && document.queryCommandSupported('copy');
|
|
186
|
+
}
|
|
187
|
+
copyAsExpression() {
|
|
188
|
+
const selection = document.getSelection();
|
|
346
189
|
if (this.nameRef && selection) {
|
|
347
190
|
selection.selectAllChildren(this.nameRef);
|
|
348
191
|
document.execCommand('copy');
|
|
349
192
|
}
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
return [2 /*return*/];
|
|
359
|
-
}
|
|
360
|
-
input = new browser_1.SingleTextInputDialog({
|
|
361
|
-
title: "Set " + this.name + " Value",
|
|
362
|
-
initialValue: this.value
|
|
363
|
-
});
|
|
364
|
-
return [4 /*yield*/, input.open()];
|
|
365
|
-
case 1:
|
|
366
|
-
newValue = _a.sent();
|
|
367
|
-
if (!newValue) return [3 /*break*/, 3];
|
|
368
|
-
return [4 /*yield*/, this.setValue(newValue)];
|
|
369
|
-
case 2:
|
|
370
|
-
_a.sent();
|
|
371
|
-
_a.label = 3;
|
|
372
|
-
case 3: return [2 /*return*/];
|
|
373
|
-
}
|
|
374
|
-
});
|
|
193
|
+
}
|
|
194
|
+
async open() {
|
|
195
|
+
if (!this.supportSetVariable) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
const input = new browser_1.SingleTextInputDialog({
|
|
199
|
+
title: `Set ${this.name} Value`,
|
|
200
|
+
initialValue: this.value
|
|
375
201
|
});
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
}
|
|
202
|
+
const newValue = await input.open();
|
|
203
|
+
if (newValue) {
|
|
204
|
+
await this.setValue(newValue);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
381
208
|
exports.DebugVariable = DebugVariable;
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
}
|
|
389
|
-
|
|
209
|
+
DebugVariable.booleanRegex = /^true|false$/i;
|
|
210
|
+
DebugVariable.stringRegex = /^(['"]).*\1$/;
|
|
211
|
+
class DebugVirtualVariable extends ExpressionContainer {
|
|
212
|
+
constructor(options) {
|
|
213
|
+
super(options);
|
|
214
|
+
this.options = options;
|
|
215
|
+
}
|
|
216
|
+
render() {
|
|
390
217
|
return this.options.name;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
|
-
}(ExpressionContainer));
|
|
218
|
+
}
|
|
219
|
+
}
|
|
394
220
|
exports.DebugVirtualVariable = DebugVirtualVariable;
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
configurable: true
|
|
417
|
-
});
|
|
418
|
-
Object.defineProperty(ExpressionItem.prototype, "available", {
|
|
419
|
-
get: function () {
|
|
420
|
-
return this._available;
|
|
421
|
-
},
|
|
422
|
-
enumerable: false,
|
|
423
|
-
configurable: true
|
|
424
|
-
});
|
|
425
|
-
Object.defineProperty(ExpressionItem.prototype, "expression", {
|
|
426
|
-
get: function () {
|
|
427
|
-
return this._expression;
|
|
428
|
-
},
|
|
429
|
-
enumerable: false,
|
|
430
|
-
configurable: true
|
|
431
|
-
});
|
|
432
|
-
ExpressionItem.prototype.render = function () {
|
|
433
|
-
var valueClassNames = [];
|
|
221
|
+
class ExpressionItem extends ExpressionContainer {
|
|
222
|
+
constructor(_expression, session) {
|
|
223
|
+
super({ session });
|
|
224
|
+
this._expression = _expression;
|
|
225
|
+
this._value = ExpressionItem.notAvailable;
|
|
226
|
+
this._available = false;
|
|
227
|
+
}
|
|
228
|
+
get value() {
|
|
229
|
+
return this._value;
|
|
230
|
+
}
|
|
231
|
+
get type() {
|
|
232
|
+
return this._type;
|
|
233
|
+
}
|
|
234
|
+
get available() {
|
|
235
|
+
return this._available;
|
|
236
|
+
}
|
|
237
|
+
get expression() {
|
|
238
|
+
return this._expression;
|
|
239
|
+
}
|
|
240
|
+
render() {
|
|
241
|
+
const valueClassNames = [];
|
|
434
242
|
if (!this._available) {
|
|
435
243
|
valueClassNames.push(console_session_1.ConsoleItem.errorClassName);
|
|
436
244
|
valueClassNames.push('theia-debug-console-unavailable');
|
|
@@ -438,39 +246,23 @@ var ExpressionItem = /** @class */ (function (_super) {
|
|
|
438
246
|
return React.createElement("div", { className: 'theia-debug-console-expression' },
|
|
439
247
|
React.createElement("div", null, this._expression),
|
|
440
248
|
React.createElement("div", { className: valueClassNames.join(' ') }, this._value));
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
return [3 /*break*/, 4];
|
|
459
|
-
case 3:
|
|
460
|
-
err_1 = _a.sent();
|
|
461
|
-
this.setResult(undefined, err_1.message);
|
|
462
|
-
return [3 /*break*/, 4];
|
|
463
|
-
case 4: return [3 /*break*/, 6];
|
|
464
|
-
case 5:
|
|
465
|
-
this.setResult(undefined, 'Please start a debug session to evaluate');
|
|
466
|
-
_a.label = 6;
|
|
467
|
-
case 6: return [2 /*return*/];
|
|
468
|
-
}
|
|
469
|
-
});
|
|
470
|
-
});
|
|
471
|
-
};
|
|
472
|
-
ExpressionItem.prototype.setResult = function (body, error) {
|
|
473
|
-
if (error === void 0) { error = ExpressionItem.notAvailable; }
|
|
249
|
+
}
|
|
250
|
+
async evaluate(context = 'repl') {
|
|
251
|
+
const session = this.session;
|
|
252
|
+
if (session) {
|
|
253
|
+
try {
|
|
254
|
+
const body = await session.evaluate(this._expression, context);
|
|
255
|
+
this.setResult(body);
|
|
256
|
+
}
|
|
257
|
+
catch (err) {
|
|
258
|
+
this.setResult(undefined, err.message);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
else {
|
|
262
|
+
this.setResult(undefined, 'Please start a debug session to evaluate');
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
setResult(body, error = ExpressionItem.notAvailable) {
|
|
474
266
|
if (body) {
|
|
475
267
|
this._value = body.result;
|
|
476
268
|
this._type = body.type;
|
|
@@ -490,45 +282,33 @@ var ExpressionItem = /** @class */ (function (_super) {
|
|
|
490
282
|
this.severity = severity_1.Severity.Error;
|
|
491
283
|
}
|
|
492
284
|
this.elements = undefined;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
return ExpressionItem;
|
|
496
|
-
}(ExpressionContainer));
|
|
285
|
+
}
|
|
286
|
+
}
|
|
497
287
|
exports.ExpressionItem = ExpressionItem;
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
session
|
|
288
|
+
ExpressionItem.notAvailable = 'not available';
|
|
289
|
+
class DebugScope extends ExpressionContainer {
|
|
290
|
+
constructor(raw, session) {
|
|
291
|
+
super({
|
|
292
|
+
session,
|
|
503
293
|
variablesReference: raw.variablesReference,
|
|
504
294
|
namedVariables: raw.namedVariables,
|
|
505
295
|
indexedVariables: raw.indexedVariables
|
|
506
|
-
})
|
|
507
|
-
|
|
508
|
-
return _this;
|
|
296
|
+
});
|
|
297
|
+
this.raw = raw;
|
|
509
298
|
}
|
|
510
|
-
|
|
299
|
+
render() {
|
|
511
300
|
return this.raw.name;
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
return new monaco.Range(line, column, endLine, endColumn);
|
|
525
|
-
}
|
|
526
|
-
return undefined;
|
|
527
|
-
},
|
|
528
|
-
enumerable: false,
|
|
529
|
-
configurable: true
|
|
530
|
-
});
|
|
531
|
-
return DebugScope;
|
|
532
|
-
}(ExpressionContainer));
|
|
301
|
+
}
|
|
302
|
+
get expensive() {
|
|
303
|
+
return this.raw.expensive;
|
|
304
|
+
}
|
|
305
|
+
get range() {
|
|
306
|
+
const { line, column, endLine, endColumn } = this.raw;
|
|
307
|
+
if (line !== undefined && column !== undefined && endLine !== undefined && endColumn !== undefined) {
|
|
308
|
+
return new monaco.Range(line, column, endLine, endColumn);
|
|
309
|
+
}
|
|
310
|
+
return undefined;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
533
313
|
exports.DebugScope = DebugScope;
|
|
534
314
|
//# sourceMappingURL=debug-console-items.js.map
|