@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-breakpoint.js","sourceRoot":"","sources":["../../../src/browser/model/debug-breakpoint.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF
|
|
1
|
+
{"version":3,"file":"debug-breakpoint.js","sourceRoot":"","sources":["../../../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AAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;SACnE,CAAC;IACN,CAAC;IAES,+BAA+B,CAAC,OAAgB;QACtD,MAAM,UAAU,GAAG,IAAI,CAAC,uBAAuB,EAAE,CAAC;QAClD,OAAO;YACH,SAAS,EAAE,UAAU,CAAC,SAAS,GAAG,WAAW;YAC7C,OAAO,EAAE,CAAC,OAAO,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;SAC9D,CAAC;IACN,CAAC;IAES,eAAe,CAAC,WAAqB,EAAE;QAC7C,IAAI,IAAI,CAAC,OAAO,EAAE;YACd,IAAI,QAAQ,CAAC,MAAM,EAAE;gBACjB,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC;aAC7D;iBAAM;gBACH,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;aAC/B;SACJ;QACD,OAAO,IAAI,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IAClD,CAAC;CAIJ;AA5GD,0CA4GC"}
|
|
@@ -14,149 +14,79 @@
|
|
|
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
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
67
18
|
exports.DebugFunctionBreakpoint = void 0;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
_this.origin = origin;
|
|
77
|
-
return _this;
|
|
19
|
+
const React = require("@theia/core/shared/react");
|
|
20
|
+
const breakpoint_manager_1 = require("../breakpoint/breakpoint-manager");
|
|
21
|
+
const debug_breakpoint_1 = require("./debug-breakpoint");
|
|
22
|
+
const dialogs_1 = require("@theia/core/lib/browser/dialogs");
|
|
23
|
+
class DebugFunctionBreakpoint extends debug_breakpoint_1.DebugBreakpoint {
|
|
24
|
+
constructor(origin, options) {
|
|
25
|
+
super(breakpoint_manager_1.BreakpointManager.FUNCTION_URI, options);
|
|
26
|
+
this.origin = origin;
|
|
78
27
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
var breakpoint = breakpoints.find(function (b) { return b.id === _this.id; });
|
|
28
|
+
setEnabled(enabled) {
|
|
29
|
+
const breakpoints = this.breakpoints.getFunctionBreakpoints();
|
|
30
|
+
const breakpoint = breakpoints.find(b => b.id === this.id);
|
|
83
31
|
if (breakpoint && breakpoint.enabled !== enabled) {
|
|
84
32
|
breakpoint.enabled = enabled;
|
|
85
33
|
this.breakpoints.setFunctionBreakpoints(breakpoints);
|
|
86
34
|
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
35
|
+
}
|
|
36
|
+
isEnabled() {
|
|
37
|
+
return super.isEnabled() && this.isSupported();
|
|
38
|
+
}
|
|
39
|
+
isSupported() {
|
|
40
|
+
const { session } = this;
|
|
93
41
|
return !session || !!session.capabilities.supportsFunctionBreakpoints;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
var newBreakpoints = breakpoints.filter(function (b) { return b.id !== _this.id; });
|
|
42
|
+
}
|
|
43
|
+
remove() {
|
|
44
|
+
const breakpoints = this.breakpoints.getFunctionBreakpoints();
|
|
45
|
+
const newBreakpoints = breakpoints.filter(b => b.id !== this.id);
|
|
99
46
|
if (breakpoints.length !== newBreakpoints.length) {
|
|
100
47
|
this.breakpoints.setFunctionBreakpoints(newBreakpoints);
|
|
101
48
|
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
enumerable: false,
|
|
108
|
-
configurable: true
|
|
109
|
-
});
|
|
110
|
-
DebugFunctionBreakpoint.prototype.doRender = function () {
|
|
49
|
+
}
|
|
50
|
+
get name() {
|
|
51
|
+
return this.origin.raw.name;
|
|
52
|
+
}
|
|
53
|
+
doRender() {
|
|
111
54
|
return React.createElement("span", { className: 'line-info' }, this.name);
|
|
112
|
-
}
|
|
113
|
-
|
|
55
|
+
}
|
|
56
|
+
doGetDecoration() {
|
|
114
57
|
if (!this.isSupported()) {
|
|
115
58
|
return this.getDisabledBreakpointDecoration('Function breakpoints are not supported by this debug type');
|
|
116
59
|
}
|
|
117
|
-
return
|
|
118
|
-
}
|
|
119
|
-
|
|
60
|
+
return super.doGetDecoration();
|
|
61
|
+
}
|
|
62
|
+
getBreakpointDecoration(message) {
|
|
120
63
|
return {
|
|
121
64
|
className: 'theia-debug-function',
|
|
122
65
|
message: message || ['Function Breakpoint']
|
|
123
66
|
};
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
return __generator(this, function (_a) {
|
|
130
|
-
switch (_a.label) {
|
|
131
|
-
case 0:
|
|
132
|
-
input = new dialogs_1.SingleTextInputDialog({
|
|
133
|
-
title: 'Add Function Breakpoint',
|
|
134
|
-
initialValue: this.name
|
|
135
|
-
});
|
|
136
|
-
return [4 /*yield*/, input.open()];
|
|
137
|
-
case 1:
|
|
138
|
-
newValue = _a.sent();
|
|
139
|
-
if (newValue !== undefined && newValue !== this.name) {
|
|
140
|
-
breakpoints = this.breakpoints.getFunctionBreakpoints();
|
|
141
|
-
breakpoint = breakpoints.find(function (b) { return b.id === _this.id; });
|
|
142
|
-
if (breakpoint) {
|
|
143
|
-
if (breakpoint.raw.name !== newValue) {
|
|
144
|
-
breakpoint.raw.name = newValue;
|
|
145
|
-
this.breakpoints.setFunctionBreakpoints(breakpoints);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
this.origin.raw.name = newValue;
|
|
150
|
-
breakpoints.push(this.origin);
|
|
151
|
-
this.breakpoints.setFunctionBreakpoints(breakpoints);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
return [2 /*return*/];
|
|
155
|
-
}
|
|
156
|
-
});
|
|
67
|
+
}
|
|
68
|
+
async open() {
|
|
69
|
+
const input = new dialogs_1.SingleTextInputDialog({
|
|
70
|
+
title: 'Add Function Breakpoint',
|
|
71
|
+
initialValue: this.name
|
|
157
72
|
});
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
73
|
+
const newValue = await input.open();
|
|
74
|
+
if (newValue !== undefined && newValue !== this.name) {
|
|
75
|
+
const breakpoints = this.breakpoints.getFunctionBreakpoints();
|
|
76
|
+
const breakpoint = breakpoints.find(b => b.id === this.id);
|
|
77
|
+
if (breakpoint) {
|
|
78
|
+
if (breakpoint.raw.name !== newValue) {
|
|
79
|
+
breakpoint.raw.name = newValue;
|
|
80
|
+
this.breakpoints.setFunctionBreakpoints(breakpoints);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
this.origin.raw.name = newValue;
|
|
85
|
+
breakpoints.push(this.origin);
|
|
86
|
+
this.breakpoints.setFunctionBreakpoints(breakpoints);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
161
91
|
exports.DebugFunctionBreakpoint = DebugFunctionBreakpoint;
|
|
162
92
|
//# sourceMappingURL=debug-function-breakpoint.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-function-breakpoint.js","sourceRoot":"","sources":["../../../src/browser/model/debug-function-breakpoint.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF
|
|
1
|
+
{"version":3,"file":"debug-function-breakpoint.js","sourceRoot":"","sources":["../../../src/browser/model/debug-function-breakpoint.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,kDAAkD;AAGlD,yEAAqE;AACrE,yDAAwG;AACxG,6DAAwE;AAExE,MAAa,uBAAwB,SAAQ,kCAAmC;IAE5E,YAAqB,MAA0B,EAAE,OAA+B;QAC5E,KAAK,CAAC,sCAAiB,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;QAD9B,WAAM,GAAN,MAAM,CAAoB;IAE/C,CAAC;IAED,UAAU,CAAC,OAAgB;QACvB,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,sBAAsB,EAAE,CAAC;QAC9D,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC,CAAC;QAC3D,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CAAC,qBAAqB,CAAC;SAC9C,CAAC;IACN,CAAC;IAED,KAAK,CAAC,IAAI;QACN,MAAM,KAAK,GAAG,IAAI,+BAAqB,CAAC;YACpC,KAAK,EAAE,yBAAyB;YAChC,YAAY,EAAE,IAAI,CAAC,IAAI;SAC1B,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,EAAE,CAAC;QACpC,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,KAAK,IAAI,CAAC,IAAI,EAAE;YAClD,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,sBAAsB,EAAE,CAAC;YAC9D,MAAM,UAAU,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC,CAAC;YAC3D,IAAI,UAAU,EAAE;gBACZ,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,KAAK,QAAQ,EAAE;oBAClC,UAAU,CAAC,GAAG,CAAC,IAAI,GAAG,QAAQ,CAAC;oBAC/B,IAAI,CAAC,WAAW,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC;iBACxD;aACJ;iBAAM;gBACH,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,GAAG,QAAQ,CAAC;gBAChC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC9B,IAAI,CAAC,WAAW,CAAC,sBAAsB,CAAC,WAAW,CAAC,CAAC;aACxD;SACJ;IACL,CAAC;CAEJ;AA5ED,0DA4EC"}
|
|
@@ -14,116 +14,33 @@
|
|
|
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 __assign = (this && this.__assign) || function () {
|
|
31
|
-
__assign = Object.assign || function(t) {
|
|
32
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
-
s = arguments[i];
|
|
34
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
-
t[p] = s[p];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
return __assign.apply(this, arguments);
|
|
40
|
-
};
|
|
41
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
42
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
43
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
44
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
45
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
46
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
47
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
48
|
-
});
|
|
49
|
-
};
|
|
50
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
51
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
52
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
53
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
54
|
-
function step(op) {
|
|
55
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
56
|
-
while (_) try {
|
|
57
|
-
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;
|
|
58
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
59
|
-
switch (op[0]) {
|
|
60
|
-
case 0: case 1: t = op; break;
|
|
61
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
62
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
63
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
64
|
-
default:
|
|
65
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
66
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
67
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
68
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
69
|
-
if (t[2]) _.ops.pop();
|
|
70
|
-
_.trys.pop(); continue;
|
|
71
|
-
}
|
|
72
|
-
op = body.call(thisArg, _);
|
|
73
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
74
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
var __values = (this && this.__values) || function(o) {
|
|
78
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
79
|
-
if (m) return m.call(o);
|
|
80
|
-
if (o && typeof o.length === "number") return {
|
|
81
|
-
next: function () {
|
|
82
|
-
if (o && i >= o.length) o = void 0;
|
|
83
|
-
return { value: o && o[i++], done: !o };
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
87
|
-
};
|
|
88
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
89
18
|
exports.DebugSourceBreakpoint = exports.DebugSourceBreakpointData = void 0;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
function DebugSourceBreakpointData() {
|
|
97
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
98
|
-
}
|
|
99
|
-
return DebugSourceBreakpointData;
|
|
100
|
-
}(debug_breakpoint_1.DebugBreakpointData));
|
|
19
|
+
const React = require("@theia/core/shared/react");
|
|
20
|
+
const uri_1 = require("@theia/core/lib/common/uri");
|
|
21
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
22
|
+
const debug_breakpoint_1 = require("./debug-breakpoint");
|
|
23
|
+
class DebugSourceBreakpointData extends debug_breakpoint_1.DebugBreakpointData {
|
|
24
|
+
}
|
|
101
25
|
exports.DebugSourceBreakpointData = DebugSourceBreakpointData;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
_this.setEnabled(event.target.checked);
|
|
26
|
+
class DebugSourceBreakpoint extends debug_breakpoint_1.DebugBreakpoint {
|
|
27
|
+
constructor(origin, options) {
|
|
28
|
+
super(new uri_1.default(origin.uri), options);
|
|
29
|
+
this.setBreakpointEnabled = (event) => {
|
|
30
|
+
this.setEnabled(event.target.checked);
|
|
108
31
|
};
|
|
109
|
-
|
|
110
|
-
return _this;
|
|
32
|
+
this.origins = [origin];
|
|
111
33
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
DebugSourceBreakpoint.prototype.setEnabled = function (enabled) {
|
|
123
|
-
var e_1, _a;
|
|
124
|
-
var _b = this, uri = _b.uri, raw = _b.raw;
|
|
125
|
-
var shouldUpdate = false;
|
|
126
|
-
var breakpoints = raw && this.doRemove(this.origins.filter(function (origin) { return !(origin.raw.line === raw.line && origin.raw.column === raw.column); }));
|
|
34
|
+
update(data) {
|
|
35
|
+
super.update(data);
|
|
36
|
+
}
|
|
37
|
+
get origin() {
|
|
38
|
+
return this.origins[0];
|
|
39
|
+
}
|
|
40
|
+
setEnabled(enabled) {
|
|
41
|
+
const { uri, raw } = this;
|
|
42
|
+
let shouldUpdate = false;
|
|
43
|
+
let breakpoints = raw && this.doRemove(this.origins.filter(origin => !(origin.raw.line === raw.line && origin.raw.column === raw.column)));
|
|
127
44
|
// Check for breakpoints array with at least one entry
|
|
128
45
|
if (breakpoints && breakpoints.length) {
|
|
129
46
|
shouldUpdate = true;
|
|
@@ -131,146 +48,80 @@ var DebugSourceBreakpoint = /** @class */ (function (_super) {
|
|
|
131
48
|
else {
|
|
132
49
|
breakpoints = this.breakpoints.getBreakpoints(uri);
|
|
133
50
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
breakpoint.enabled = enabled;
|
|
139
|
-
shouldUpdate = true;
|
|
140
|
-
}
|
|
51
|
+
for (const breakpoint of breakpoints) {
|
|
52
|
+
if (breakpoint.raw.line === this.origin.raw.line && breakpoint.raw.column === this.origin.raw.column && breakpoint.enabled !== enabled) {
|
|
53
|
+
breakpoint.enabled = enabled;
|
|
54
|
+
shouldUpdate = true;
|
|
141
55
|
}
|
|
142
56
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
57
|
+
if (shouldUpdate) {
|
|
58
|
+
this.breakpoints.setBreakpoints(this.uri, breakpoints);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
updateOrigins(data) {
|
|
62
|
+
const breakpoints = this.breakpoints.getBreakpoints(this.uri);
|
|
63
|
+
let shouldUpdate = false;
|
|
64
|
+
const originPositions = new Set();
|
|
65
|
+
this.origins.forEach(origin => originPositions.add(origin.raw.line + ':' + origin.raw.column));
|
|
66
|
+
for (const breakpoint of breakpoints) {
|
|
67
|
+
if (originPositions.has(breakpoint.raw.line + ':' + breakpoint.raw.column)) {
|
|
68
|
+
Object.assign(breakpoint.raw, data);
|
|
69
|
+
shouldUpdate = true;
|
|
147
70
|
}
|
|
148
|
-
finally { if (e_1) throw e_1.error; }
|
|
149
71
|
}
|
|
150
72
|
if (shouldUpdate) {
|
|
151
73
|
this.breakpoints.setBreakpoints(this.uri, breakpoints);
|
|
152
74
|
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
this.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
75
|
+
}
|
|
76
|
+
/** 1-based */
|
|
77
|
+
get line() {
|
|
78
|
+
return this.raw && this.raw.line || this.origins[0].raw.line;
|
|
79
|
+
}
|
|
80
|
+
get column() {
|
|
81
|
+
return this.raw && this.raw.column || this.origins[0].raw.column;
|
|
82
|
+
}
|
|
83
|
+
get endLine() {
|
|
84
|
+
return this.raw && this.raw.endLine;
|
|
85
|
+
}
|
|
86
|
+
get endColumn() {
|
|
87
|
+
return this.raw && this.raw.endColumn;
|
|
88
|
+
}
|
|
89
|
+
get condition() {
|
|
90
|
+
return this.origin.raw.condition;
|
|
91
|
+
}
|
|
92
|
+
get hitCondition() {
|
|
93
|
+
return this.origin.raw.hitCondition;
|
|
94
|
+
}
|
|
95
|
+
get logMessage() {
|
|
96
|
+
return this.origin.raw.logMessage;
|
|
97
|
+
}
|
|
98
|
+
get source() {
|
|
99
|
+
return this.raw && this.raw.source && this.session && this.session.getSource(this.raw.source);
|
|
100
|
+
}
|
|
101
|
+
async open(options = {
|
|
102
|
+
mode: 'reveal'
|
|
103
|
+
}) {
|
|
104
|
+
const { line, column, endLine, endColumn } = this;
|
|
105
|
+
const selection = {
|
|
106
|
+
start: {
|
|
107
|
+
line: line - 1,
|
|
108
|
+
character: typeof column === 'number' ? column - 1 : undefined
|
|
167
109
|
}
|
|
110
|
+
};
|
|
111
|
+
if (typeof endLine === 'number') {
|
|
112
|
+
selection.end = {
|
|
113
|
+
line: endLine - 1,
|
|
114
|
+
character: typeof endColumn === 'number' ? endColumn - 1 : undefined
|
|
115
|
+
};
|
|
168
116
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
try {
|
|
172
|
-
if (breakpoints_2_1 && !breakpoints_2_1.done && (_a = breakpoints_2.return)) _a.call(breakpoints_2);
|
|
173
|
-
}
|
|
174
|
-
finally { if (e_2) throw e_2.error; }
|
|
117
|
+
if (this.source) {
|
|
118
|
+
await this.source.open(Object.assign(Object.assign({}, options), { selection }));
|
|
175
119
|
}
|
|
176
|
-
|
|
177
|
-
this.
|
|
120
|
+
else {
|
|
121
|
+
await this.editorManager.open(this.uri, Object.assign(Object.assign({}, options), { selection }));
|
|
178
122
|
}
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
/** 1-based */
|
|
182
|
-
get: function () {
|
|
183
|
-
return this.raw && this.raw.line || this.origins[0].raw.line;
|
|
184
|
-
},
|
|
185
|
-
enumerable: false,
|
|
186
|
-
configurable: true
|
|
187
|
-
});
|
|
188
|
-
Object.defineProperty(DebugSourceBreakpoint.prototype, "column", {
|
|
189
|
-
get: function () {
|
|
190
|
-
return this.raw && this.raw.column || this.origins[0].raw.column;
|
|
191
|
-
},
|
|
192
|
-
enumerable: false,
|
|
193
|
-
configurable: true
|
|
194
|
-
});
|
|
195
|
-
Object.defineProperty(DebugSourceBreakpoint.prototype, "endLine", {
|
|
196
|
-
get: function () {
|
|
197
|
-
return this.raw && this.raw.endLine;
|
|
198
|
-
},
|
|
199
|
-
enumerable: false,
|
|
200
|
-
configurable: true
|
|
201
|
-
});
|
|
202
|
-
Object.defineProperty(DebugSourceBreakpoint.prototype, "endColumn", {
|
|
203
|
-
get: function () {
|
|
204
|
-
return this.raw && this.raw.endColumn;
|
|
205
|
-
},
|
|
206
|
-
enumerable: false,
|
|
207
|
-
configurable: true
|
|
208
|
-
});
|
|
209
|
-
Object.defineProperty(DebugSourceBreakpoint.prototype, "condition", {
|
|
210
|
-
get: function () {
|
|
211
|
-
return this.origin.raw.condition;
|
|
212
|
-
},
|
|
213
|
-
enumerable: false,
|
|
214
|
-
configurable: true
|
|
215
|
-
});
|
|
216
|
-
Object.defineProperty(DebugSourceBreakpoint.prototype, "hitCondition", {
|
|
217
|
-
get: function () {
|
|
218
|
-
return this.origin.raw.hitCondition;
|
|
219
|
-
},
|
|
220
|
-
enumerable: false,
|
|
221
|
-
configurable: true
|
|
222
|
-
});
|
|
223
|
-
Object.defineProperty(DebugSourceBreakpoint.prototype, "logMessage", {
|
|
224
|
-
get: function () {
|
|
225
|
-
return this.origin.raw.logMessage;
|
|
226
|
-
},
|
|
227
|
-
enumerable: false,
|
|
228
|
-
configurable: true
|
|
229
|
-
});
|
|
230
|
-
Object.defineProperty(DebugSourceBreakpoint.prototype, "source", {
|
|
231
|
-
get: function () {
|
|
232
|
-
return this.raw && this.raw.source && this.session && this.session.getSource(this.raw.source);
|
|
233
|
-
},
|
|
234
|
-
enumerable: false,
|
|
235
|
-
configurable: true
|
|
236
|
-
});
|
|
237
|
-
DebugSourceBreakpoint.prototype.open = function (options) {
|
|
238
|
-
if (options === void 0) { options = {
|
|
239
|
-
mode: 'reveal'
|
|
240
|
-
}; }
|
|
241
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
242
|
-
var _a, line, column, endLine, endColumn, selection;
|
|
243
|
-
return __generator(this, function (_b) {
|
|
244
|
-
switch (_b.label) {
|
|
245
|
-
case 0:
|
|
246
|
-
_a = this, line = _a.line, column = _a.column, endLine = _a.endLine, endColumn = _a.endColumn;
|
|
247
|
-
selection = {
|
|
248
|
-
start: {
|
|
249
|
-
line: line - 1,
|
|
250
|
-
character: typeof column === 'number' ? column - 1 : undefined
|
|
251
|
-
}
|
|
252
|
-
};
|
|
253
|
-
if (typeof endLine === 'number') {
|
|
254
|
-
selection.end = {
|
|
255
|
-
line: endLine - 1,
|
|
256
|
-
character: typeof endColumn === 'number' ? endColumn - 1 : undefined
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
if (!this.source) return [3 /*break*/, 2];
|
|
260
|
-
return [4 /*yield*/, this.source.open(__assign(__assign({}, options), { selection: selection }))];
|
|
261
|
-
case 1:
|
|
262
|
-
_b.sent();
|
|
263
|
-
return [3 /*break*/, 4];
|
|
264
|
-
case 2: return [4 /*yield*/, this.editorManager.open(this.uri, __assign(__assign({}, options), { selection: selection }))];
|
|
265
|
-
case 3:
|
|
266
|
-
_b.sent();
|
|
267
|
-
_b.label = 4;
|
|
268
|
-
case 4: return [2 /*return*/];
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
});
|
|
272
|
-
};
|
|
273
|
-
DebugSourceBreakpoint.prototype.doRender = function () {
|
|
123
|
+
}
|
|
124
|
+
doRender() {
|
|
274
125
|
return React.createElement(React.Fragment, null,
|
|
275
126
|
React.createElement("span", { className: 'line-info', title: this.labelProvider.getLongName(this.uri) },
|
|
276
127
|
React.createElement("span", { className: 'name' },
|
|
@@ -280,14 +131,13 @@ var DebugSourceBreakpoint = /** @class */ (function (_super) {
|
|
|
280
131
|
this.labelProvider.getLongName(this.uri.parent),
|
|
281
132
|
" ")),
|
|
282
133
|
React.createElement("span", { className: 'line' }, this.renderPosition()));
|
|
283
|
-
}
|
|
284
|
-
|
|
134
|
+
}
|
|
135
|
+
renderPosition() {
|
|
285
136
|
return this.line + (typeof this.column === 'number' ? ':' + this.column : '');
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
if (messages === void 0) { messages = []; }
|
|
137
|
+
}
|
|
138
|
+
doGetDecoration(messages = []) {
|
|
289
139
|
if (this.logMessage || this.condition || this.hitCondition) {
|
|
290
|
-
|
|
140
|
+
const { session } = this;
|
|
291
141
|
if (this.logMessage) {
|
|
292
142
|
if (session && !session.capabilities.supportsLogPoints) {
|
|
293
143
|
return this.getUnsupportedBreakpointDecoration('Logpoints not supported by this debug type');
|
|
@@ -307,15 +157,15 @@ var DebugSourceBreakpoint = /** @class */ (function (_super) {
|
|
|
307
157
|
messages.push('Hit Count: ' + this.hitCondition);
|
|
308
158
|
}
|
|
309
159
|
}
|
|
310
|
-
return
|
|
311
|
-
}
|
|
312
|
-
|
|
160
|
+
return super.doGetDecoration(messages);
|
|
161
|
+
}
|
|
162
|
+
getUnsupportedBreakpointDecoration(message) {
|
|
313
163
|
return {
|
|
314
164
|
className: 'theia-debug-breakpoint-unsupported',
|
|
315
165
|
message: [message]
|
|
316
166
|
};
|
|
317
|
-
}
|
|
318
|
-
|
|
167
|
+
}
|
|
168
|
+
getBreakpointDecoration(message) {
|
|
319
169
|
if (this.logMessage) {
|
|
320
170
|
return {
|
|
321
171
|
className: 'theia-debug-logpoint',
|
|
@@ -332,35 +182,31 @@ var DebugSourceBreakpoint = /** @class */ (function (_super) {
|
|
|
332
182
|
className: 'theia-debug-breakpoint',
|
|
333
183
|
message: message || ['Breakpoint']
|
|
334
184
|
};
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
|
|
185
|
+
}
|
|
186
|
+
remove() {
|
|
187
|
+
const breakpoints = this.doRemove(this.origins);
|
|
338
188
|
if (breakpoints) {
|
|
339
189
|
this.breakpoints.setBreakpoints(this.uri, breakpoints);
|
|
340
190
|
}
|
|
341
|
-
}
|
|
342
|
-
|
|
191
|
+
}
|
|
192
|
+
doRemove(origins) {
|
|
343
193
|
if (!origins.length) {
|
|
344
194
|
return undefined;
|
|
345
195
|
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
origins.forEach(
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
uri
|
|
352
|
-
dataFilter:
|
|
353
|
-
|
|
196
|
+
const { uri } = this;
|
|
197
|
+
const toRemove = new Set();
|
|
198
|
+
origins.forEach(origin => toRemove.add(origin.raw.line + ':' + origin.raw.column));
|
|
199
|
+
let shouldUpdate = false;
|
|
200
|
+
const breakpoints = this.breakpoints.findMarkers({
|
|
201
|
+
uri,
|
|
202
|
+
dataFilter: data => {
|
|
203
|
+
const result = !toRemove.has(data.raw.line + ':' + data.raw.column);
|
|
354
204
|
shouldUpdate = shouldUpdate || !result;
|
|
355
205
|
return result;
|
|
356
206
|
}
|
|
357
|
-
}).map(
|
|
358
|
-
var data = _a.data;
|
|
359
|
-
return data;
|
|
360
|
-
});
|
|
207
|
+
}).map(({ data }) => data);
|
|
361
208
|
return shouldUpdate && breakpoints || undefined;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
}(debug_breakpoint_1.DebugBreakpoint));
|
|
209
|
+
}
|
|
210
|
+
}
|
|
365
211
|
exports.DebugSourceBreakpoint = DebugSourceBreakpoint;
|
|
366
212
|
//# sourceMappingURL=debug-source-breakpoint.js.map
|