@opensumi/ide-debug 2.22.10-rc-1679037411.0 → 2.22.11
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.d.ts +0 -2
- package/lib/browser/breakpoint/breakpoint-manager.d.ts.map +1 -1
- package/lib/browser/breakpoint/breakpoint-manager.js +0 -5
- package/lib/browser/breakpoint/breakpoint-manager.js.map +1 -1
- package/lib/browser/contextkeys/debug-contextkey.service.d.ts +1 -1
- package/lib/browser/contextkeys/debug-contextkey.service.d.ts.map +1 -1
- package/lib/browser/contextkeys/debug-contextkey.service.js +1 -1
- package/lib/browser/contextkeys/debug-contextkey.service.js.map +1 -1
- package/lib/browser/debug-session-manager.d.ts.map +1 -1
- package/lib/browser/debug-session-manager.js +5 -1
- package/lib/browser/debug-session-manager.js.map +1 -1
- package/lib/browser/debug-session.js +3 -3
- package/lib/browser/debug-session.js.map +1 -1
- package/lib/browser/editor/debug-editor-contribution.d.ts.map +1 -1
- package/lib/browser/editor/debug-editor-contribution.js +1 -1
- package/lib/browser/editor/debug-editor-contribution.js.map +1 -1
- package/lib/browser/editor/debug-model.d.ts +2 -2
- package/lib/browser/editor/debug-model.d.ts.map +1 -1
- package/lib/browser/editor/debug-model.js +3 -4
- package/lib/browser/editor/debug-model.js.map +1 -1
- package/lib/browser/view/breakpoints/debug-breakpoints.service.d.ts.map +1 -1
- package/lib/browser/view/breakpoints/debug-breakpoints.service.js +4 -5
- package/lib/browser/view/breakpoints/debug-breakpoints.service.js.map +1 -1
- package/lib/browser/view/breakpoints/debug-breakpoints.view.d.ts.map +1 -1
- package/lib/browser/view/breakpoints/debug-breakpoints.view.js.map +1 -1
- package/lib/browser/view/configuration/debug-toolbar.view.d.ts.map +1 -1
- package/lib/browser/view/configuration/debug-toolbar.view.js +25 -27
- package/lib/browser/view/configuration/debug-toolbar.view.js.map +1 -1
- package/lib/browser/view/console/debug-console.service.js +2 -2
- package/lib/browser/view/console/debug-console.service.js.map +1 -1
- package/lib/browser/view/debug-view-model.d.ts.map +1 -1
- package/lib/browser/view/debug-view-model.js.map +1 -1
- package/lib/browser/view/frames/debug-call-stack-session.view.d.ts.map +1 -1
- package/lib/browser/view/frames/debug-call-stack-session.view.js +1 -1
- package/lib/browser/view/frames/debug-call-stack-session.view.js.map +1 -1
- package/lib/browser/view/frames/debug-call-stack-thread.view.d.ts.map +1 -1
- package/lib/browser/view/frames/debug-call-stack-thread.view.js +1 -1
- package/lib/browser/view/frames/debug-call-stack-thread.view.js.map +1 -1
- package/lib/common/debug-service.d.ts +6 -1
- package/lib/common/debug-service.d.ts.map +1 -1
- package/lib/common/debug-service.js +9 -1
- package/lib/common/debug-service.js.map +1 -1
- package/lib/common/inline-values.d.ts +0 -1
- package/lib/common/inline-values.d.ts.map +1 -1
- package/package.json +23 -23
- package/src/browser/breakpoint/breakpoint-manager.ts +0 -6
- package/src/browser/contextkeys/debug-contextkey.service.ts +2 -2
- package/src/browser/debug-session-manager.ts +7 -1
- package/src/browser/debug-session.ts +3 -3
- package/src/browser/editor/debug-editor-contribution.ts +1 -1
- package/src/browser/editor/debug-model.ts +3 -4
- package/src/browser/view/breakpoints/debug-breakpoints.service.ts +4 -4
- package/src/browser/view/breakpoints/debug-breakpoints.view.tsx +7 -1
- package/src/browser/view/configuration/debug-toolbar.view.tsx +94 -112
- package/src/browser/view/console/debug-console.service.ts +2 -2
- package/src/browser/view/debug-view-model.ts +2 -6
- package/src/browser/view/frames/debug-call-stack-session.view.tsx +1 -4
- package/src/browser/view/frames/debug-call-stack-thread.view.tsx +1 -4
- package/src/common/debug-service.ts +15 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-service.d.ts","sourceRoot":"","sources":["../../src/common/debug-service.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"debug-service.d.ts","sourceRoot":"","sources":["../../src/common/debug-service.ts"],"names":[],"mappings":"AAAA,OA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AG,IAAI,CAAC,CAAC;IAErE;;;OAGG;IACH,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD;AAED,eAAO,MAAM,aAAa,eAAyB,CAAC;AAEpD,MAAM,WAAW,aAAa;IAC5B,iCAAiC,EAAE,KAAK,CAAC,8BAA8B,CAAC,CAAC;IACzE,iCAAiC,CAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IACjE,+BAA+B,CAAC,eAAe,EAAE,MAAM,EAAE,aAAa,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IAC7F,uBAAuB,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,CAAC,CAAC;CACrD;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,WAAW,EAAE,CAAC;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,yBAAiB,UAAU,CAAC;IACnB,MAAM,QAAQ;;MAGlB,CAAC;CACL"}
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IDebugService = exports.IDebugServer = exports.DebugAdapterPath = void 0;
|
|
3
|
+
exports.DebugError = exports.IDebugService = exports.IDebugServer = exports.DebugAdapterPath = void 0;
|
|
4
|
+
const ide_core_common_1 = require("@opensumi/ide-core-common");
|
|
4
5
|
exports.DebugAdapterPath = 'DebugAdaptor';
|
|
5
6
|
// Browser DI Token
|
|
6
7
|
exports.IDebugServer = Symbol('DebugServer');
|
|
7
8
|
exports.IDebugService = Symbol('DebugService');
|
|
9
|
+
var DebugError;
|
|
10
|
+
(function (DebugError) {
|
|
11
|
+
DebugError.NotFound = ide_core_common_1.ApplicationError.declare(-41000, (type) => ({
|
|
12
|
+
message: `'${type}' debugger type is not supported.`,
|
|
13
|
+
data: { type },
|
|
14
|
+
}));
|
|
15
|
+
})(DebugError = exports.DebugError || (exports.DebugError = {}));
|
|
8
16
|
//# sourceMappingURL=debug-service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debug-service.js","sourceRoot":"","sources":["../../src/common/debug-service.ts"],"names":[],"mappings":";;;AA+
|
|
1
|
+
{"version":3,"file":"debug-service.js","sourceRoot":"","sources":["../../src/common/debug-service.ts"],"names":[],"mappings":";;;AAAA,+DAOmC;AA+EtB,QAAA,gBAAgB,GAAG,cAAc,CAAC;AAE/C,mBAAmB;AACN,QAAA,YAAY,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;AAkErC,QAAA,aAAa,GAAG,MAAM,CAAC,cAAc,CAAC,CAAC;AAepD,IAAiB,UAAU,CAK1B;AALD,WAAiB,UAAU;IACZ,mBAAQ,GAAG,kCAAgB,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,CAAC;QAC1E,OAAO,EAAE,IAAI,IAAI,mCAAmC;QACpD,IAAI,EAAE,EAAE,IAAI,EAAE;KACf,CAAC,CAAC,CAAC;AACN,CAAC,EALgB,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAK1B"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="vscode" />
|
|
2
1
|
import { IRange, CancellationToken, Event } from '@opensumi/ide-core-common';
|
|
3
2
|
import { Range } from '@opensumi/monaco-editor-core/esm/vs/editor/common/core/range';
|
|
4
3
|
import { ITextModel } from '@opensumi/monaco-editor-core/esm/vs/editor/common/model';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-values.d.ts","sourceRoot":"","sources":["../../src/common/inline-values.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inline-values.d.ts","sourceRoot":"","sources":["../../src/common/inline-values.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AA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
|
@@ -17,33 +17,33 @@
|
|
|
17
17
|
"url": "git@github.com:opensumi/core.git"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@opensumi/ide-connection": "2.22.
|
|
21
|
-
"@opensumi/ide-core-common": "2.22.
|
|
22
|
-
"@opensumi/ide-core-node": "2.22.
|
|
23
|
-
"@opensumi/ide-file-service": "2.22.
|
|
24
|
-
"@opensumi/ide-task": "2.22.
|
|
25
|
-
"@opensumi/ide-terminal-next": "2.22.
|
|
20
|
+
"@opensumi/ide-connection": "2.22.11",
|
|
21
|
+
"@opensumi/ide-core-common": "2.22.11",
|
|
22
|
+
"@opensumi/ide-core-node": "2.22.11",
|
|
23
|
+
"@opensumi/ide-file-service": "2.22.11",
|
|
24
|
+
"@opensumi/ide-task": "2.22.11",
|
|
25
|
+
"@opensumi/ide-terminal-next": "2.22.11",
|
|
26
26
|
"anser": "^1.4.9",
|
|
27
27
|
"btoa": "^1.2.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@opensumi/ide-components": "2.22.
|
|
31
|
-
"@opensumi/ide-core-browser": "2.22.
|
|
30
|
+
"@opensumi/ide-components": "2.22.11",
|
|
31
|
+
"@opensumi/ide-core-browser": "2.22.11",
|
|
32
32
|
"@opensumi/ide-dev-tool": "1.3.1",
|
|
33
|
-
"@opensumi/ide-editor": "2.22.
|
|
34
|
-
"@opensumi/ide-main-layout": "2.22.
|
|
35
|
-
"@opensumi/ide-monaco": "2.22.
|
|
36
|
-
"@opensumi/ide-monaco-enhance": "2.22.
|
|
37
|
-
"@opensumi/ide-output": "2.22.
|
|
38
|
-
"@opensumi/ide-overlay": "2.22.
|
|
39
|
-
"@opensumi/ide-preferences": "2.22.
|
|
40
|
-
"@opensumi/ide-quick-open": "2.22.
|
|
41
|
-
"@opensumi/ide-storage": "2.22.
|
|
42
|
-
"@opensumi/ide-theme": "2.22.
|
|
43
|
-
"@opensumi/ide-variable": "2.22.
|
|
44
|
-
"@opensumi/ide-workspace": "2.22.
|
|
45
|
-
"@opensumi/ide-workspace-edit": "2.22.
|
|
33
|
+
"@opensumi/ide-editor": "2.22.11",
|
|
34
|
+
"@opensumi/ide-main-layout": "2.22.11",
|
|
35
|
+
"@opensumi/ide-monaco": "2.22.11",
|
|
36
|
+
"@opensumi/ide-monaco-enhance": "2.22.11",
|
|
37
|
+
"@opensumi/ide-output": "2.22.11",
|
|
38
|
+
"@opensumi/ide-overlay": "2.22.11",
|
|
39
|
+
"@opensumi/ide-preferences": "2.22.11",
|
|
40
|
+
"@opensumi/ide-quick-open": "2.22.11",
|
|
41
|
+
"@opensumi/ide-storage": "2.22.11",
|
|
42
|
+
"@opensumi/ide-theme": "2.22.11",
|
|
43
|
+
"@opensumi/ide-variable": "2.22.11",
|
|
44
|
+
"@opensumi/ide-workspace": "2.22.11",
|
|
45
|
+
"@opensumi/ide-workspace-edit": "2.22.11",
|
|
46
46
|
"@types/btoa": "^1.2.3"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "14089ffc59c58678f76232f48f01658ee4a97e7c"
|
|
49
49
|
}
|
|
@@ -59,11 +59,6 @@ export class BreakpointManager extends MarkerManager<IDebugBreakpoint> {
|
|
|
59
59
|
return Array.from(this._affected.values());
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
protected whenReadyDeferred: Deferred<void> = new Deferred();
|
|
63
|
-
get whenReady() {
|
|
64
|
-
return this.whenReadyDeferred.promise;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
62
|
protected breakpointsDeffered: Deferred<void> | null = null;
|
|
68
63
|
|
|
69
64
|
protected readonly onDidChangeBreakpointsEmitter = new Emitter<BreakpointsChangeEvent>();
|
|
@@ -271,7 +266,6 @@ export class BreakpointManager extends MarkerManager<IDebugBreakpoint> {
|
|
|
271
266
|
this.defaultExceptionFilter.forEach((item) => {
|
|
272
267
|
this.exceptionFilterValue![item.filter] = !!item.default;
|
|
273
268
|
});
|
|
274
|
-
this.whenReadyDeferred.resolve();
|
|
275
269
|
}
|
|
276
270
|
|
|
277
271
|
async save(): Promise<void> {
|
|
@@ -25,7 +25,7 @@ export class DebugContextKey {
|
|
|
25
25
|
|
|
26
26
|
public readonly contextInDebugRepl: IContextKey<boolean>;
|
|
27
27
|
public readonly contextInDebugConsole: IContextKey<boolean>;
|
|
28
|
-
public readonly
|
|
28
|
+
public readonly contextInDdebugMode: IContextKey<boolean>;
|
|
29
29
|
public readonly contextDebugState: IContextKey<keyof typeof DebugState>;
|
|
30
30
|
public readonly contextVariableEvaluateNamePresent: IContextKey<boolean>;
|
|
31
31
|
public readonly contextSetVariableSupported: IContextKey<boolean>;
|
|
@@ -38,7 +38,7 @@ export class DebugContextKey {
|
|
|
38
38
|
this._contextKeyService = this.globalContextKeyService.createScoped(dom);
|
|
39
39
|
this.contextInDebugRepl = CONTEXT_IN_DEBUG_REPL.bind(this.contextKeyScoped);
|
|
40
40
|
this.contextInDebugConsole = CONTEXT_IN_DEBUG_CONSOLE.bind(this.contextKeyScoped);
|
|
41
|
-
this.
|
|
41
|
+
this.contextInDdebugMode = CONTEXT_IN_DEBUG_MODE.bind(this.contextKeyScoped);
|
|
42
42
|
this.contextDebugState = CONTEXT_DEBUG_STATE.bind(this.contextKeyScoped);
|
|
43
43
|
this.contextVariableEvaluateNamePresent = CONTEXT_VARIABLE_EVALUATE_NAME_PRESENT.bind(this.contextKeyScoped);
|
|
44
44
|
this.contextSetVariableSupported = CONTEXT_SET_VARIABLE_SUPPORTED.bind(this.contextKeyScoped);
|
|
@@ -40,6 +40,7 @@ import { IVariableResolverService } from '@opensumi/ide-variable';
|
|
|
40
40
|
|
|
41
41
|
import {
|
|
42
42
|
DebugConfiguration,
|
|
43
|
+
DebugError,
|
|
43
44
|
IDebugServer,
|
|
44
45
|
DebugServer,
|
|
45
46
|
DebugSessionOptions,
|
|
@@ -344,6 +345,11 @@ export class DebugSessionManager implements IDebugSessionManager {
|
|
|
344
345
|
}
|
|
345
346
|
return this.doStart(sessionId, resolved, extra);
|
|
346
347
|
} catch (e) {
|
|
348
|
+
if (DebugError.NotFound.is(e)) {
|
|
349
|
+
this.messageService.error(formatLocalize('debug.launch.typeNotSupported', e.data.type));
|
|
350
|
+
return;
|
|
351
|
+
}
|
|
352
|
+
|
|
347
353
|
this.messageService.error(localize('debug.launch.catchError'));
|
|
348
354
|
throw e;
|
|
349
355
|
}
|
|
@@ -449,7 +455,7 @@ export class DebugSessionManager implements IDebugSessionManager {
|
|
|
449
455
|
this.debugContextKey.contextSetVariableSupported.set(session.capabilities.supportsSetVariable ?? false);
|
|
450
456
|
this.debugContextKey.contextRestartFrameSupported.set(session.capabilities.supportsRestartFrame ?? false);
|
|
451
457
|
this.debugContextKey.contextDebugState.set(DebugState[session.state] as keyof typeof DebugState);
|
|
452
|
-
this.debugContextKey.
|
|
458
|
+
this.debugContextKey.contextInDdebugMode.set(state !== DebugState.Inactive);
|
|
453
459
|
});
|
|
454
460
|
session.on('terminated', (event) => {
|
|
455
461
|
const restart = event.body && event.body.restart;
|
|
@@ -388,12 +388,12 @@ export class DebugSession implements IDebugSession {
|
|
|
388
388
|
|
|
389
389
|
protected async configure(): Promise<void> {
|
|
390
390
|
await this.initBreakpoints();
|
|
391
|
-
// 更新
|
|
391
|
+
// 更新exceptionBreakpoint配置
|
|
392
392
|
this.breakpointManager.setExceptionBreakpoints(this.capabilities.exceptionBreakpointFilters || []);
|
|
393
|
-
this.initialized = true;
|
|
394
393
|
if (this.capabilities.supportsConfigurationDoneRequest) {
|
|
395
|
-
this.sendRequest('configurationDone', {});
|
|
394
|
+
await this.sendRequest('configurationDone', {});
|
|
396
395
|
}
|
|
396
|
+
this.initialized = true;
|
|
397
397
|
if (!this.supportsThreadIdCorrespond) {
|
|
398
398
|
await this.updateThreads(undefined);
|
|
399
399
|
}
|
|
@@ -332,7 +332,7 @@ export class DebugEditorContribution implements IEditorFeatureContribution {
|
|
|
332
332
|
codeEditorService.registerDecorationType('inline-value-decoration', INLINE_VALUE_DECORATION_KEY, {});
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
-
public setHoverEnabled(editor: IEditor, isEnabled = !this.debugContextKey.
|
|
335
|
+
public setHoverEnabled(editor: IEditor, isEnabled = !this.debugContextKey.contextInDdebugMode.get()) {
|
|
336
336
|
editor.monacoEditor.updateOptions({
|
|
337
337
|
hover: {
|
|
338
338
|
enabled: isEnabled,
|
|
@@ -262,8 +262,8 @@ export class DebugModel implements IDebugModel {
|
|
|
262
262
|
this.renderFrames();
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
|
|
266
|
-
|
|
265
|
+
render(): void {
|
|
266
|
+
this.renderBreakpoints();
|
|
267
267
|
this.renderFrames();
|
|
268
268
|
}
|
|
269
269
|
|
|
@@ -271,8 +271,7 @@ export class DebugModel implements IDebugModel {
|
|
|
271
271
|
* 渲染断点信息装饰器
|
|
272
272
|
* @memberof DebugModel
|
|
273
273
|
*/
|
|
274
|
-
|
|
275
|
-
await this.breakpointManager.whenReady;
|
|
274
|
+
renderBreakpoints(): void {
|
|
276
275
|
this.renderNormalBreakpoints();
|
|
277
276
|
this.renderCurrentBreakpoints();
|
|
278
277
|
}
|
|
@@ -11,6 +11,7 @@ import { WorkspaceEditDidRenameFileEvent, WorkspaceEditDidDeleteFileEvent } from
|
|
|
11
11
|
import { DEBUG_REPORT_NAME, CONTEXT_IN_DEBUG_MODE_KEY, IDebugBreakpoint } from '../../../common';
|
|
12
12
|
import { IDebugSessionManager } from '../../../common/debug-session';
|
|
13
13
|
import {
|
|
14
|
+
DebugBreakpoint,
|
|
14
15
|
DebugExceptionBreakpoint,
|
|
15
16
|
isDebugBreakpoint,
|
|
16
17
|
isDebugExceptionBreakpoint,
|
|
@@ -75,9 +76,9 @@ export class DebugBreakpointsService extends WithEventBus {
|
|
|
75
76
|
|
|
76
77
|
async init() {
|
|
77
78
|
await this.updateRoots();
|
|
78
|
-
|
|
79
|
+
this.updateBreakpoints();
|
|
79
80
|
this.workspaceService.onWorkspaceChanged(async () => {
|
|
80
|
-
this.updateRoots();
|
|
81
|
+
await this.updateRoots();
|
|
81
82
|
this.updateBreakpoints();
|
|
82
83
|
});
|
|
83
84
|
this.breakpoints.onDidChangeBreakpoints(() => {
|
|
@@ -165,8 +166,7 @@ export class DebugBreakpointsService extends WithEventBus {
|
|
|
165
166
|
}
|
|
166
167
|
|
|
167
168
|
@action
|
|
168
|
-
private
|
|
169
|
-
await this.breakpoints.whenReady;
|
|
169
|
+
private updateBreakpoints() {
|
|
170
170
|
this.nodes = this.extractNodes([
|
|
171
171
|
...this.breakpoints.getExceptionBreakpoints(),
|
|
172
172
|
...this.breakpoints.getBreakpoints(),
|
|
@@ -8,7 +8,13 @@ import { useInjectable, ViewState, CommandService, EDITOR_COMMANDS, URI, getIcon
|
|
|
8
8
|
import { DebugProtocol } from '@opensumi/vscode-debugprotocol/lib/debugProtocol';
|
|
9
9
|
|
|
10
10
|
import { IDebugBreakpoint, IDebugSessionManager, ISourceBreakpoint } from '../../../common';
|
|
11
|
-
import {
|
|
11
|
+
import {
|
|
12
|
+
DebugBreakpoint,
|
|
13
|
+
DebugExceptionBreakpoint,
|
|
14
|
+
isDebugBreakpoint,
|
|
15
|
+
isRuntimeBreakpoint,
|
|
16
|
+
getStatus,
|
|
17
|
+
} from '../../breakpoint';
|
|
12
18
|
import { DebugSessionManager } from '../../debug-session-manager';
|
|
13
19
|
|
|
14
20
|
import styles from './debug-breakpoints.module.less';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import cls from 'classnames';
|
|
2
2
|
import { action, observable } from 'mobx';
|
|
3
3
|
import { observer } from 'mobx-react-lite';
|
|
4
|
-
import React, {
|
|
4
|
+
import React, { useEffect, useState } from 'react';
|
|
5
5
|
|
|
6
6
|
import { Injectable } from '@opensumi/di';
|
|
7
7
|
import { Option, Select } from '@opensumi/ide-components';
|
|
@@ -104,80 +104,63 @@ export const DebugToolbarView = observer((props: DebugToolbarViewProps) => {
|
|
|
104
104
|
|
|
105
105
|
const currentSessionId = currentSession && currentSession.id;
|
|
106
106
|
|
|
107
|
-
const renderToolBar =
|
|
108
|
-
(session
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return null;
|
|
116
|
-
},
|
|
117
|
-
[toolBarMenuMap],
|
|
118
|
-
);
|
|
119
|
-
|
|
120
|
-
const renderStop = useCallback(
|
|
121
|
-
(state: DebugState): React.ReactNode => {
|
|
122
|
-
if (isAttach) {
|
|
123
|
-
return (
|
|
124
|
-
<DebugAction
|
|
125
|
-
run={doStop}
|
|
126
|
-
enabled={typeof state === 'number' && state !== DebugState.Inactive}
|
|
127
|
-
icon={'disconnect'}
|
|
128
|
-
label={localize('debug.action.disattach')}
|
|
129
|
-
/>
|
|
130
|
-
);
|
|
131
|
-
}
|
|
107
|
+
const renderToolBar = (session: DebugSession | undefined): React.ReactNode => {
|
|
108
|
+
if (session && session.id && toolBarMenuMap.has(session.id)) {
|
|
109
|
+
return <InlineMenuBar menus={toolBarMenuMap.get(session.id)!} />;
|
|
110
|
+
}
|
|
111
|
+
return null;
|
|
112
|
+
};
|
|
113
|
+
const renderStop = (state: DebugState): React.ReactNode => {
|
|
114
|
+
if (isAttach) {
|
|
132
115
|
return (
|
|
133
116
|
<DebugAction
|
|
134
117
|
run={doStop}
|
|
135
118
|
enabled={typeof state === 'number' && state !== DebugState.Inactive}
|
|
136
|
-
icon={'
|
|
137
|
-
label={localize('debug.action.
|
|
119
|
+
icon={'disconnect'}
|
|
120
|
+
label={localize('debug.action.disattach')}
|
|
138
121
|
/>
|
|
139
122
|
);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
123
|
+
}
|
|
124
|
+
return (
|
|
125
|
+
<DebugAction
|
|
126
|
+
run={doStop}
|
|
127
|
+
enabled={typeof state === 'number' && state !== DebugState.Inactive}
|
|
128
|
+
icon={'stop'}
|
|
129
|
+
label={localize('debug.action.stop')}
|
|
130
|
+
/>
|
|
131
|
+
);
|
|
132
|
+
};
|
|
133
|
+
const renderContinue = (state: DebugState): React.ReactNode => {
|
|
134
|
+
if (state === DebugState.Stopped) {
|
|
135
|
+
return <DebugAction run={doContinue} icon={'continue'} label={localize('debug.action.continue')} />;
|
|
136
|
+
}
|
|
137
|
+
return (
|
|
138
|
+
<DebugAction
|
|
139
|
+
run={doPause}
|
|
140
|
+
enabled={typeof state === 'number' && state === DebugState.Running}
|
|
141
|
+
icon={'pause'}
|
|
142
|
+
label={localize('debug.action.pause')}
|
|
143
|
+
/>
|
|
144
|
+
);
|
|
145
|
+
};
|
|
160
146
|
|
|
161
|
-
const renderSessionOptions =
|
|
162
|
-
(
|
|
163
|
-
|
|
164
|
-
if (isElectronRenderer) {
|
|
165
|
-
return (
|
|
166
|
-
<option key={session.id} value={session.id}>
|
|
167
|
-
{session.label}
|
|
168
|
-
</option>
|
|
169
|
-
);
|
|
170
|
-
}
|
|
147
|
+
const renderSessionOptions = (sessions: DebugSession[]) =>
|
|
148
|
+
sessions.map((session: DebugSession) => {
|
|
149
|
+
if (isElectronRenderer) {
|
|
171
150
|
return (
|
|
172
|
-
<
|
|
151
|
+
<option key={session.id} value={session.id}>
|
|
173
152
|
{session.label}
|
|
174
|
-
</
|
|
153
|
+
</option>
|
|
175
154
|
);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
|
|
155
|
+
}
|
|
156
|
+
return (
|
|
157
|
+
<Option key={session.id} label={session.label} value={session.id}>
|
|
158
|
+
{session.label}
|
|
159
|
+
</Option>
|
|
160
|
+
);
|
|
161
|
+
});
|
|
179
162
|
|
|
180
|
-
const renderSelections =
|
|
163
|
+
const renderSelections = (sessions: DebugSession[]) => {
|
|
181
164
|
if (sessions.length > 1) {
|
|
182
165
|
return (
|
|
183
166
|
<div className={cls(styles.debug_selection)}>
|
|
@@ -199,60 +182,59 @@ export const DebugToolbarView = observer((props: DebugToolbarViewProps) => {
|
|
|
199
182
|
</div>
|
|
200
183
|
);
|
|
201
184
|
}
|
|
202
|
-
}
|
|
185
|
+
};
|
|
203
186
|
|
|
204
|
-
const setCurrentSession =
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
187
|
+
const setCurrentSession = (event: React.ChangeEvent<HTMLSelectElement> | string | number) => {
|
|
188
|
+
let value = event;
|
|
189
|
+
if (isElectronRenderer) {
|
|
190
|
+
value = (event as React.ChangeEvent<HTMLSelectElement>).target.value;
|
|
191
|
+
}
|
|
210
192
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}
|
|
193
|
+
if (!sessions) {
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
for (const session of sessions) {
|
|
197
|
+
if (session.id === value) {
|
|
198
|
+
updateCurrentSession(session);
|
|
218
199
|
}
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
);
|
|
200
|
+
}
|
|
201
|
+
};
|
|
222
202
|
|
|
223
203
|
return (
|
|
224
|
-
<
|
|
225
|
-
{
|
|
226
|
-
|
|
227
|
-
{
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
204
|
+
<React.Fragment>
|
|
205
|
+
<div className={styles.debug_action_bar}>
|
|
206
|
+
{renderSelections(sessions.filter((s: DebugSession) => !s.parentSession))}
|
|
207
|
+
<div className={styles.debug_actions}>
|
|
208
|
+
{renderContinue(state)}
|
|
209
|
+
<DebugAction
|
|
210
|
+
run={doStepOver}
|
|
211
|
+
enabled={typeof state === 'number' && state === DebugState.Stopped}
|
|
212
|
+
icon={'step'}
|
|
213
|
+
label={localize('debug.action.step-over')}
|
|
214
|
+
/>
|
|
215
|
+
<DebugAction
|
|
216
|
+
run={doStepIn}
|
|
217
|
+
enabled={typeof state === 'number' && state === DebugState.Stopped}
|
|
218
|
+
icon={'step-in'}
|
|
219
|
+
label={localize('debug.action.step-into')}
|
|
220
|
+
/>
|
|
221
|
+
<DebugAction
|
|
222
|
+
run={doStepOut}
|
|
223
|
+
enabled={typeof state === 'number' && state === DebugState.Stopped}
|
|
224
|
+
icon={'step-out'}
|
|
225
|
+
label={localize('debug.action.step-out')}
|
|
226
|
+
/>
|
|
227
|
+
<DebugAction
|
|
228
|
+
run={doRestart}
|
|
229
|
+
enabled={typeof state === 'number' && state !== DebugState.Inactive}
|
|
230
|
+
icon={'reload'}
|
|
231
|
+
label={localize('debug.action.restart')}
|
|
232
|
+
/>
|
|
233
|
+
{renderStop(state)}
|
|
234
|
+
{renderToolBar(currentSession)}
|
|
235
|
+
</div>
|
|
254
236
|
</div>
|
|
255
|
-
</
|
|
237
|
+
</React.Fragment>
|
|
256
238
|
);
|
|
257
239
|
});
|
|
258
240
|
|
|
@@ -156,11 +156,11 @@ export class DebugConsoleService implements IHistoryNavigationWidget {
|
|
|
156
156
|
if (inDebugMode) {
|
|
157
157
|
this.updateReadOnly(false);
|
|
158
158
|
this.updateInputDecoration();
|
|
159
|
-
this.debugContextKey.
|
|
159
|
+
this.debugContextKey.contextInDdebugMode.set(true);
|
|
160
160
|
} else {
|
|
161
161
|
this.updateReadOnly(true);
|
|
162
162
|
if (this.debugContextKey) {
|
|
163
|
-
this.debugContextKey.
|
|
163
|
+
this.debugContextKey.contextInDdebugMode.set(false);
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
}
|
|
@@ -24,6 +24,7 @@ import { DebugSessionManager } from '../debug-session-manager';
|
|
|
24
24
|
import { DebugStackFrame } from '../model/debug-stack-frame';
|
|
25
25
|
import { DebugThread } from '../model/debug-thread';
|
|
26
26
|
|
|
27
|
+
|
|
27
28
|
@Injectable()
|
|
28
29
|
export class DebugViewModel implements IDisposable {
|
|
29
30
|
@Autowired(IDebugSessionManager)
|
|
@@ -42,6 +43,7 @@ export class DebugViewModel implements IDisposable {
|
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
protected readonly toDispose = new DisposableCollection(this.onDidChangeEmitter, this.onDidChangeBreakpointsEmitter);
|
|
46
|
+
|
|
45
47
|
protected readonly _sessions = new Set<DebugSession>();
|
|
46
48
|
|
|
47
49
|
get sessions(): IterableIterator<DebugSession> {
|
|
@@ -75,11 +77,9 @@ export class DebugViewModel implements IDisposable {
|
|
|
75
77
|
get id(): string {
|
|
76
78
|
return (this.session && this.session.id) || '-1';
|
|
77
79
|
}
|
|
78
|
-
|
|
79
80
|
get label(): string {
|
|
80
81
|
return (this.session && this.session.label) || 'Unknown Session';
|
|
81
82
|
}
|
|
82
|
-
|
|
83
83
|
has(session: DebugSession | undefined): session is DebugSession {
|
|
84
84
|
return !!session && this._sessions.has(session);
|
|
85
85
|
}
|
|
@@ -120,12 +120,10 @@ export class DebugViewModel implements IDisposable {
|
|
|
120
120
|
return this.manager.currentSession.getThreads(() => true);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
|
|
124
123
|
get currentSession(): DebugSession | undefined {
|
|
125
124
|
const { currentSession } = this.manager;
|
|
126
125
|
return (this.has(currentSession) && currentSession) || this.session;
|
|
127
126
|
}
|
|
128
|
-
|
|
129
127
|
set currentSession(currentSession: DebugSession | undefined) {
|
|
130
128
|
this.manager.updateCurrentSession(currentSession);
|
|
131
129
|
}
|
|
@@ -134,12 +132,10 @@ export class DebugViewModel implements IDisposable {
|
|
|
134
132
|
const { currentSession } = this;
|
|
135
133
|
return (currentSession && currentSession.state) || DebugState.Inactive;
|
|
136
134
|
}
|
|
137
|
-
|
|
138
135
|
get currentThread(): DebugThread | undefined {
|
|
139
136
|
const { currentSession } = this;
|
|
140
137
|
return currentSession && currentSession.currentThread;
|
|
141
138
|
}
|
|
142
|
-
|
|
143
139
|
get currentFrame(): DebugStackFrame | undefined {
|
|
144
140
|
const { currentThread } = this;
|
|
145
141
|
return currentThread && currentThread.currentFrame;
|
|
@@ -211,10 +211,7 @@ export const DebugStackSessionView = (props: DebugStackSessionViewProps) => {
|
|
|
211
211
|
>
|
|
212
212
|
{supportsThreadIdCorrespond || threads.length > 0 ? (
|
|
213
213
|
<>
|
|
214
|
-
<div
|
|
215
|
-
className={unfold ? getIcon('arrow-down') : getIcon('arrow-right')}
|
|
216
|
-
onClick={() => setUnfold(!unfold)}
|
|
217
|
-
></div>
|
|
214
|
+
<div className={unfold ? getIcon('down') : getIcon('right')} onClick={() => setUnfold(!unfold)}></div>
|
|
218
215
|
<div className={cls([getIcon('debug'), styles.debug_session_icon])}></div>
|
|
219
216
|
</>
|
|
220
217
|
) : (
|
|
@@ -68,10 +68,7 @@ export const DebugStackThreadView = (props: DebugStackThreadViewProps) => {
|
|
|
68
68
|
{mutiple && (
|
|
69
69
|
<div style={{ paddingLeft: `${indent}px` }} className={styles.debug_stack_item_label}>
|
|
70
70
|
{thread.frames.length > 0 ? (
|
|
71
|
-
<div
|
|
72
|
-
className={expanded ? getIcon('arrow-down') : getIcon('arrow-right')}
|
|
73
|
-
onClick={() => setExpanded(!expanded)}
|
|
74
|
-
></div>
|
|
71
|
+
<div className={expanded ? getIcon('down') : getIcon('right')} onClick={() => setExpanded(!expanded)}></div>
|
|
75
72
|
) : (
|
|
76
73
|
<div style={{ width: 14 }}></div>
|
|
77
74
|
)}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
IDisposable,
|
|
3
|
+
IJSONSchema,
|
|
4
|
+
IJSONSchemaSnippet,
|
|
5
|
+
ApplicationError,
|
|
6
|
+
Event,
|
|
7
|
+
BinaryBuffer,
|
|
8
|
+
} from '@opensumi/ide-core-common';
|
|
2
9
|
|
|
3
10
|
import { DebugConfiguration } from './debug-configuration';
|
|
4
11
|
import { IDebugSessionDTO } from './debug-session-options';
|
|
@@ -160,3 +167,10 @@ export interface IDebugServiceContributionPoint {
|
|
|
160
167
|
contributions: IJSONSchema[];
|
|
161
168
|
removed?: boolean;
|
|
162
169
|
}
|
|
170
|
+
|
|
171
|
+
export namespace DebugError {
|
|
172
|
+
export const NotFound = ApplicationError.declare(-41000, (type: string) => ({
|
|
173
|
+
message: `'${type}' debugger type is not supported.`,
|
|
174
|
+
data: { type },
|
|
175
|
+
}));
|
|
176
|
+
}
|