@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-toolbar-widget.js","sourceRoot":"","sources":["../../../src/browser/view/debug-toolbar-widget.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF
|
|
1
|
+
{"version":3,"file":"debug-toolbar-widget.js","sourceRoot":"","s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,GAAG,CAAC;SAC1F;QACD,OAAO,oBAAC,0BAAW,IAAC,OAAO,EAAE,KAAK,KAAK,0BAAU,CAAC,OAAO,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAC,OAAO,EAAC,SAAS,EAAC,aAAa,GAAG,CAAC;IACzH,CAAC;CAWJ,CAAA;AA/DG;IADC,kBAAM,CAAC,iCAAc,CAAC;8BACG,iCAAc;2CAAC;AAGzC;IADC,yBAAa,EAAE;;;;wCAQf;AAbQ,YAAY;IADxB,sBAAU,EAAE;GACA,YAAY,CAkExB;AAlEY,oCAAY"}
|
|
@@ -14,19 +14,6 @@
|
|
|
14
14
|
*
|
|
15
15
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
16
|
********************************************************************************/
|
|
17
|
-
var __extends = (this && this.__extends) || (function () {
|
|
18
|
-
var extendStatics = function (d, b) {
|
|
19
|
-
extendStatics = Object.setPrototypeOf ||
|
|
20
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
21
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
22
|
-
return extendStatics(d, b);
|
|
23
|
-
};
|
|
24
|
-
return function (d, b) {
|
|
25
|
-
extendStatics(d, b);
|
|
26
|
-
function __() { this.constructor = d; }
|
|
27
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
30
17
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
31
18
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
32
19
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -36,99 +23,42 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
36
23
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
37
24
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
38
25
|
};
|
|
39
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
40
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
41
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
42
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
43
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
44
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
45
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
49
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
50
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
51
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
52
|
-
function step(op) {
|
|
53
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
54
|
-
while (_) try {
|
|
55
|
-
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;
|
|
56
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
57
|
-
switch (op[0]) {
|
|
58
|
-
case 0: case 1: t = op; break;
|
|
59
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
60
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
61
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
62
|
-
default:
|
|
63
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
64
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
65
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
66
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
67
|
-
if (t[2]) _.ops.pop();
|
|
68
|
-
_.trys.pop(); continue;
|
|
69
|
-
}
|
|
70
|
-
op = body.call(thisArg, _);
|
|
71
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
72
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
76
27
|
exports.DebugVariablesSource = void 0;
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
var _this = _super.call(this, {
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const source_tree_1 = require("@theia/core/lib/browser/source-tree");
|
|
30
|
+
const debug_view_model_1 = require("./debug-view-model");
|
|
31
|
+
const debounce = require("p-debounce");
|
|
32
|
+
let DebugVariablesSource = class DebugVariablesSource extends source_tree_1.TreeSource {
|
|
33
|
+
constructor() {
|
|
34
|
+
super({
|
|
85
35
|
placeholder: 'Not paused'
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
return _this;
|
|
36
|
+
});
|
|
37
|
+
this.refresh = debounce(() => this.fireDidChange(), 400);
|
|
89
38
|
}
|
|
90
|
-
|
|
91
|
-
var _this = this;
|
|
39
|
+
init() {
|
|
92
40
|
this.refresh();
|
|
93
|
-
this.toDispose.push(this.model.onDidChange(
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
__decorate([
|
|
118
|
-
inversify_1.inject(debug_view_model_1.DebugViewModel),
|
|
119
|
-
__metadata("design:type", debug_view_model_1.DebugViewModel)
|
|
120
|
-
], DebugVariablesSource.prototype, "model", void 0);
|
|
121
|
-
__decorate([
|
|
122
|
-
inversify_1.postConstruct(),
|
|
123
|
-
__metadata("design:type", Function),
|
|
124
|
-
__metadata("design:paramtypes", []),
|
|
125
|
-
__metadata("design:returntype", void 0)
|
|
126
|
-
], DebugVariablesSource.prototype, "init", null);
|
|
127
|
-
DebugVariablesSource = __decorate([
|
|
128
|
-
inversify_1.injectable(),
|
|
129
|
-
__metadata("design:paramtypes", [])
|
|
130
|
-
], DebugVariablesSource);
|
|
131
|
-
return DebugVariablesSource;
|
|
132
|
-
}(source_tree_1.TreeSource));
|
|
41
|
+
this.toDispose.push(this.model.onDidChange(() => this.refresh()));
|
|
42
|
+
}
|
|
43
|
+
async getElements() {
|
|
44
|
+
const { currentSession } = this.model;
|
|
45
|
+
const scopes = currentSession ? await currentSession.getScopes() : [];
|
|
46
|
+
return scopes[Symbol.iterator]();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
__decorate([
|
|
50
|
+
inversify_1.inject(debug_view_model_1.DebugViewModel),
|
|
51
|
+
__metadata("design:type", debug_view_model_1.DebugViewModel)
|
|
52
|
+
], DebugVariablesSource.prototype, "model", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
inversify_1.postConstruct(),
|
|
55
|
+
__metadata("design:type", Function),
|
|
56
|
+
__metadata("design:paramtypes", []),
|
|
57
|
+
__metadata("design:returntype", void 0)
|
|
58
|
+
], DebugVariablesSource.prototype, "init", null);
|
|
59
|
+
DebugVariablesSource = __decorate([
|
|
60
|
+
inversify_1.injectable(),
|
|
61
|
+
__metadata("design:paramtypes", [])
|
|
62
|
+
], DebugVariablesSource);
|
|
133
63
|
exports.DebugVariablesSource = DebugVariablesSource;
|
|
134
64
|
//# sourceMappingURL=debug-variables-source.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-variables-source.js","sourceRoot":"","sources":["../../../src/browser/view/debug-variables-source.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF
|
|
1
|
+
{"version":3,"file":"debug-variables-source.js","sourceRoot":"","sources":["../../../src/browser/view/debug-variables-source.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;AAElF,4DAAiF;AACjF,qEAAiE;AAEjE,yDAAoD;AACpD,uCAAwC;AAGxC,IAAa,oBAAoB,GAAjC,MAAa,oBAAqB,SAAQ,wBAAU;IAKhD;QACI,KAAK,CAAC;YACF,WAAW,EAAE,YAAY;SAC5B,CAAC,CAAC;QASY,YAAO,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,GAAG,CAAC,CAAC;IARvE,CAAC;IAGS,IAAI;QACV,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACtE,CAAC;IAID,KAAK,CAAC,WAAW;QACb,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACtC,MAAM,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,MAAM,cAAc,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtE,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;IACrC,CAAC;CAEJ,CAAA;AAtBG;IADC,kBAAM,CAAC,iCAAc,CAAC;8BACG,iCAAc;mDAAC;AASzC;IADC,yBAAa,EAAE;;;;gDAIf;AAfQ,oBAAoB;IADhC,sBAAU,EAAE;;GACA,oBAAoB,CAyBhC;AAzBY,oDAAoB"}
|
|
@@ -14,19 +14,6 @@
|
|
|
14
14
|
*
|
|
15
15
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
16
|
********************************************************************************/
|
|
17
|
-
var __extends = (this && this.__extends) || (function () {
|
|
18
|
-
var extendStatics = function (d, b) {
|
|
19
|
-
extendStatics = Object.setPrototypeOf ||
|
|
20
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
21
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
22
|
-
return extendStatics(d, b);
|
|
23
|
-
};
|
|
24
|
-
return function (d, b) {
|
|
25
|
-
extendStatics(d, b);
|
|
26
|
-
function __() { this.constructor = d; }
|
|
27
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
30
17
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
31
18
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
32
19
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -36,40 +23,16 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
36
23
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
37
24
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
38
25
|
};
|
|
39
|
-
var
|
|
40
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
41
|
-
if (!m) return o;
|
|
42
|
-
var i = m.call(o), r, ar = [], e;
|
|
43
|
-
try {
|
|
44
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
45
|
-
}
|
|
46
|
-
catch (error) { e = { error: error }; }
|
|
47
|
-
finally {
|
|
48
|
-
try {
|
|
49
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
50
|
-
}
|
|
51
|
-
finally { if (e) throw e.error; }
|
|
52
|
-
}
|
|
53
|
-
return ar;
|
|
54
|
-
};
|
|
55
|
-
var __spread = (this && this.__spread) || function () {
|
|
56
|
-
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
57
|
-
return ar;
|
|
58
|
-
};
|
|
26
|
+
var DebugVariablesWidget_1;
|
|
59
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
60
28
|
exports.DebugVariablesWidget = void 0;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
69
|
-
}
|
|
70
|
-
DebugVariablesWidget_1 = DebugVariablesWidget;
|
|
71
|
-
DebugVariablesWidget.createContainer = function (parent) {
|
|
72
|
-
var child = source_tree_1.SourceTreeWidget.createContainer(parent, {
|
|
29
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
30
|
+
const source_tree_1 = require("@theia/core/lib/browser/source-tree");
|
|
31
|
+
const debug_variables_source_1 = require("./debug-variables-source");
|
|
32
|
+
const debug_view_model_1 = require("./debug-view-model");
|
|
33
|
+
let DebugVariablesWidget = DebugVariablesWidget_1 = class DebugVariablesWidget extends source_tree_1.SourceTreeWidget {
|
|
34
|
+
static createContainer(parent) {
|
|
35
|
+
const child = source_tree_1.SourceTreeWidget.createContainer(parent, {
|
|
73
36
|
contextMenuPath: DebugVariablesWidget_1.CONTEXT_MENU,
|
|
74
37
|
virtualized: false,
|
|
75
38
|
scrollIfActive: true
|
|
@@ -78,39 +41,37 @@ var DebugVariablesWidget = /** @class */ (function (_super) {
|
|
|
78
41
|
child.unbind(source_tree_1.SourceTreeWidget);
|
|
79
42
|
child.bind(DebugVariablesWidget_1).toSelf();
|
|
80
43
|
return child;
|
|
81
|
-
}
|
|
82
|
-
|
|
44
|
+
}
|
|
45
|
+
static createWidget(parent) {
|
|
83
46
|
return DebugVariablesWidget_1.createContainer(parent).get(DebugVariablesWidget_1);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
47
|
+
}
|
|
48
|
+
init() {
|
|
49
|
+
super.init();
|
|
87
50
|
this.id = 'debug:variables:' + this.viewModel.id;
|
|
88
51
|
this.title.label = 'Variables';
|
|
89
52
|
this.toDispose.push(this.variables);
|
|
90
53
|
this.source = this.variables;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
return DebugVariablesWidget;
|
|
114
|
-
}(source_tree_1.SourceTreeWidget));
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
DebugVariablesWidget.CONTEXT_MENU = ['debug-variables-context-menu'];
|
|
57
|
+
DebugVariablesWidget.EDIT_MENU = [...DebugVariablesWidget_1.CONTEXT_MENU, 'a_edit'];
|
|
58
|
+
DebugVariablesWidget.WATCH_MENU = [...DebugVariablesWidget_1.CONTEXT_MENU, 'b_watch'];
|
|
59
|
+
__decorate([
|
|
60
|
+
inversify_1.inject(debug_view_model_1.DebugViewModel),
|
|
61
|
+
__metadata("design:type", debug_view_model_1.DebugViewModel)
|
|
62
|
+
], DebugVariablesWidget.prototype, "viewModel", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
inversify_1.inject(debug_variables_source_1.DebugVariablesSource),
|
|
65
|
+
__metadata("design:type", debug_variables_source_1.DebugVariablesSource)
|
|
66
|
+
], DebugVariablesWidget.prototype, "variables", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
inversify_1.postConstruct(),
|
|
69
|
+
__metadata("design:type", Function),
|
|
70
|
+
__metadata("design:paramtypes", []),
|
|
71
|
+
__metadata("design:returntype", void 0)
|
|
72
|
+
], DebugVariablesWidget.prototype, "init", null);
|
|
73
|
+
DebugVariablesWidget = DebugVariablesWidget_1 = __decorate([
|
|
74
|
+
inversify_1.injectable()
|
|
75
|
+
], DebugVariablesWidget);
|
|
115
76
|
exports.DebugVariablesWidget = DebugVariablesWidget;
|
|
116
77
|
//# sourceMappingURL=debug-variables-widget.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-variables-widget.js","sourceRoot":"","sources":["../../../src/browser/view/debug-variables-widget.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF
|
|
1
|
+
{"version":3,"file":"debug-variables-widget.js","sourceRoot":"","sources":["../../../src/browser/view/debug-variables-widget.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;;;;;;;;;;;AAElF,4DAAwG;AAExG,qEAAuE;AACvE,qEAAgE;AAChE,yDAAoD;AAGpD,IAAa,oBAAoB,4BAAjC,MAAa,oBAAqB,SAAQ,8BAAgB;IAKtD,MAAM,CAAC,eAAe,CAAC,MAA4B;QAC/C,MAAM,KAAK,GAAG,8BAAgB,CAAC,eAAe,CAAC,MAAM,EAAE;YACnD,eAAe,EAAE,sBAAoB,CAAC,YAAY;YAClD,WAAW,EAAE,KAAK;YAClB,cAAc,EAAE,IAAI;SACvB,CAAC,CAAC;QACH,KAAK,CAAC,IAAI,CAAC,6CAAoB,CAAC,CAAC,MAAM,EAAE,CAAC;QAC1C,KAAK,CAAC,MAAM,CAAC,8BAAgB,CAAC,CAAC;QAC/B,KAAK,CAAC,IAAI,CAAC,sBAAoB,CAAC,CAAC,MAAM,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,MAAM,CAAC,YAAY,CAAC,MAA4B;QAC5C,OAAO,sBAAoB,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,sBAAoB,CAAC,CAAC;IAClF,CAAC;IASS,IAAI;QACV,KAAK,CAAC,IAAI,EAAE,CAAC;QACb,IAAI,CAAC,EAAE,GAAG,kBAAkB,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QACjD,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACpC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC;IACjC,CAAC;CAEJ,CAAA;AAjCU,iCAAY,GAAa,CAAC,8BAA8B,CAAC,CAAC;AAC1D,8BAAS,GAAa,CAAC,GAAG,sBAAoB,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;AACvE,+BAAU,GAAa,CAAC,GAAG,sBAAoB,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AAiBhF;IADC,kBAAM,CAAC,iCAAc,CAAC;8BACO,iCAAc;uDAAC;AAG7C;IADC,kBAAM,CAAC,6CAAoB,CAAC;8BACC,6CAAoB;uDAAC;AAGnD;IADC,yBAAa,EAAE;;;;gDAOf;AAjCQ,oBAAoB;IADhC,sBAAU,EAAE;GACA,oBAAoB,CAmChC;AAnCY,oDAAoB"}
|
|
@@ -23,82 +23,18 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
23
23
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
24
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
25
|
};
|
|
26
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
27
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
28
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
29
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
30
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
31
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
32
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
36
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
37
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
38
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
39
|
-
function step(op) {
|
|
40
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
41
|
-
while (_) try {
|
|
42
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
43
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
44
|
-
switch (op[0]) {
|
|
45
|
-
case 0: case 1: t = op; break;
|
|
46
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
47
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
48
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
49
|
-
default:
|
|
50
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
51
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
52
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
53
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
54
|
-
if (t[2]) _.ops.pop();
|
|
55
|
-
_.trys.pop(); continue;
|
|
56
|
-
}
|
|
57
|
-
op = body.call(thisArg, _);
|
|
58
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
59
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
var __values = (this && this.__values) || function(o) {
|
|
63
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
64
|
-
if (m) return m.call(o);
|
|
65
|
-
if (o && typeof o.length === "number") return {
|
|
66
|
-
next: function () {
|
|
67
|
-
if (o && i >= o.length) o = void 0;
|
|
68
|
-
return { value: o && o[i++], done: !o };
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
72
|
-
};
|
|
73
|
-
var __read = (this && this.__read) || function (o, n) {
|
|
74
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
75
|
-
if (!m) return o;
|
|
76
|
-
var i = m.call(o), r, ar = [], e;
|
|
77
|
-
try {
|
|
78
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
|
79
|
-
}
|
|
80
|
-
catch (error) { e = { error: error }; }
|
|
81
|
-
finally {
|
|
82
|
-
try {
|
|
83
|
-
if (r && !r.done && (m = i["return"])) m.call(i);
|
|
84
|
-
}
|
|
85
|
-
finally { if (e) throw e.error; }
|
|
86
|
-
}
|
|
87
|
-
return ar;
|
|
88
|
-
};
|
|
89
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
90
27
|
exports.DebugViewModel = exports.DebugViewOptions = void 0;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
28
|
+
const p_debounce_1 = require("p-debounce");
|
|
29
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
30
|
+
const common_1 = require("@theia/core/lib/common");
|
|
31
|
+
const debug_session_1 = require("../debug-session");
|
|
32
|
+
const debug_session_manager_1 = require("../debug-session-manager");
|
|
33
|
+
const debug_watch_expression_1 = require("./debug-watch-expression");
|
|
34
|
+
const debug_watch_manager_1 = require("../debug-watch-manager");
|
|
98
35
|
exports.DebugViewOptions = Symbol('DebugViewOptions');
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
var _this = this;
|
|
36
|
+
let DebugViewModel = class DebugViewModel {
|
|
37
|
+
constructor() {
|
|
102
38
|
this.onDidChangeEmitter = new common_1.Emitter();
|
|
103
39
|
this.onDidChange = this.onDidChangeEmitter.event;
|
|
104
40
|
this.onDidChangeBreakpointsEmitter = new common_1.Emitter();
|
|
@@ -109,351 +45,206 @@ var DebugViewModel = /** @class */ (function () {
|
|
|
109
45
|
this.toDispose = new common_1.DisposableCollection(this.onDidChangeEmitter, this.onDidChangeBreakpointsEmitter, this.onDidChangeWatchExpressionsEmitter);
|
|
110
46
|
this._sessions = new Set();
|
|
111
47
|
this.refreshWatchExpressionsQueue = Promise.resolve();
|
|
112
|
-
this.refreshWatchExpressions = p_debounce_1.default(
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
switch (_d.label) {
|
|
118
|
-
case 0:
|
|
119
|
-
_d.trys.push([0, 9, , 10]);
|
|
120
|
-
_d.label = 1;
|
|
121
|
-
case 1:
|
|
122
|
-
_d.trys.push([1, 6, 7, 8]);
|
|
123
|
-
_a = __values(this.watchExpressions), _b = _a.next();
|
|
124
|
-
_d.label = 2;
|
|
125
|
-
case 2:
|
|
126
|
-
if (!!_b.done) return [3 /*break*/, 5];
|
|
127
|
-
watchExpression = _b.value;
|
|
128
|
-
return [4 /*yield*/, watchExpression.evaluate()];
|
|
129
|
-
case 3:
|
|
130
|
-
_d.sent();
|
|
131
|
-
_d.label = 4;
|
|
132
|
-
case 4:
|
|
133
|
-
_b = _a.next();
|
|
134
|
-
return [3 /*break*/, 2];
|
|
135
|
-
case 5: return [3 /*break*/, 8];
|
|
136
|
-
case 6:
|
|
137
|
-
e_1_1 = _d.sent();
|
|
138
|
-
e_1 = { error: e_1_1 };
|
|
139
|
-
return [3 /*break*/, 8];
|
|
140
|
-
case 7:
|
|
141
|
-
try {
|
|
142
|
-
if (_b && !_b.done && (_c = _a.return)) _c.call(_a);
|
|
143
|
-
}
|
|
144
|
-
finally { if (e_1) throw e_1.error; }
|
|
145
|
-
return [7 /*endfinally*/];
|
|
146
|
-
case 8: return [3 /*break*/, 10];
|
|
147
|
-
case 9:
|
|
148
|
-
e_2 = _d.sent();
|
|
149
|
-
console.error('Failed to refresh watch expressions: ', e_2);
|
|
150
|
-
return [3 /*break*/, 10];
|
|
151
|
-
case 10: return [2 /*return*/];
|
|
48
|
+
this.refreshWatchExpressions = p_debounce_1.default(() => {
|
|
49
|
+
this.refreshWatchExpressionsQueue = this.refreshWatchExpressionsQueue.then(async () => {
|
|
50
|
+
try {
|
|
51
|
+
for (const watchExpression of this.watchExpressions) {
|
|
52
|
+
await watchExpression.evaluate();
|
|
152
53
|
}
|
|
153
|
-
}
|
|
154
|
-
|
|
54
|
+
}
|
|
55
|
+
catch (e) {
|
|
56
|
+
console.error('Failed to refresh watch expressions: ', e);
|
|
57
|
+
}
|
|
58
|
+
});
|
|
155
59
|
}, 50);
|
|
156
60
|
}
|
|
157
|
-
|
|
61
|
+
fireDidChange() {
|
|
158
62
|
this.refreshWatchExpressions();
|
|
159
63
|
this.onDidChangeEmitter.fire(undefined);
|
|
160
|
-
}
|
|
161
|
-
|
|
64
|
+
}
|
|
65
|
+
fireDidChangeBreakpoints(uri) {
|
|
162
66
|
this.onDidChangeBreakpointsEmitter.fire(uri);
|
|
163
|
-
}
|
|
164
|
-
|
|
67
|
+
}
|
|
68
|
+
fireDidChangeWatchExpressions() {
|
|
165
69
|
this.onDidChangeWatchExpressionsEmitter.fire(undefined);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
Object.defineProperty(DebugViewModel.prototype, "sessionCount", {
|
|
175
|
-
get: function () {
|
|
176
|
-
return this._sessions.size;
|
|
177
|
-
},
|
|
178
|
-
enumerable: false,
|
|
179
|
-
configurable: true
|
|
180
|
-
});
|
|
181
|
-
DebugViewModel.prototype.push = function (session) {
|
|
70
|
+
}
|
|
71
|
+
get sessions() {
|
|
72
|
+
return this._sessions.values();
|
|
73
|
+
}
|
|
74
|
+
get sessionCount() {
|
|
75
|
+
return this._sessions.size;
|
|
76
|
+
}
|
|
77
|
+
push(session) {
|
|
182
78
|
if (this._sessions.has(session)) {
|
|
183
79
|
return;
|
|
184
80
|
}
|
|
185
81
|
this._sessions.add(session);
|
|
186
82
|
this.fireDidChange();
|
|
187
|
-
}
|
|
188
|
-
|
|
83
|
+
}
|
|
84
|
+
delete(session) {
|
|
189
85
|
if (this._sessions.delete(session)) {
|
|
190
86
|
this.fireDidChange();
|
|
191
87
|
return true;
|
|
192
88
|
}
|
|
193
89
|
return false;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
},
|
|
206
|
-
enumerable: false,
|
|
207
|
-
configurable: true
|
|
208
|
-
});
|
|
209
|
-
Object.defineProperty(DebugViewModel.prototype, "label", {
|
|
210
|
-
get: function () {
|
|
211
|
-
return this.session && this.session.label || 'Unknown Session';
|
|
212
|
-
},
|
|
213
|
-
enumerable: false,
|
|
214
|
-
configurable: true
|
|
215
|
-
});
|
|
216
|
-
DebugViewModel.prototype.has = function (session) {
|
|
90
|
+
}
|
|
91
|
+
get session() {
|
|
92
|
+
return this.sessions.next().value;
|
|
93
|
+
}
|
|
94
|
+
get id() {
|
|
95
|
+
return this.session && this.session.id || '-1';
|
|
96
|
+
}
|
|
97
|
+
get label() {
|
|
98
|
+
return this.session && this.session.label || 'Unknown Session';
|
|
99
|
+
}
|
|
100
|
+
has(session) {
|
|
217
101
|
return !!session && this._sessions.has(session);
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
var _this = this;
|
|
102
|
+
}
|
|
103
|
+
init() {
|
|
221
104
|
if (this.options.session) {
|
|
222
105
|
this.push(this.options.session);
|
|
223
106
|
}
|
|
224
|
-
this.toDispose.push(this.manager.onDidChangeActiveDebugSession(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
_this.fireDidChange();
|
|
107
|
+
this.toDispose.push(this.manager.onDidChangeActiveDebugSession(({ previous, current }) => {
|
|
108
|
+
if (this.has(previous) && !this.has(current)) {
|
|
109
|
+
this.fireDidChange();
|
|
228
110
|
}
|
|
229
111
|
}));
|
|
230
|
-
this.toDispose.push(this.manager.onDidChange(
|
|
231
|
-
if (
|
|
232
|
-
|
|
112
|
+
this.toDispose.push(this.manager.onDidChange(current => {
|
|
113
|
+
if (this.has(current)) {
|
|
114
|
+
this.fireDidChange();
|
|
233
115
|
}
|
|
234
116
|
}));
|
|
235
|
-
this.toDispose.push(this.manager.onDidChangeBreakpoints(
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
_this.fireDidChangeBreakpoints(uri);
|
|
117
|
+
this.toDispose.push(this.manager.onDidChangeBreakpoints(({ session, uri }) => {
|
|
118
|
+
if (!session || session === this.currentSession) {
|
|
119
|
+
this.fireDidChangeBreakpoints(uri);
|
|
239
120
|
}
|
|
240
121
|
}));
|
|
241
122
|
this.updateWatchExpressions();
|
|
242
|
-
this.toDispose.push(this.watch.onDidChange(
|
|
243
|
-
}
|
|
244
|
-
|
|
123
|
+
this.toDispose.push(this.watch.onDidChange(() => this.updateWatchExpressions()));
|
|
124
|
+
}
|
|
125
|
+
dispose() {
|
|
245
126
|
this.toDispose.dispose();
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
|
|
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
|
-
|
|
307
|
-
|
|
308
|
-
newSession = _a.sent();
|
|
309
|
-
if (newSession) {
|
|
310
|
-
this._sessions.delete(session);
|
|
311
|
-
this._sessions.add(newSession);
|
|
312
|
-
this.fireDidChange();
|
|
313
|
-
}
|
|
314
|
-
return [2 /*return*/];
|
|
315
|
-
}
|
|
316
|
-
});
|
|
317
|
-
});
|
|
318
|
-
};
|
|
319
|
-
DebugViewModel.prototype.restart = function () {
|
|
320
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
321
|
-
var session, newSession;
|
|
322
|
-
return __generator(this, function (_a) {
|
|
323
|
-
switch (_a.label) {
|
|
324
|
-
case 0:
|
|
325
|
-
session = this.session;
|
|
326
|
-
if (!session) {
|
|
327
|
-
return [2 /*return*/];
|
|
328
|
-
}
|
|
329
|
-
return [4 /*yield*/, this.manager.restart(session)];
|
|
330
|
-
case 1:
|
|
331
|
-
newSession = _a.sent();
|
|
332
|
-
if (newSession !== session) {
|
|
333
|
-
this._sessions.delete(session);
|
|
334
|
-
this._sessions.add(newSession);
|
|
335
|
-
}
|
|
336
|
-
this.fireDidChange();
|
|
337
|
-
return [2 /*return*/];
|
|
338
|
-
}
|
|
339
|
-
});
|
|
340
|
-
});
|
|
341
|
-
};
|
|
342
|
-
DebugViewModel.prototype.terminate = function () {
|
|
343
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
344
|
-
return __generator(this, function (_a) {
|
|
345
|
-
this.manager.terminateSessions();
|
|
346
|
-
return [2 /*return*/];
|
|
347
|
-
});
|
|
348
|
-
});
|
|
349
|
-
};
|
|
350
|
-
Object.defineProperty(DebugViewModel.prototype, "watchExpressions", {
|
|
351
|
-
get: function () {
|
|
352
|
-
return this._watchExpressions.values();
|
|
353
|
-
},
|
|
354
|
-
enumerable: false,
|
|
355
|
-
configurable: true
|
|
356
|
-
});
|
|
357
|
-
DebugViewModel.prototype.addWatchExpression = function (expression) {
|
|
358
|
-
if (expression === void 0) { expression = ''; }
|
|
359
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
360
|
-
var watchExpression, id;
|
|
361
|
-
var _this = this;
|
|
362
|
-
return __generator(this, function (_a) {
|
|
363
|
-
switch (_a.label) {
|
|
364
|
-
case 0:
|
|
365
|
-
watchExpression = new debug_watch_expression_1.DebugWatchExpression({
|
|
366
|
-
id: Number.MAX_SAFE_INTEGER,
|
|
367
|
-
expression: expression,
|
|
368
|
-
session: function () { return _this.currentSession; },
|
|
369
|
-
onDidChange: function () { }
|
|
370
|
-
});
|
|
371
|
-
return [4 /*yield*/, watchExpression.open()];
|
|
372
|
-
case 1:
|
|
373
|
-
_a.sent();
|
|
374
|
-
if (!watchExpression.expression) {
|
|
375
|
-
return [2 /*return*/, undefined];
|
|
376
|
-
}
|
|
377
|
-
id = this.watch.addWatchExpression(watchExpression.expression);
|
|
378
|
-
return [2 /*return*/, this._watchExpressions.get(id)];
|
|
379
|
-
}
|
|
380
|
-
});
|
|
127
|
+
}
|
|
128
|
+
get currentSession() {
|
|
129
|
+
const { currentSession } = this.manager;
|
|
130
|
+
return this.has(currentSession) && currentSession || this.session;
|
|
131
|
+
}
|
|
132
|
+
set currentSession(currentSession) {
|
|
133
|
+
this.manager.currentSession = currentSession;
|
|
134
|
+
}
|
|
135
|
+
get state() {
|
|
136
|
+
const { currentSession } = this;
|
|
137
|
+
return currentSession && currentSession.state || debug_session_1.DebugState.Inactive;
|
|
138
|
+
}
|
|
139
|
+
get currentThread() {
|
|
140
|
+
const { currentSession } = this;
|
|
141
|
+
return currentSession && currentSession.currentThread;
|
|
142
|
+
}
|
|
143
|
+
get currentFrame() {
|
|
144
|
+
const { currentThread } = this;
|
|
145
|
+
return currentThread && currentThread.currentFrame;
|
|
146
|
+
}
|
|
147
|
+
get breakpoints() {
|
|
148
|
+
return this.manager.getBreakpoints(this.currentSession);
|
|
149
|
+
}
|
|
150
|
+
get functionBreakpoints() {
|
|
151
|
+
return this.manager.getFunctionBreakpoints(this.currentSession);
|
|
152
|
+
}
|
|
153
|
+
async start() {
|
|
154
|
+
const { session } = this;
|
|
155
|
+
if (!session) {
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
const newSession = await this.manager.start(session.options);
|
|
159
|
+
if (newSession) {
|
|
160
|
+
this._sessions.delete(session);
|
|
161
|
+
this._sessions.add(newSession);
|
|
162
|
+
this.fireDidChange();
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
async restart() {
|
|
166
|
+
const { session } = this;
|
|
167
|
+
if (!session) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
const newSession = await this.manager.restart(session);
|
|
171
|
+
if (newSession !== session) {
|
|
172
|
+
this._sessions.delete(session);
|
|
173
|
+
this._sessions.add(newSession);
|
|
174
|
+
}
|
|
175
|
+
this.fireDidChange();
|
|
176
|
+
}
|
|
177
|
+
async terminate() {
|
|
178
|
+
this.manager.terminateSessions();
|
|
179
|
+
}
|
|
180
|
+
get watchExpressions() {
|
|
181
|
+
return this._watchExpressions.values();
|
|
182
|
+
}
|
|
183
|
+
async addWatchExpression(expression = '') {
|
|
184
|
+
const watchExpression = new debug_watch_expression_1.DebugWatchExpression({
|
|
185
|
+
id: Number.MAX_SAFE_INTEGER,
|
|
186
|
+
expression,
|
|
187
|
+
session: () => this.currentSession,
|
|
188
|
+
onDidChange: () => { }
|
|
381
189
|
});
|
|
382
|
-
|
|
383
|
-
|
|
190
|
+
await watchExpression.open();
|
|
191
|
+
if (!watchExpression.expression) {
|
|
192
|
+
return undefined;
|
|
193
|
+
}
|
|
194
|
+
const id = this.watch.addWatchExpression(watchExpression.expression);
|
|
195
|
+
return this._watchExpressions.get(id);
|
|
196
|
+
}
|
|
197
|
+
removeWatchExpressions() {
|
|
384
198
|
this.watch.removeWatchExpressions();
|
|
385
|
-
}
|
|
386
|
-
|
|
199
|
+
}
|
|
200
|
+
removeWatchExpression(expression) {
|
|
387
201
|
this.watch.removeWatchExpression(expression.id);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
onDidChange: function () { return _this.fireDidChangeWatchExpressions(); }
|
|
405
|
-
});
|
|
406
|
-
this._watchExpressions.set(id, watchExpression);
|
|
407
|
-
watchExpression.evaluate();
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
}
|
|
411
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
412
|
-
finally {
|
|
413
|
-
try {
|
|
414
|
-
if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
|
|
415
|
-
}
|
|
416
|
-
finally { if (e_3) throw e_3.error; }
|
|
417
|
-
}
|
|
418
|
-
try {
|
|
419
|
-
for (var toRemove_1 = __values(toRemove), toRemove_1_1 = toRemove_1.next(); !toRemove_1_1.done; toRemove_1_1 = toRemove_1.next()) {
|
|
420
|
-
var id = toRemove_1_1.value;
|
|
421
|
-
this._watchExpressions.delete(id);
|
|
202
|
+
}
|
|
203
|
+
updateWatchExpressions() {
|
|
204
|
+
let added = false;
|
|
205
|
+
const toRemove = new Set(this._watchExpressions.keys());
|
|
206
|
+
for (const [id, expression] of this.watch.watchExpressions) {
|
|
207
|
+
toRemove.delete(id);
|
|
208
|
+
if (!this._watchExpressions.has(id)) {
|
|
209
|
+
added = true;
|
|
210
|
+
const watchExpression = new debug_watch_expression_1.DebugWatchExpression({
|
|
211
|
+
id,
|
|
212
|
+
expression,
|
|
213
|
+
session: () => this.currentSession,
|
|
214
|
+
onDidChange: () => this.fireDidChangeWatchExpressions()
|
|
215
|
+
});
|
|
216
|
+
this._watchExpressions.set(id, watchExpression);
|
|
217
|
+
watchExpression.evaluate();
|
|
422
218
|
}
|
|
423
219
|
}
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
try {
|
|
427
|
-
if (toRemove_1_1 && !toRemove_1_1.done && (_b = toRemove_1.return)) _b.call(toRemove_1);
|
|
428
|
-
}
|
|
429
|
-
finally { if (e_4) throw e_4.error; }
|
|
220
|
+
for (const id of toRemove) {
|
|
221
|
+
this._watchExpressions.delete(id);
|
|
430
222
|
}
|
|
431
223
|
if (added || toRemove.size) {
|
|
432
224
|
this.fireDidChangeWatchExpressions();
|
|
433
225
|
}
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
}());
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
__decorate([
|
|
229
|
+
inversify_1.inject(exports.DebugViewOptions),
|
|
230
|
+
__metadata("design:type", Object)
|
|
231
|
+
], DebugViewModel.prototype, "options", void 0);
|
|
232
|
+
__decorate([
|
|
233
|
+
inversify_1.inject(debug_session_manager_1.DebugSessionManager),
|
|
234
|
+
__metadata("design:type", debug_session_manager_1.DebugSessionManager)
|
|
235
|
+
], DebugViewModel.prototype, "manager", void 0);
|
|
236
|
+
__decorate([
|
|
237
|
+
inversify_1.inject(debug_watch_manager_1.DebugWatchManager),
|
|
238
|
+
__metadata("design:type", debug_watch_manager_1.DebugWatchManager)
|
|
239
|
+
], DebugViewModel.prototype, "watch", void 0);
|
|
240
|
+
__decorate([
|
|
241
|
+
inversify_1.postConstruct(),
|
|
242
|
+
__metadata("design:type", Function),
|
|
243
|
+
__metadata("design:paramtypes", []),
|
|
244
|
+
__metadata("design:returntype", void 0)
|
|
245
|
+
], DebugViewModel.prototype, "init", null);
|
|
246
|
+
DebugViewModel = __decorate([
|
|
247
|
+
inversify_1.injectable()
|
|
248
|
+
], DebugViewModel);
|
|
458
249
|
exports.DebugViewModel = DebugViewModel;
|
|
459
250
|
//# sourceMappingURL=debug-view-model.js.map
|