@theia/debug 1.18.0 → 1.19.0
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/console/debug-console-contribution.d.ts +2 -0
- package/lib/browser/console/debug-console-contribution.d.ts.map +1 -1
- package/lib/browser/console/debug-console-contribution.js +9 -6
- package/lib/browser/console/debug-console-contribution.js.map +1 -1
- package/lib/browser/console/debug-console-session.d.ts +1 -1
- package/lib/browser/debug-configuration-manager.d.ts.map +1 -1
- package/lib/browser/debug-configuration-manager.js +8 -7
- package/lib/browser/debug-configuration-manager.js.map +1 -1
- package/lib/browser/debug-frontend-application-contribution.d.ts +5 -12
- package/lib/browser/debug-frontend-application-contribution.d.ts.map +1 -1
- package/lib/browser/debug-frontend-application-contribution.js +131 -105
- package/lib/browser/debug-frontend-application-contribution.js.map +1 -1
- package/lib/browser/debug-preferences.d.ts +1 -0
- package/lib/browser/debug-preferences.d.ts.map +1 -1
- package/lib/browser/debug-preferences.js +22 -6
- package/lib/browser/debug-preferences.js.map +1 -1
- package/lib/browser/debug-prefix-configuration.d.ts.map +1 -1
- package/lib/browser/debug-prefix-configuration.js +3 -3
- package/lib/browser/debug-prefix-configuration.js.map +1 -1
- package/lib/browser/debug-session-connection.d.ts +1 -1
- package/lib/browser/debug-session-connection.d.ts.map +1 -1
- package/lib/browser/debug-session-contribution.d.ts +1 -1
- package/lib/browser/debug-session-contribution.d.ts.map +1 -1
- package/lib/browser/debug-session-contribution.js +1 -1
- package/lib/browser/debug-session-contribution.js.map +1 -1
- package/lib/browser/preferences/launch-preferences.d.ts.map +1 -1
- package/lib/browser/preferences/launch-preferences.js +2 -1
- package/lib/browser/preferences/launch-preferences.js.map +1 -1
- package/lib/browser/view/debug-breakpoints-source.d.ts +0 -1
- package/lib/browser/view/debug-breakpoints-source.d.ts.map +1 -1
- package/lib/browser/view/debug-breakpoints-source.js +1 -7
- package/lib/browser/view/debug-breakpoints-source.js.map +1 -1
- package/lib/browser/view/debug-breakpoints-widget.d.ts.map +1 -1
- package/lib/browser/view/debug-breakpoints-widget.js +2 -1
- package/lib/browser/view/debug-breakpoints-widget.js.map +1 -1
- package/lib/browser/view/debug-configuration-widget.d.ts +1 -1
- package/lib/browser/view/debug-configuration-widget.d.ts.map +1 -1
- package/lib/browser/view/debug-configuration-widget.js +8 -8
- package/lib/browser/view/debug-configuration-widget.js.map +1 -1
- package/lib/browser/view/debug-session-widget.d.ts +2 -1
- package/lib/browser/view/debug-session-widget.d.ts.map +1 -1
- package/lib/browser/view/debug-session-widget.js +12 -6
- package/lib/browser/view/debug-session-widget.js.map +1 -1
- package/lib/browser/view/debug-stack-frames-source.d.ts +0 -1
- package/lib/browser/view/debug-stack-frames-source.d.ts.map +1 -1
- package/lib/browser/view/debug-stack-frames-source.js +2 -5
- package/lib/browser/view/debug-stack-frames-source.js.map +1 -1
- package/lib/browser/view/debug-stack-frames-widget.d.ts.map +1 -1
- package/lib/browser/view/debug-stack-frames-widget.js +2 -1
- package/lib/browser/view/debug-stack-frames-widget.js.map +1 -1
- package/lib/browser/view/debug-threads-source.d.ts +0 -1
- package/lib/browser/view/debug-threads-source.d.ts.map +1 -1
- package/lib/browser/view/debug-threads-source.js +1 -7
- package/lib/browser/view/debug-threads-source.js.map +1 -1
- package/lib/browser/view/debug-threads-widget.d.ts.map +1 -1
- package/lib/browser/view/debug-threads-widget.js +2 -1
- package/lib/browser/view/debug-threads-widget.js.map +1 -1
- package/lib/browser/view/debug-toolbar-widget.d.ts.map +1 -1
- package/lib/browser/view/debug-toolbar-widget.js +9 -8
- package/lib/browser/view/debug-toolbar-widget.js.map +1 -1
- package/lib/browser/view/debug-variables-source.d.ts +0 -1
- package/lib/browser/view/debug-variables-source.d.ts.map +1 -1
- package/lib/browser/view/debug-variables-source.js +2 -5
- package/lib/browser/view/debug-variables-source.js.map +1 -1
- package/lib/browser/view/debug-variables-widget.d.ts.map +1 -1
- package/lib/browser/view/debug-variables-widget.js +2 -1
- package/lib/browser/view/debug-variables-widget.js.map +1 -1
- package/lib/browser/view/debug-watch-source.d.ts +0 -1
- package/lib/browser/view/debug-watch-source.d.ts.map +1 -1
- package/lib/browser/view/debug-watch-source.js +2 -5
- package/lib/browser/view/debug-watch-source.js.map +1 -1
- package/lib/browser/view/debug-watch-widget.d.ts.map +1 -1
- package/lib/browser/view/debug-watch-widget.js +2 -1
- package/lib/browser/view/debug-watch-widget.js.map +1 -1
- package/lib/browser/view/debug-widget.d.ts.map +1 -1
- package/lib/browser/view/debug-widget.js +2 -1
- package/lib/browser/view/debug-widget.js.map +1 -1
- package/lib/node/debug-adapter-contribution-registry.d.ts +1 -1
- package/lib/node/debug-adapter-contribution-registry.d.ts.map +1 -1
- package/lib/node/debug-adapter-contribution-registry.js +1 -1
- package/lib/node/debug-adapter-contribution-registry.js.map +1 -1
- package/lib/node/debug-adapter-factory.d.ts +1 -1
- package/lib/node/debug-adapter-factory.d.ts.map +1 -1
- package/lib/node/debug-adapter-factory.js +8 -10
- package/lib/node/debug-adapter-factory.js.map +1 -1
- package/lib/node/debug-adapter-session-manager.d.ts +1 -1
- package/lib/node/debug-adapter-session-manager.d.ts.map +1 -1
- package/lib/node/debug-adapter-session-manager.js +1 -1
- package/lib/node/debug-adapter-session-manager.js.map +1 -1
- package/lib/node/debug-adapter-session.d.ts +1 -7
- package/lib/node/debug-adapter-session.d.ts.map +1 -1
- package/lib/node/debug-adapter-session.js +4 -48
- package/lib/node/debug-adapter-session.js.map +1 -1
- package/lib/node/debug-backend-module.js +1 -1
- package/lib/node/debug-backend-module.js.map +1 -1
- package/lib/{common → node}/debug-model.d.ts +6 -5
- package/lib/node/debug-model.d.ts.map +1 -0
- package/lib/{common → node}/debug-model.js +0 -0
- package/lib/node/debug-model.js.map +1 -0
- package/lib/node/inline-communication-provider.d.ts +33 -0
- package/lib/node/inline-communication-provider.d.ts.map +1 -0
- package/lib/node/inline-communication-provider.js +43 -0
- package/lib/node/inline-communication-provider.js.map +1 -0
- package/lib/node/stream-communication-provider.d.ts +38 -0
- package/lib/node/stream-communication-provider.d.ts.map +1 -0
- package/lib/node/stream-communication-provider.js +88 -0
- package/lib/node/stream-communication-provider.js.map +1 -0
- package/lib/node/vscode/vscode-debug-adapter-contribution.d.ts +1 -1
- package/lib/node/vscode/vscode-debug-adapter-contribution.d.ts.map +1 -1
- package/package.json +17 -17
- package/src/browser/console/debug-console-contribution.tsx +10 -6
- package/src/browser/debug-configuration-manager.ts +10 -8
- package/src/browser/debug-frontend-application-contribution.ts +152 -118
- package/src/browser/debug-preferences.ts +23 -6
- package/src/browser/debug-prefix-configuration.ts +3 -3
- package/src/browser/debug-session-connection.ts +1 -1
- package/src/browser/debug-session-contribution.ts +1 -1
- package/src/browser/preferences/launch-preferences.ts +5 -1
- package/src/browser/view/debug-breakpoints-source.tsx +0 -6
- package/src/browser/view/debug-breakpoints-widget.ts +2 -1
- package/src/browser/view/debug-configuration-widget.tsx +8 -7
- package/src/browser/view/debug-session-widget.ts +12 -6
- package/src/browser/view/debug-stack-frames-source.tsx +0 -6
- package/src/browser/view/debug-stack-frames-widget.ts +2 -1
- package/src/browser/view/debug-threads-source.tsx +0 -6
- package/src/browser/view/debug-threads-widget.ts +2 -1
- package/src/browser/view/debug-toolbar-widget.tsx +13 -8
- package/src/browser/view/debug-variables-source.ts +0 -6
- package/src/browser/view/debug-variables-widget.ts +2 -1
- package/src/browser/view/debug-watch-source.ts +0 -6
- package/src/browser/view/debug-watch-widget.ts +2 -1
- package/src/browser/view/debug-widget.ts +2 -1
- package/src/node/debug-adapter-contribution-registry.ts +1 -1
- package/src/node/debug-adapter-factory.ts +10 -11
- package/src/node/debug-adapter-session-manager.ts +1 -1
- package/src/node/debug-adapter-session.ts +8 -57
- package/src/node/debug-backend-module.ts +1 -1
- package/src/{common → node}/debug-model.ts +6 -4
- package/src/node/inline-communication-provider.ts +44 -0
- package/src/node/stream-communication-provider.ts +93 -0
- package/src/node/vscode/vscode-debug-adapter-contribution.ts +1 -1
- package/lib/common/debug-model.d.ts.map +0 -1
- package/lib/common/debug-model.js.map +0 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/********************************************************************************
|
|
3
|
+
* Copyright (C) 2021 Red Hat, Inc. and others.
|
|
4
|
+
*
|
|
5
|
+
* This program and the accompanying materials are made available under the
|
|
6
|
+
* terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
* http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
*
|
|
9
|
+
* This Source Code may also be made available under the following Secondary
|
|
10
|
+
* Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
* Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
* with the GNU Classpath Exception which is available at
|
|
13
|
+
* https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
*
|
|
15
|
+
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
16
|
+
********************************************************************************/
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.StreamCommunicationProvider = void 0;
|
|
19
|
+
const disposable_1 = require("@theia/core/lib/common/disposable");
|
|
20
|
+
const event_1 = require("@theia/core/lib/common/event");
|
|
21
|
+
class StreamCommunicationProvider extends disposable_1.DisposableCollection {
|
|
22
|
+
constructor(fromAdapter, toAdapter) {
|
|
23
|
+
super();
|
|
24
|
+
this.fromAdapter = fromAdapter;
|
|
25
|
+
this.toAdapter = toAdapter;
|
|
26
|
+
this.messageReceivedEmitter = new event_1.Emitter();
|
|
27
|
+
this.onMessageReceived = this.messageReceivedEmitter.event;
|
|
28
|
+
this.errorEmitter = new event_1.Emitter();
|
|
29
|
+
this.onError = this.errorEmitter.event;
|
|
30
|
+
this.closeEmitter = new event_1.Emitter();
|
|
31
|
+
this.onClose = this.closeEmitter.event;
|
|
32
|
+
this.contentLength = -1;
|
|
33
|
+
this.buffer = Buffer.alloc(0);
|
|
34
|
+
this.fromAdapter.on('data', (data) => this.handleData(data));
|
|
35
|
+
this.fromAdapter.on('close', () => this.closeEmitter.fire()); // FIXME pass a proper exit code
|
|
36
|
+
this.fromAdapter.on('error', error => this.errorEmitter.fire(error));
|
|
37
|
+
this.toAdapter.on('error', error => this.errorEmitter.fire(error));
|
|
38
|
+
}
|
|
39
|
+
;
|
|
40
|
+
send(message) {
|
|
41
|
+
const msg = `${StreamCommunicationProvider.CONTENT_LENGTH}: ${Buffer.byteLength(message, 'utf8')}${StreamCommunicationProvider.TWO_CRLF}${message}`;
|
|
42
|
+
this.toAdapter.write(msg, 'utf8');
|
|
43
|
+
}
|
|
44
|
+
handleData(data) {
|
|
45
|
+
this.buffer = Buffer.concat([this.buffer, data]);
|
|
46
|
+
while (true) {
|
|
47
|
+
if (this.contentLength >= 0) {
|
|
48
|
+
if (this.buffer.length >= this.contentLength) {
|
|
49
|
+
const message = this.buffer.toString('utf8', 0, this.contentLength);
|
|
50
|
+
this.buffer = this.buffer.slice(this.contentLength);
|
|
51
|
+
this.contentLength = -1;
|
|
52
|
+
if (message.length > 0) {
|
|
53
|
+
this.messageReceivedEmitter.fire(message);
|
|
54
|
+
}
|
|
55
|
+
continue; // there may be more complete messages to process
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
let idx = this.buffer.indexOf(StreamCommunicationProvider.CONTENT_LENGTH);
|
|
60
|
+
if (idx > 0) {
|
|
61
|
+
// log unrecognized output
|
|
62
|
+
const output = this.buffer.slice(0, idx);
|
|
63
|
+
console.log(output.toString('utf-8'));
|
|
64
|
+
this.buffer = this.buffer.slice(idx);
|
|
65
|
+
}
|
|
66
|
+
idx = this.buffer.indexOf(StreamCommunicationProvider.TWO_CRLF);
|
|
67
|
+
if (idx !== -1) {
|
|
68
|
+
const header = this.buffer.toString('utf8', 0, idx);
|
|
69
|
+
const lines = header.split('\r\n');
|
|
70
|
+
for (let i = 0; i < lines.length; i++) {
|
|
71
|
+
const pair = lines[i].split(/: +/);
|
|
72
|
+
if (pair[0] === StreamCommunicationProvider.CONTENT_LENGTH) {
|
|
73
|
+
this.contentLength = +pair[1];
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
this.buffer = this.buffer.slice(idx + StreamCommunicationProvider.TWO_CRLF.length);
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.StreamCommunicationProvider = StreamCommunicationProvider;
|
|
85
|
+
// these constants are for the message header, see: https://microsoft.github.io/debug-adapter-protocol/overview#header-part
|
|
86
|
+
StreamCommunicationProvider.TWO_CRLF = '\r\n\r\n';
|
|
87
|
+
StreamCommunicationProvider.CONTENT_LENGTH = 'Content-Length';
|
|
88
|
+
//# sourceMappingURL=stream-communication-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-communication-provider.js","sourceRoot":"","sources":["../../src/node/stream-communication-provider.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;kFAckF;;;AAElF,kEAAyE;AACzE,wDAA8D;AAI9D,MAAa,2BAA4B,SAAQ,iCAAoB;IAcjE,YAAoB,WAA4B,EAAU,SAA0B;QAChF,KAAK,EAAE,CAAC;QADQ,gBAAW,GAAX,WAAW,CAAiB;QAAU,cAAS,GAAT,SAAS,CAAiB;QAb5E,2BAAsB,GAAG,IAAI,eAAO,EAAU,CAAC;QACvD,sBAAiB,GAAkB,IAAI,CAAC,sBAAsB,CAAC,KAAK,CAAC;QAC7D,iBAAY,GAAG,IAAI,eAAO,EAAS,CAAC;QAC5C,YAAO,GAAiB,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;QACxC,iBAAY,GAAG,IAAI,eAAO,EAAQ,CAAC;QAC3C,YAAO,GAAgB,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;QAKvC,kBAAa,GAAW,CAAC,CAAC,CAAC;QAC3B,WAAM,GAAW,MAAM,CAAC,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K,CAAC,CAAC;wBACnC,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,2BAA2B,CAAC,cAAc,EAAE;4BACxD,IAAI,CAAC,aAAa,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;yBACjC;qBACJ;oBACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,GAAG,2BAA2B,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;oBACnF,SAAS;iBACZ;aACJ;YACD,MAAM;SACT;IACL,CAAC;;AAtEL,kEAuEC;AA/DG,2HAA2H;AAC5G,oCAAQ,GAAG,UAAU,CAAC;AACtB,0CAAc,GAAG,gBAAgB,CAAC"}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*
|
|
14
14
|
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
|
|
15
15
|
********************************************************************************/
|
|
16
|
-
import { DebugAdapterExecutable, DebugAdapterContribution } from '
|
|
16
|
+
import { DebugAdapterExecutable, DebugAdapterContribution } from '../debug-model';
|
|
17
17
|
import { IJSONSchema, IJSONSchemaSnippet } from '@theia/core/lib/common/json-schema';
|
|
18
18
|
export interface VSCodeExtensionPackage {
|
|
19
19
|
contributes: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vscode-debug-adapter-contribution.d.ts","sourceRoot":"","sources":["../../../src/node/vscode/vscode-debug-adapter-contribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAIlF,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"vscode-debug-adapter-contribution.d.ts","sourceRoot":"","sources":["../../../src/node/vscode/vscode-debug-adapter-contribution.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;kFAckF;AAIlF,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAElF,OAAO,E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CAAC,0BAA0B,CAAC,CAAC;IAE7E,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAC5C,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC;gBAGxB,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,MAAM;cAU/B,KAAK,IAAI,OAAO,CAAC,sBAAsB,CAAC;cAexC,2BAA2B,IAAI,OAAO,CAAC,0BAA0B,CAAC;IASlF,SAAS,CAAC,gBAAgB,EAAE,OAAO,CAAC,WAAW,EAAE,CAAC,GAAG,SAAS,CAAC;IACzD,mBAAmB,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;cAGnC,uBAAuB,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAsF3D,wBAAwB,IAAI,OAAO,CAAC,kBAAkB,EAAE,CAAC;IAKzD,6BAA6B,IAAI,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC;CA+BrF"}
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/debug",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.19.0",
|
|
4
4
|
"description": "Theia - Debug Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/console": "1.
|
|
7
|
-
"@theia/core": "1.
|
|
8
|
-
"@theia/editor": "1.
|
|
9
|
-
"@theia/filesystem": "1.
|
|
10
|
-
"@theia/markers": "1.
|
|
11
|
-
"@theia/monaco": "1.
|
|
12
|
-
"@theia/output": "1.
|
|
13
|
-
"@theia/preferences": "1.
|
|
14
|
-
"@theia/process": "1.
|
|
15
|
-
"@theia/task": "1.
|
|
16
|
-
"@theia/terminal": "1.
|
|
17
|
-
"@theia/userstorage": "1.
|
|
18
|
-
"@theia/variable-resolver": "1.
|
|
19
|
-
"@theia/workspace": "1.
|
|
6
|
+
"@theia/console": "1.19.0",
|
|
7
|
+
"@theia/core": "1.19.0",
|
|
8
|
+
"@theia/editor": "1.19.0",
|
|
9
|
+
"@theia/filesystem": "1.19.0",
|
|
10
|
+
"@theia/markers": "1.19.0",
|
|
11
|
+
"@theia/monaco": "1.19.0",
|
|
12
|
+
"@theia/output": "1.19.0",
|
|
13
|
+
"@theia/preferences": "1.19.0",
|
|
14
|
+
"@theia/process": "1.19.0",
|
|
15
|
+
"@theia/task": "1.19.0",
|
|
16
|
+
"@theia/terminal": "1.19.0",
|
|
17
|
+
"@theia/userstorage": "1.19.0",
|
|
18
|
+
"@theia/variable-resolver": "1.19.0",
|
|
19
|
+
"@theia/workspace": "1.19.0",
|
|
20
20
|
"jsonc-parser": "^2.2.0",
|
|
21
21
|
"mkdirp": "^0.5.0",
|
|
22
22
|
"p-debounce": "^2.1.0",
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
"watch": "theiaext watch"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@theia/ext-scripts": "1.
|
|
67
|
+
"@theia/ext-scripts": "1.19.0"
|
|
68
68
|
},
|
|
69
69
|
"nyc": {
|
|
70
70
|
"extends": "../../configs/nyc.json"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "cebb5417bb40e320178e3a4e66070af514f0525f"
|
|
73
73
|
}
|
|
@@ -18,6 +18,7 @@ import { ConsoleSessionManager } from '@theia/console/lib/browser/console-sessio
|
|
|
18
18
|
import { ConsoleOptions, ConsoleWidget } from '@theia/console/lib/browser/console-widget';
|
|
19
19
|
import { AbstractViewContribution, bindViewContribution, codicon, Widget, WidgetFactory } from '@theia/core/lib/browser';
|
|
20
20
|
import { ContextKey, ContextKeyService } from '@theia/core/lib/browser/context-key-service';
|
|
21
|
+
import { nls } from '@theia/core/lib/common/nls';
|
|
21
22
|
import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
|
22
23
|
import { Command, CommandRegistry } from '@theia/core/lib/common/command';
|
|
23
24
|
import { Severity } from '@theia/core/lib/common/severity';
|
|
@@ -32,13 +33,16 @@ export type InDebugReplContextKey = ContextKey<boolean>;
|
|
|
32
33
|
export const InDebugReplContextKey = Symbol('inDebugReplContextKey');
|
|
33
34
|
|
|
34
35
|
export namespace DebugConsoleCommands {
|
|
35
|
-
|
|
36
|
-
export const
|
|
36
|
+
|
|
37
|
+
export const DEBUG_CATEGORY_KEY = 'vscode/debugCommands/debug';
|
|
38
|
+
export const DEBUG_CATEGORY = 'Debug';
|
|
39
|
+
|
|
40
|
+
export const CLEAR = Command.toLocalizedCommand({
|
|
37
41
|
id: 'debug.console.clear',
|
|
38
|
-
category:
|
|
42
|
+
category: DEBUG_CATEGORY,
|
|
39
43
|
label: 'Clear Console',
|
|
40
44
|
iconClass: codicon('clear-all')
|
|
41
|
-
};
|
|
45
|
+
}, 'vscode/repl/clearRepl', DEBUG_CATEGORY_KEY);
|
|
42
46
|
}
|
|
43
47
|
|
|
44
48
|
@injectable()
|
|
@@ -124,7 +128,7 @@ export class DebugConsoleContribution extends AbstractViewContribution<ConsoleWi
|
|
|
124
128
|
toolbarRegistry.registerItem({
|
|
125
129
|
id: DebugConsoleCommands.CLEAR.id,
|
|
126
130
|
command: DebugConsoleCommands.CLEAR.id,
|
|
127
|
-
tooltip:
|
|
131
|
+
tooltip: DebugConsoleCommands.CLEAR.label,
|
|
128
132
|
priority: 0,
|
|
129
133
|
});
|
|
130
134
|
}
|
|
@@ -132,7 +136,7 @@ export class DebugConsoleContribution extends AbstractViewContribution<ConsoleWi
|
|
|
132
136
|
static options: ConsoleOptions = {
|
|
133
137
|
id: 'debug-console',
|
|
134
138
|
title: {
|
|
135
|
-
label: 'Debug Console',
|
|
139
|
+
label: nls.localize('vscode/repl/debugConsole', 'Debug Console'),
|
|
136
140
|
iconClass: codicon('debug-console')
|
|
137
141
|
},
|
|
138
142
|
input: {
|
|
@@ -82,15 +82,17 @@ export class DebugConfigurationManager {
|
|
|
82
82
|
protected debugConfigurationTypeKey: ContextKey<string>;
|
|
83
83
|
|
|
84
84
|
protected initialized: Promise<void>;
|
|
85
|
+
|
|
85
86
|
@postConstruct()
|
|
86
87
|
protected async init(): Promise<void> {
|
|
87
88
|
this.debugConfigurationTypeKey = this.contextKeyService.createKey<string>('debugConfigurationType', undefined);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
89
|
+
this.initialized = this.preferences.ready.then(() => {
|
|
90
|
+
this.preferences.onPreferenceChanged(e => {
|
|
91
|
+
if (e.preferenceName === 'launch') {
|
|
92
|
+
this.updateModels();
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
return this.updateModels();
|
|
94
96
|
});
|
|
95
97
|
}
|
|
96
98
|
|
|
@@ -194,6 +196,7 @@ export class DebugConfigurationManager {
|
|
|
194
196
|
await this.doOpen(model);
|
|
195
197
|
}
|
|
196
198
|
}
|
|
199
|
+
|
|
197
200
|
async addConfiguration(): Promise<void> {
|
|
198
201
|
const { model } = this;
|
|
199
202
|
if (!model) {
|
|
@@ -285,7 +288,7 @@ export class DebugConfigurationManager {
|
|
|
285
288
|
*/
|
|
286
289
|
protected async ensureContent(uri: URI, model: DebugConfigurationModel): Promise<void> {
|
|
287
290
|
const textModel = await this.textModelService.createModelReference(uri);
|
|
288
|
-
const currentContent = textModel.object.getText();
|
|
291
|
+
const currentContent = textModel.object.valid ? textModel.object.getText() : '';
|
|
289
292
|
try { // Look for the minimal well-formed launch.json content: {configurations: []}
|
|
290
293
|
const parsedContent = parse(currentContent);
|
|
291
294
|
if (Array.isArray(parsedContent.configurations)) {
|
|
@@ -294,7 +297,6 @@ export class DebugConfigurationManager {
|
|
|
294
297
|
} catch {
|
|
295
298
|
// Just keep going
|
|
296
299
|
}
|
|
297
|
-
|
|
298
300
|
const debugType = await this.selectDebugType();
|
|
299
301
|
const configurations = debugType ? await this.provideDebugConfigurations(debugType, model.workspaceFolderUri) : [];
|
|
300
302
|
const content = this.getInitialConfigurationContent(configurations);
|