@theia/debug 1.73.0-next.9 → 1.73.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-items.d.ts +2 -2
- package/lib/browser/console/debug-console-items.d.ts.map +1 -1
- package/lib/browser/console/debug-console-items.js +2 -2
- package/lib/browser/console/debug-console-items.js.map +1 -1
- package/lib/browser/console/debug-console-session.d.ts +2 -0
- package/lib/browser/console/debug-console-session.d.ts.map +1 -1
- package/lib/browser/console/debug-console-session.js +7 -1
- package/lib/browser/console/debug-console-session.js.map +1 -1
- package/lib/browser/debug-frontend-application-contribution.d.ts +2 -0
- package/lib/browser/debug-frontend-application-contribution.d.ts.map +1 -1
- package/lib/browser/debug-frontend-application-contribution.js +7 -1
- package/lib/browser/debug-frontend-application-contribution.js.map +1 -1
- package/lib/browser/debug-frontend-module.js +1 -1
- package/lib/browser/debug-frontend-module.js.map +1 -1
- package/lib/browser/debug-session-contribution.d.ts +6 -28
- package/lib/browser/debug-session-contribution.d.ts.map +1 -1
- package/lib/browser/debug-session-contribution.js +19 -72
- package/lib/browser/debug-session-contribution.js.map +1 -1
- package/lib/browser/debug-session-manager.d.ts +2 -1
- package/lib/browser/debug-session-manager.d.ts.map +1 -1
- package/lib/browser/debug-session-manager.js +8 -3
- package/lib/browser/debug-session-manager.js.map +1 -1
- package/lib/browser/debug-session.d.ts +17 -9
- package/lib/browser/debug-session.d.ts.map +1 -1
- package/lib/browser/debug-session.js +123 -40
- package/lib/browser/debug-session.js.map +1 -1
- package/lib/browser/view/debug-action.d.ts +1 -1
- package/lib/browser/view/debug-action.d.ts.map +1 -1
- package/lib/browser/view/debug-action.js +1 -1
- package/lib/browser/view/debug-action.js.map +1 -1
- package/lib/browser/view/debug-toolbar-widget.d.ts +2 -1
- package/lib/browser/view/debug-toolbar-widget.d.ts.map +1 -1
- package/lib/browser/view/debug-toolbar-widget.js +6 -1
- package/lib/browser/view/debug-toolbar-widget.js.map +1 -1
- package/lib/browser/view/debug-watch-expression.d.ts +1 -1
- package/lib/browser/view/debug-watch-expression.d.ts.map +1 -1
- package/lib/browser/view/debug-watch-expression.js +1 -1
- package/lib/browser/view/debug-watch-expression.js.map +1 -1
- package/lib/common/debug-adapter-contribution-registry.d.ts +2 -1
- package/lib/common/debug-adapter-contribution-registry.d.ts.map +1 -1
- package/lib/common/debug-adapter-contribution-registry.js +10 -5
- package/lib/common/debug-adapter-contribution-registry.js.map +1 -1
- package/lib/node/debug-service-impl.d.ts +2 -1
- package/lib/node/debug-service-impl.d.ts.map +1 -1
- package/lib/node/debug-service-impl.js +6 -1
- package/lib/node/debug-service-impl.js.map +1 -1
- package/package.json +16 -16
- package/src/browser/console/debug-console-items.tsx +2 -2
- package/src/browser/console/debug-console-session.ts +6 -3
- package/src/browser/debug-frontend-application-contribution.ts +6 -2
- package/src/browser/debug-frontend-module.ts +1 -1
- package/src/browser/debug-session-contribution.ts +20 -61
- package/src/browser/debug-session-manager.ts +8 -5
- package/src/browser/debug-session.tsx +91 -32
- package/src/browser/view/debug-action.tsx +1 -1
- package/src/browser/view/debug-toolbar-widget.tsx +5 -3
- package/src/browser/view/debug-watch-expression.tsx +1 -1
- package/src/common/debug-adapter-contribution-registry.ts +9 -6
- package/src/node/debug-service-impl.ts +6 -3
|
@@ -4,13 +4,14 @@ import { IJSONSchema, IJSONSchemaSnippet } from '@theia/core/lib/common/json-sch
|
|
|
4
4
|
import { CommandIdVariables } from '@theia/variable-resolver/lib/common/variable-types';
|
|
5
5
|
import { DebugAdapterSessionManager } from './debug-adapter-session-manager';
|
|
6
6
|
import { DebugAdapterContributionRegistry } from '../common/debug-adapter-contribution-registry';
|
|
7
|
-
import { Event } from '@theia/core';
|
|
7
|
+
import { Event, ILogger } from '@theia/core';
|
|
8
8
|
/**
|
|
9
9
|
* DebugService implementation.
|
|
10
10
|
*/
|
|
11
11
|
export declare class DebugServiceImpl implements DebugService {
|
|
12
12
|
protected readonly sessionManager: DebugAdapterSessionManager;
|
|
13
13
|
protected readonly registry: DebugAdapterContributionRegistry;
|
|
14
|
+
protected readonly logger: ILogger;
|
|
14
15
|
get onDidChangeDebugConfigurationProviders(): Event<void>;
|
|
15
16
|
dispose(): void;
|
|
16
17
|
debugTypes(): Promise<string[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-service-impl.d.ts","sourceRoot":"","sources":["../../src/node/debug-service-impl.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAC/G,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,gCAAgC,EAAE,MAAM,+CAA+C,CAAC;AACjG,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"debug-service-impl.d.ts","sourceRoot":"","sources":["../../src/node/debug-service-impl.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAC/G,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,EAAE,gCAAgC,EAAE,MAAM,+CAA+C,CAAC;AACjG,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE7C;;GAEG;AACH,qBAC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,iDAAiD,CAAC,MAAM,EAAE,kBAAkB,EAAE,kBAAkB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAI7I,SAAS,CAAC,QAAQ,CAAC,QAAQ,cAAqB;IAC1C,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAM7F,qBAAqB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;cAmB9C,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ3D"}
|
|
@@ -98,7 +98,7 @@ let DebugServiceImpl = class DebugServiceImpl {
|
|
|
98
98
|
await this.doStop(session);
|
|
99
99
|
}
|
|
100
100
|
catch (e) {
|
|
101
|
-
|
|
101
|
+
this.logger.error('terminateDebugSession failed:', e);
|
|
102
102
|
}
|
|
103
103
|
})());
|
|
104
104
|
}
|
|
@@ -123,6 +123,11 @@ tslib_1.__decorate([
|
|
|
123
123
|
(0, inversify_1.inject)(debug_adapter_contribution_registry_1.DebugAdapterContributionRegistry),
|
|
124
124
|
tslib_1.__metadata("design:type", debug_adapter_contribution_registry_1.DebugAdapterContributionRegistry)
|
|
125
125
|
], DebugServiceImpl.prototype, "registry", void 0);
|
|
126
|
+
tslib_1.__decorate([
|
|
127
|
+
(0, inversify_1.inject)(core_1.ILogger),
|
|
128
|
+
(0, inversify_1.named)('debug:DebugServiceImpl'),
|
|
129
|
+
tslib_1.__metadata("design:type", Object)
|
|
130
|
+
], DebugServiceImpl.prototype, "logger", void 0);
|
|
126
131
|
exports.DebugServiceImpl = DebugServiceImpl = tslib_1.__decorate([
|
|
127
132
|
(0, inversify_1.injectable)()
|
|
128
133
|
], DebugServiceImpl);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-service-impl.js","sourceRoot":"","sources":["../../src/node/debug-service-impl.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,
|
|
1
|
+
{"version":3,"file":"debug-service-impl.js","sourceRoot":"","sources":["../../src/node/debug-service-impl.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,4DAAyE;AAKzE,mFAA6E;AAC7E,uGAAiG;AACjG,sCAA6C;AAE7C;;GAEG;AAEI,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAAtB;QAsEgB,aAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IAkCpD,CAAC;IA7FG,IAAI,sCAAsC;QACtC,OAAO,YAAK,CAAC,IAAI,CAAC;IACtB,CAAC;IAED,OAAO;QACH,IAAI,CAAC,qBAAqB,EAAE,CAAC;IACjC,CAAC;IAED,KAAK,CAAC,UAAU;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;IACtC,CAAC;IAED,uBAAuB,CAAC,QAAgB;QACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IAC3D,CAAC;IAED,mBAAmB,CAAC,SAAiB;QACjC,OAAO,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACxD,CAAC;IAED,wBAAwB;QACpB,OAAO,IAAI,CAAC,QAAQ,CAAC,wBAAwB,EAAE,CAAC;IACpD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,sEAAgC,CAAC;sCACZ,sEAAgC;kDAAC;AAG3C;IADlB,IAAA,kBAAM,EAAC,cAAO,CAAC;IAAE,IAAA,iBAAK,EAAC,wBAAwB,CAAC;;gDACd;2BAT1B,gBAAgB;IAD5B,IAAA,sBAAU,GAAE;GACA,gBAAgB,CAwG5B"}
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/debug",
|
|
3
|
-
"version": "1.73.0
|
|
3
|
+
"version": "1.73.0",
|
|
4
4
|
"description": "Theia - Debug Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/console": "1.73.0
|
|
7
|
-
"@theia/core": "1.73.0
|
|
8
|
-
"@theia/editor": "1.73.0
|
|
9
|
-
"@theia/filesystem": "1.73.0
|
|
10
|
-
"@theia/markers": "1.73.0
|
|
11
|
-
"@theia/monaco": "1.73.0
|
|
6
|
+
"@theia/console": "1.73.0",
|
|
7
|
+
"@theia/core": "1.73.0",
|
|
8
|
+
"@theia/editor": "1.73.0",
|
|
9
|
+
"@theia/filesystem": "1.73.0",
|
|
10
|
+
"@theia/markers": "1.73.0",
|
|
11
|
+
"@theia/monaco": "1.73.0",
|
|
12
12
|
"@theia/monaco-editor-core": "1.108.201",
|
|
13
|
-
"@theia/output": "1.73.0
|
|
14
|
-
"@theia/process": "1.73.0
|
|
15
|
-
"@theia/task": "1.73.0
|
|
16
|
-
"@theia/terminal": "1.73.0
|
|
17
|
-
"@theia/test": "1.73.0
|
|
18
|
-
"@theia/variable-resolver": "1.73.0
|
|
19
|
-
"@theia/workspace": "1.73.0
|
|
13
|
+
"@theia/output": "1.73.0",
|
|
14
|
+
"@theia/process": "1.73.0",
|
|
15
|
+
"@theia/task": "1.73.0",
|
|
16
|
+
"@theia/terminal": "1.73.0",
|
|
17
|
+
"@theia/test": "1.73.0",
|
|
18
|
+
"@theia/variable-resolver": "1.73.0",
|
|
19
|
+
"@theia/workspace": "1.73.0",
|
|
20
20
|
"@vscode/debugprotocol": "^1.68.0",
|
|
21
21
|
"fast-deep-equal": "^3.1.3",
|
|
22
22
|
"jsonc-parser": "^3.3.1",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"watch": "theiaext watch"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
|
-
"@theia/ext-scripts": "1.
|
|
62
|
+
"@theia/ext-scripts": "1.73.0"
|
|
63
63
|
},
|
|
64
64
|
"nyc": {
|
|
65
65
|
"extends": "../../configs/nyc.json"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "25e1b7fdf4c39ecea7066e1c8be3af1cc02e4d2e"
|
|
68
68
|
}
|
|
@@ -281,7 +281,7 @@ export class DebugVariable extends ExpressionContainer {
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
protected valueRef: HTMLSpanElement | undefined;
|
|
284
|
-
protected setValueRef = (valueRef: HTMLSpanElement | null) => this.valueRef = valueRef || undefined;
|
|
284
|
+
protected setValueRef = (valueRef: HTMLSpanElement | null): void => { this.valueRef = valueRef || undefined; };
|
|
285
285
|
|
|
286
286
|
get supportCopyAsExpression(): boolean {
|
|
287
287
|
return !!this.nameRef && document.queryCommandSupported('copy');
|
|
@@ -294,7 +294,7 @@ export class DebugVariable extends ExpressionContainer {
|
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
protected nameRef: HTMLSpanElement | undefined;
|
|
297
|
-
protected setNameRef = (nameRef: HTMLSpanElement | null) => this.nameRef = nameRef || undefined;
|
|
297
|
+
protected setNameRef = (nameRef: HTMLSpanElement | null): void => { this.nameRef = nameRef || undefined; };
|
|
298
298
|
|
|
299
299
|
async open(): Promise<void> {
|
|
300
300
|
if (!this.supportSetVariable || this.readOnly) {
|
|
@@ -22,11 +22,11 @@ import { DebugSession } from '../debug-session';
|
|
|
22
22
|
import URI from '@theia/core/lib/common/uri';
|
|
23
23
|
import { ExpressionContainer, ExpressionItem } from './debug-console-items';
|
|
24
24
|
import { Severity } from '@theia/core/lib/common/severity';
|
|
25
|
-
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
25
|
+
import { inject, injectable, postConstruct, named } from '@theia/core/shared/inversify';
|
|
26
26
|
import { DebugSessionManager } from '../debug-session-manager';
|
|
27
27
|
import * as monaco from '@theia/monaco-editor-core';
|
|
28
28
|
import { LanguageSelector } from '@theia/monaco-editor-core/esm/vs/editor/common/languageSelector';
|
|
29
|
-
import { Disposable } from '@theia/core';
|
|
29
|
+
import { Disposable, ILogger } from '@theia/core';
|
|
30
30
|
|
|
31
31
|
export const DebugConsoleSessionFactory = Symbol('DebugConsoleSessionFactory');
|
|
32
32
|
|
|
@@ -39,6 +39,9 @@ export class DebugConsoleSession extends ConsoleSession {
|
|
|
39
39
|
|
|
40
40
|
@inject(DebugSessionManager) protected readonly sessionManager: DebugSessionManager;
|
|
41
41
|
|
|
42
|
+
@inject(ILogger) @named('debug:DebugConsoleSession')
|
|
43
|
+
protected readonly logger: ILogger;
|
|
44
|
+
|
|
42
45
|
protected items: ConsoleItem[] = [];
|
|
43
46
|
|
|
44
47
|
protected _terminated = false;
|
|
@@ -248,7 +251,7 @@ export class DebugConsoleSession extends ConsoleSession {
|
|
|
248
251
|
const body = event.body;
|
|
249
252
|
const { category, variablesReference } = body;
|
|
250
253
|
if (category === 'telemetry') {
|
|
251
|
-
|
|
254
|
+
this.logger.debug(`telemetry/${event.body.output}`, event.body.data);
|
|
252
255
|
return;
|
|
253
256
|
}
|
|
254
257
|
const severity = category === 'stderr' ? Severity.Error : event.body.category === 'console' ? Severity.Warning : Severity.Info;
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
AbstractViewContribution, KeybindingRegistry, Widget, CompositeTreeNode, LabelProvider, codicon, OnWillStopAction, FrontendApplicationContribution, ConfirmDialog, Dialog
|
|
19
19
|
} from '@theia/core/lib/browser';
|
|
20
20
|
import { TreeElementNode } from '@theia/core/lib/browser/source-tree';
|
|
21
|
-
import { injectable, inject } from '@theia/core/shared/inversify';
|
|
21
|
+
import { injectable, inject, named } from '@theia/core/shared/inversify';
|
|
22
22
|
import * as monaco from '@theia/monaco-editor-core';
|
|
23
23
|
import { MenuModelRegistry, CommandRegistry, Command, URI, Event, MessageService, CancellationError } from '@theia/core/lib/common';
|
|
24
24
|
import { waitForEvent } from '@theia/core/lib/common/promise-util';
|
|
@@ -68,6 +68,7 @@ import {
|
|
|
68
68
|
DebugMenus, DebugCommands, DebugThreadContextCommands, DebugSessionContextCommands,
|
|
69
69
|
DebugEditorContextCommands, DebugBreakpointWidgetCommands, nlsEnableBreakpoint, nlsDisableBreakpoint
|
|
70
70
|
} from './debug-commands';
|
|
71
|
+
import { ILogger } from '@theia/core';
|
|
71
72
|
|
|
72
73
|
@injectable()
|
|
73
74
|
export class DebugFrontendApplicationContribution extends AbstractViewContribution<DebugWidget>
|
|
@@ -115,6 +116,9 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
115
116
|
@inject(AddOrEditDataBreakpointAddress)
|
|
116
117
|
protected readonly AddOrEditDataBreakpointAddress: AddOrEditDataBreakpointAddress;
|
|
117
118
|
|
|
119
|
+
@inject(ILogger) @named('debug:DebugFrontendApplicationContribution')
|
|
120
|
+
protected readonly logger: ILogger;
|
|
121
|
+
|
|
118
122
|
constructor() {
|
|
119
123
|
super({
|
|
120
124
|
widgetId: DebugWidget.ID,
|
|
@@ -1046,7 +1050,7 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
1046
1050
|
if (thread.stopped && thread === this.manager.currentThread) {
|
|
1047
1051
|
return true;
|
|
1048
1052
|
}
|
|
1049
|
-
|
|
1053
|
+
this.logger.warn('Cannot run to the specified location. The current thread has changed or is not stopped.');
|
|
1050
1054
|
return false;
|
|
1051
1055
|
};
|
|
1052
1056
|
if (!checkThread()) {
|
|
@@ -77,7 +77,7 @@ export default new ContainerModule((bind: interfaces.Bind) => {
|
|
|
77
77
|
).inSingletonScope();
|
|
78
78
|
|
|
79
79
|
bindRootContributionProvider(bind, DebugSessionContribution);
|
|
80
|
-
bind(DebugSessionFactory).
|
|
80
|
+
bind(DebugSessionFactory).toDynamicValue(ctx => new DefaultDebugSessionFactory(ctx.container)).inSingletonScope();
|
|
81
81
|
bind(DebugSessionManager).toSelf().inSingletonScope();
|
|
82
82
|
|
|
83
83
|
bind(BreakpointManager).toSelf().inSingletonScope();
|
|
@@ -14,25 +14,15 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { injectable, inject, named, postConstruct } from '@theia/core/shared/inversify';
|
|
18
|
-
import {
|
|
19
|
-
import { LabelProvider } from '@theia/core/lib/browser';
|
|
20
|
-
import { EditorManager } from '@theia/editor/lib/browser';
|
|
21
|
-
import { TerminalService } from '@theia/terminal/lib/browser/base/terminal-service';
|
|
22
|
-
import { DebugSession } from './debug-session';
|
|
23
|
-
import { BreakpointManager } from './breakpoint/breakpoint-manager';
|
|
17
|
+
import { injectable, inject, named, postConstruct, interfaces } from '@theia/core/shared/inversify';
|
|
18
|
+
import { DebugSession, DebugSessionData } from './debug-session';
|
|
24
19
|
import { DebugConfigurationSessionOptions, DebugSessionOptions } from './debug-session-options';
|
|
25
20
|
import { OutputChannelManager, OutputChannel } from '@theia/output/lib/browser/output-channel';
|
|
26
21
|
import { DebugPreferences } from '../common/debug-preferences';
|
|
27
22
|
import { DebugSessionConnection } from './debug-session-connection';
|
|
28
23
|
import { DebugChannel, DebugAdapterPath, ForwardingDebugChannel } from '../common/debug-service';
|
|
29
24
|
import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
|
|
30
|
-
import { FileService } from '@theia/filesystem/lib/browser/file-service';
|
|
31
|
-
import { DebugContribution } from './debug-contribution';
|
|
32
|
-
import { WorkspaceService } from '@theia/workspace/lib/browser';
|
|
33
25
|
import { RemoteConnectionProvider, ServiceConnectionProvider } from '@theia/core/lib/browser/messaging/service-connection-provider';
|
|
34
|
-
import { TestService } from '@theia/test/lib/browser/test-service';
|
|
35
|
-
import { DebugSessionManager } from './debug-session-manager';
|
|
36
26
|
|
|
37
27
|
/**
|
|
38
28
|
* DebugSessionContribution symbol for DI.
|
|
@@ -92,71 +82,40 @@ export const DebugSessionFactory = Symbol('DebugSessionFactory');
|
|
|
92
82
|
* The [debug session](#DebugSession) factory.
|
|
93
83
|
*/
|
|
94
84
|
export interface DebugSessionFactory {
|
|
95
|
-
|
|
85
|
+
createSession(sessionId: string, options: DebugSessionOptions, parentSession?: DebugSession): DebugSession;
|
|
96
86
|
}
|
|
97
87
|
|
|
98
|
-
@injectable()
|
|
99
88
|
export class DefaultDebugSessionFactory implements DebugSessionFactory {
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
protected readonly editorManager: EditorManager;
|
|
106
|
-
@inject(BreakpointManager)
|
|
107
|
-
protected readonly breakpoints: BreakpointManager;
|
|
108
|
-
@inject(LabelProvider)
|
|
109
|
-
protected readonly labelProvider: LabelProvider;
|
|
110
|
-
@inject(MessageClient)
|
|
111
|
-
protected readonly messages: MessageClient;
|
|
112
|
-
@inject(OutputChannelManager)
|
|
113
|
-
protected readonly outputChannelManager: OutputChannelManager;
|
|
114
|
-
@inject(DebugPreferences)
|
|
115
|
-
protected readonly debugPreferences: DebugPreferences;
|
|
116
|
-
@inject(FileService)
|
|
117
|
-
protected readonly fileService: FileService;
|
|
118
|
-
@inject(ContributionProvider) @named(DebugContribution)
|
|
119
|
-
protected readonly debugContributionProvider: ContributionProvider<DebugContribution>;
|
|
120
|
-
@inject(TestService)
|
|
121
|
-
protected readonly testService: TestService;
|
|
122
|
-
@inject(WorkspaceService)
|
|
123
|
-
protected readonly workspaceService: WorkspaceService;
|
|
124
|
-
@inject(CommandService)
|
|
125
|
-
protected commandService: CommandService;
|
|
89
|
+
protected readonly container: interfaces.Container;
|
|
90
|
+
|
|
91
|
+
constructor(container: interfaces.Container) {
|
|
92
|
+
this.container = container;
|
|
93
|
+
}
|
|
126
94
|
|
|
127
|
-
|
|
95
|
+
createSession(sessionId: string, options: DebugConfigurationSessionOptions, parentSession?: DebugSession): DebugSession {
|
|
96
|
+
const connectionProvider: ServiceConnectionProvider = this.container.get(RemoteConnectionProvider);
|
|
128
97
|
const connection = new DebugSessionConnection(
|
|
129
98
|
sessionId,
|
|
130
99
|
() => new Promise<DebugChannel>(resolve =>
|
|
131
|
-
|
|
100
|
+
connectionProvider.listen(`${DebugAdapterPath}/${sessionId}`, (_, wsChannel) => {
|
|
132
101
|
resolve(new ForwardingDebugChannel(wsChannel));
|
|
133
102
|
}, false)
|
|
134
103
|
),
|
|
135
104
|
this.getTraceOutputChannel());
|
|
136
|
-
|
|
137
|
-
sessionId,
|
|
105
|
+
const data: DebugSessionData = {
|
|
106
|
+
id: sessionId,
|
|
138
107
|
options,
|
|
139
108
|
parentSession,
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
connection,
|
|
144
|
-
this.terminalService,
|
|
145
|
-
this.editorManager,
|
|
146
|
-
this.breakpoints,
|
|
147
|
-
this.labelProvider,
|
|
148
|
-
this.messages,
|
|
149
|
-
this.fileService,
|
|
150
|
-
this.debugContributionProvider,
|
|
151
|
-
this.workspaceService,
|
|
152
|
-
this.debugPreferences,
|
|
153
|
-
this.commandService
|
|
154
|
-
);
|
|
109
|
+
};
|
|
110
|
+
const child = DebugSession.createContainer(this.container, data, connection);
|
|
111
|
+
return child.get(DebugSession);
|
|
155
112
|
}
|
|
156
113
|
|
|
157
114
|
protected getTraceOutputChannel(): OutputChannel | undefined {
|
|
158
|
-
|
|
159
|
-
|
|
115
|
+
const outputChannelManager: OutputChannelManager = this.container.get(OutputChannelManager);
|
|
116
|
+
const debugPreferences: DebugPreferences = this.container.get(DebugPreferences);
|
|
117
|
+
if (debugPreferences['debug.trace']) {
|
|
118
|
+
return outputChannelManager.getChannel('Debug adapters');
|
|
160
119
|
}
|
|
161
120
|
}
|
|
162
121
|
}
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
|
-
import { DisposableCollection, Emitter, Event, MessageService, nls, ProgressService, WaitUntilEvent } from '@theia/core';
|
|
17
|
+
import { DisposableCollection, Emitter, Event, MessageService, nls, ProgressService, WaitUntilEvent, ILogger } from '@theia/core';
|
|
18
18
|
import { ApplicationShell, ConfirmDialog } from '@theia/core/lib/browser';
|
|
19
19
|
import { ContextKey, ContextKeyService } from '@theia/core/lib/browser/context-key-service';
|
|
20
20
|
import { WindowService } from '@theia/core/lib/browser/window/window-service';
|
|
21
21
|
import URI from '@theia/core/lib/common/uri';
|
|
22
|
-
import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
|
|
22
|
+
import { inject, injectable, postConstruct, named } from '@theia/core/shared/inversify';
|
|
23
23
|
import * as monaco from '@theia/monaco-editor-core';
|
|
24
24
|
import { QuickOpenTask } from '@theia/task/lib/browser/quick-open-task';
|
|
25
25
|
import { TaskEndedInfo, TaskEndedTypes, TaskService } from '@theia/task/lib/browser/task-service';
|
|
@@ -152,6 +152,9 @@ export class DebugSessionManager {
|
|
|
152
152
|
@inject(DebugSessionConfigurationLabelProvider)
|
|
153
153
|
protected readonly sessionConfigurationLabelProvider: DebugSessionConfigurationLabelProvider;
|
|
154
154
|
|
|
155
|
+
@inject(ILogger) @named('debug:DebugSessionManager')
|
|
156
|
+
protected readonly logger: ILogger;
|
|
157
|
+
|
|
155
158
|
@inject(WorkspaceTrustService)
|
|
156
159
|
protected readonly workspaceTrustService: WorkspaceTrustService;
|
|
157
160
|
|
|
@@ -188,7 +191,7 @@ export class DebugSessionManager {
|
|
|
188
191
|
await this.shell.saveAll();
|
|
189
192
|
return true;
|
|
190
193
|
} catch (error) {
|
|
191
|
-
|
|
194
|
+
this.logger.error('saveAll failed:', error);
|
|
192
195
|
return false;
|
|
193
196
|
}
|
|
194
197
|
}
|
|
@@ -265,7 +268,7 @@ export class DebugSessionManager {
|
|
|
265
268
|
}
|
|
266
269
|
|
|
267
270
|
this.messageService.error(nls.localize('theia/debug/errorStartingDebugSession', 'There was an error starting the debug session, check the logs for more details.'));
|
|
268
|
-
|
|
271
|
+
this.logger.error('Error starting the debug session', e);
|
|
269
272
|
throw e;
|
|
270
273
|
}
|
|
271
274
|
});
|
|
@@ -412,7 +415,7 @@ export class DebugSessionManager {
|
|
|
412
415
|
const parentSession = options.configuration.parentSessionId ? this._sessions.get(options.configuration.parentSessionId) : undefined;
|
|
413
416
|
const contrib = this.sessionContributionRegistry.get(options.configuration.type);
|
|
414
417
|
const sessionFactory = contrib ? contrib.debugSessionFactory() : this.debugSessionFactory;
|
|
415
|
-
const session = sessionFactory.
|
|
418
|
+
const session = sessionFactory.createSession(sessionId, options, parentSession);
|
|
416
419
|
this._sessions.set(sessionId, session);
|
|
417
420
|
|
|
418
421
|
this.debugTypeKey.set(session.configuration.type);
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
CommandService,
|
|
32
32
|
CancellationError
|
|
33
33
|
} from '@theia/core/lib/common';
|
|
34
|
+
import { inject, injectable, named, postConstruct, interfaces, LazyServiceIdentifier } from '@theia/core/shared/inversify';
|
|
34
35
|
import { TerminalService } from '@theia/terminal/lib/browser/base/terminal-service';
|
|
35
36
|
import { EditorManager } from '@theia/editor/lib/browser';
|
|
36
37
|
import { CompositeTreeElement } from '@theia/core/lib/browser/source-tree';
|
|
@@ -43,7 +44,7 @@ import { DebugBreakpoint } from './model/debug-breakpoint';
|
|
|
43
44
|
import debounce = require('p-debounce');
|
|
44
45
|
import URI from '@theia/core/lib/common/uri';
|
|
45
46
|
import { BreakpointManager } from './breakpoint/breakpoint-manager';
|
|
46
|
-
import { DebugConfigurationSessionOptions, InternalDebugSessionOptions
|
|
47
|
+
import { DebugConfigurationSessionOptions, InternalDebugSessionOptions } from './debug-session-options';
|
|
47
48
|
import { DebugConfiguration, DebugConsoleMode } from '../common/debug-common';
|
|
48
49
|
import { SourceBreakpoint } from './breakpoint/breakpoint-marker';
|
|
49
50
|
import { TerminalWidgetOptions, TerminalWidget } from '@theia/terminal/lib/browser/base/terminal-widget';
|
|
@@ -57,6 +58,14 @@ import { DebugSessionManager } from './debug-session-manager';
|
|
|
57
58
|
|
|
58
59
|
import { DebugPreferences } from '../common/debug-preferences';
|
|
59
60
|
|
|
61
|
+
export const DebugSessionData = Symbol('DebugSessionData');
|
|
62
|
+
export const DebugSessionStopTimeout = Symbol('DebugSessionStopTimeout');
|
|
63
|
+
export interface DebugSessionData {
|
|
64
|
+
id: string;
|
|
65
|
+
options: DebugConfigurationSessionOptions;
|
|
66
|
+
parentSession: DebugSession | undefined;
|
|
67
|
+
}
|
|
68
|
+
|
|
60
69
|
export enum DebugState {
|
|
61
70
|
Inactive,
|
|
62
71
|
Initializing,
|
|
@@ -87,8 +96,79 @@ export function formatMessage(format: string, variables?: { [key: string]: strin
|
|
|
87
96
|
return variables ? format.replace(formatMessageRegexp, (match, group) => variables.hasOwnProperty(group) ? variables[group] : match) : format;
|
|
88
97
|
}
|
|
89
98
|
|
|
90
|
-
|
|
99
|
+
@injectable()
|
|
91
100
|
export class DebugSession implements CompositeTreeElement {
|
|
101
|
+
|
|
102
|
+
static createContainer(parent: interfaces.Container, data: DebugSessionData, connection: DebugSessionConnection): interfaces.Container {
|
|
103
|
+
const child = parent.createChild();
|
|
104
|
+
child.bind(DebugSessionData).toConstantValue(data);
|
|
105
|
+
child.bind(DebugSessionStopTimeout).toConstantValue(5_000);
|
|
106
|
+
child.bind(DebugSessionConnection).toConstantValue(connection);
|
|
107
|
+
child.bind(DebugSession).toSelf().inSingletonScope();
|
|
108
|
+
return child;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
@inject(DebugSessionData)
|
|
112
|
+
protected readonly data: DebugSessionData;
|
|
113
|
+
|
|
114
|
+
@inject(DebugSessionConnection)
|
|
115
|
+
protected readonly connection: DebugSessionConnection;
|
|
116
|
+
|
|
117
|
+
@inject(TestService)
|
|
118
|
+
protected readonly testService: TestService;
|
|
119
|
+
|
|
120
|
+
@inject(new LazyServiceIdentifier(() => DebugSessionManager))
|
|
121
|
+
protected readonly sessionManager: DebugSessionManager;
|
|
122
|
+
|
|
123
|
+
@inject(TerminalService)
|
|
124
|
+
protected readonly terminalServer: TerminalService;
|
|
125
|
+
|
|
126
|
+
@inject(EditorManager)
|
|
127
|
+
protected readonly editorManager: EditorManager;
|
|
128
|
+
|
|
129
|
+
@inject(BreakpointManager)
|
|
130
|
+
protected readonly breakpoints: BreakpointManager;
|
|
131
|
+
|
|
132
|
+
@inject(LabelProvider)
|
|
133
|
+
protected readonly labelProvider: LabelProvider;
|
|
134
|
+
|
|
135
|
+
@inject(MessageClient)
|
|
136
|
+
protected readonly messages: MessageClient;
|
|
137
|
+
|
|
138
|
+
@inject(FileService)
|
|
139
|
+
protected readonly fileService: FileService;
|
|
140
|
+
|
|
141
|
+
@inject(ContributionProvider)
|
|
142
|
+
@named(DebugContribution)
|
|
143
|
+
protected readonly debugContributionProvider: ContributionProvider<DebugContribution>;
|
|
144
|
+
|
|
145
|
+
@inject(WorkspaceService)
|
|
146
|
+
protected readonly workspaceService: WorkspaceService;
|
|
147
|
+
|
|
148
|
+
@inject(DebugPreferences)
|
|
149
|
+
protected readonly debugPreferences: DebugPreferences;
|
|
150
|
+
|
|
151
|
+
@inject(CommandService)
|
|
152
|
+
protected readonly commandService: CommandService;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Number of millis after a `stop` request times out. It's 5 seconds by default.
|
|
156
|
+
*/
|
|
157
|
+
@inject(DebugSessionStopTimeout)
|
|
158
|
+
protected readonly stopTimeout: number;
|
|
159
|
+
|
|
160
|
+
get id(): string {
|
|
161
|
+
return this.data.id;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
get options(): DebugConfigurationSessionOptions {
|
|
165
|
+
return this.data.options;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
get parentSession(): DebugSession | undefined {
|
|
169
|
+
return this.data.parentSession;
|
|
170
|
+
}
|
|
171
|
+
|
|
92
172
|
protected readonly deferredOnDidConfigureCapabilities = new Deferred<void>();
|
|
93
173
|
|
|
94
174
|
protected readonly onDidChangeEmitter = new Emitter<void>();
|
|
@@ -117,47 +197,26 @@ export class DebugSession implements CompositeTreeElement {
|
|
|
117
197
|
/** Maximum time to wait for the shell integration prompt before proceeding. */
|
|
118
198
|
protected readonly PROMPT_READY_TIMEOUT_MS = 3000;
|
|
119
199
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
readonly options: DebugConfigurationSessionOptions,
|
|
123
|
-
readonly parentSession: DebugSession | undefined,
|
|
124
|
-
testService: TestService,
|
|
125
|
-
testRun: TestRunReference | undefined,
|
|
126
|
-
sessionManager: DebugSessionManager,
|
|
127
|
-
protected readonly connection: DebugSessionConnection,
|
|
128
|
-
protected readonly terminalServer: TerminalService,
|
|
129
|
-
protected readonly editorManager: EditorManager,
|
|
130
|
-
protected readonly breakpoints: BreakpointManager,
|
|
131
|
-
protected readonly labelProvider: LabelProvider,
|
|
132
|
-
protected readonly messages: MessageClient,
|
|
133
|
-
protected readonly fileService: FileService,
|
|
134
|
-
protected readonly debugContributionProvider: ContributionProvider<DebugContribution>,
|
|
135
|
-
protected readonly workspaceService: WorkspaceService,
|
|
136
|
-
protected readonly debugPreferences: DebugPreferences,
|
|
137
|
-
protected readonly commandService: CommandService,
|
|
138
|
-
/**
|
|
139
|
-
* Number of millis after a `stop` request times out. It's 5 seconds by default.
|
|
140
|
-
*/
|
|
141
|
-
protected readonly stopTimeout = 5_000,
|
|
142
|
-
) {
|
|
200
|
+
@postConstruct()
|
|
201
|
+
protected init(): void {
|
|
143
202
|
this.connection.onRequest('runInTerminal', (request: DebugProtocol.RunInTerminalRequest) => this.runInTerminal(request));
|
|
144
203
|
this.connection.onDidClose(() => {
|
|
145
204
|
this.toDispose.dispose();
|
|
146
205
|
});
|
|
147
|
-
this.registerDebugContributions(options.configuration.type, this.connection);
|
|
206
|
+
this.registerDebugContributions(this.options.configuration.type, this.connection);
|
|
148
207
|
|
|
149
|
-
if (parentSession) {
|
|
150
|
-
parentSession.childSessions.set(id, this);
|
|
208
|
+
if (this.parentSession) {
|
|
209
|
+
this.parentSession.childSessions.set(this.id, this);
|
|
151
210
|
this.toDispose.push(Disposable.create(() => {
|
|
152
|
-
this.parentSession?.childSessions?.delete(id);
|
|
211
|
+
this.parentSession?.childSessions?.delete(this.id);
|
|
153
212
|
}));
|
|
154
213
|
}
|
|
155
|
-
if (testRun) {
|
|
214
|
+
if (this.options.testRun) {
|
|
156
215
|
try {
|
|
157
|
-
const run = TestServices.withTestRun(testService, testRun.controllerId, testRun.runId);
|
|
216
|
+
const run = TestServices.withTestRun(this.testService, this.options.testRun.controllerId, this.options.testRun.runId);
|
|
158
217
|
run.onDidChangeProperty(evt => {
|
|
159
218
|
if (evt.isRunning === false) {
|
|
160
|
-
sessionManager.terminateSession(this);
|
|
219
|
+
this.sessionManager.terminateSession(this);
|
|
161
220
|
}
|
|
162
221
|
});
|
|
163
222
|
} catch (err) {
|
|
@@ -45,7 +45,7 @@ export class DebugAction extends React.Component<DebugAction.Props> {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
protected ref: HTMLElement | undefined;
|
|
48
|
-
protected setRef = (ref: HTMLElement | null) => this.ref = ref || undefined;
|
|
48
|
+
protected setRef = (ref: HTMLElement | null): void => { this.ref = ref || undefined; };
|
|
49
49
|
|
|
50
50
|
}
|
|
51
51
|
export namespace DebugAction {
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
// *****************************************************************************
|
|
16
16
|
|
|
17
17
|
import * as React from '@theia/core/shared/react';
|
|
18
|
-
import { inject, postConstruct, injectable } from '@theia/core/shared/inversify';
|
|
19
|
-
import { CommandMenu, CompoundMenuNode, MenuModelRegistry, MenuPath } from '@theia/core';
|
|
18
|
+
import { inject, postConstruct, injectable, named } from '@theia/core/shared/inversify';
|
|
19
|
+
import { CommandMenu, CompoundMenuNode, MenuModelRegistry, MenuPath, ILogger } from '@theia/core';
|
|
20
20
|
import { KeybindingRegistry } from '@theia/core/lib/browser';
|
|
21
21
|
import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
|
|
22
22
|
import { ReactWidget } from '@theia/core/lib/browser/widgets';
|
|
@@ -33,6 +33,8 @@ export class DebugToolBar extends ReactWidget {
|
|
|
33
33
|
@inject(KeybindingRegistry) protected readonly keybindingRegistry: KeybindingRegistry;
|
|
34
34
|
@inject(ContextKeyService) protected readonly contextKeyService: ContextKeyService;
|
|
35
35
|
@inject(DebugViewModel) protected readonly model: DebugViewModel;
|
|
36
|
+
@inject(ILogger) @named('debug:DebugToolBar')
|
|
37
|
+
protected readonly logger: ILogger;
|
|
36
38
|
|
|
37
39
|
@postConstruct()
|
|
38
40
|
protected init(): void {
|
|
@@ -69,7 +71,7 @@ export class DebugToolBar extends ReactWidget {
|
|
|
69
71
|
|
|
70
72
|
protected debugAction(commandMenuNode: CommandMenu): React.ReactNode {
|
|
71
73
|
const accelerator = this.acceleratorFor(commandMenuNode.id);
|
|
72
|
-
const run = (effectiveMenuPath: MenuPath) => commandMenuNode.run(effectiveMenuPath).catch(e =>
|
|
74
|
+
const run = (effectiveMenuPath: MenuPath) => commandMenuNode.run(effectiveMenuPath).catch(e => this.logger.error(e));
|
|
73
75
|
return <DebugAction
|
|
74
76
|
key={commandMenuNode.id}
|
|
75
77
|
enabled={commandMenuNode.isEnabled(DebugToolBar.MENU)}
|
|
@@ -103,6 +103,6 @@ export class DebugWatchExpression extends ExpressionItem {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
protected valueRef: HTMLSpanElement | undefined;
|
|
106
|
-
protected setValueRef = (valueRef: HTMLSpanElement | null) => this.valueRef = valueRef || undefined;
|
|
106
|
+
protected setValueRef = (valueRef: HTMLSpanElement | null): void => { this.valueRef = valueRef || undefined; };
|
|
107
107
|
|
|
108
108
|
}
|