@theia/debug 1.65.0-next.55 → 1.65.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.map +1 -1
- package/lib/browser/console/debug-console-items.js +1 -1
- package/lib/browser/console/debug-console-items.js.map +1 -1
- package/lib/browser/debug-configuration-manager.js +3 -3
- package/lib/browser/debug-configuration-manager.js.map +1 -1
- package/lib/browser/debug-frontend-application-contribution.d.ts +4 -0
- package/lib/browser/debug-frontend-application-contribution.d.ts.map +1 -1
- package/lib/browser/debug-frontend-application-contribution.js +46 -35
- package/lib/browser/debug-frontend-application-contribution.js.map +1 -1
- package/lib/browser/debug-prefix-configuration.d.ts.map +1 -1
- package/lib/browser/debug-prefix-configuration.js +2 -1
- package/lib/browser/debug-prefix-configuration.js.map +1 -1
- package/lib/browser/debug-session-manager.d.ts.map +1 -1
- package/lib/browser/debug-session-manager.js +14 -8
- package/lib/browser/debug-session-manager.js.map +1 -1
- package/lib/browser/debug-session.d.ts.map +1 -1
- package/lib/browser/debug-session.js +2 -2
- package/lib/browser/debug-session.js.map +1 -1
- package/lib/browser/disassembly-view/disassembly-view-contribution.js +1 -1
- package/lib/browser/disassembly-view/disassembly-view-contribution.js.map +1 -1
- package/lib/browser/editor/debug-editor-model.js +1 -1
- package/lib/browser/editor/debug-editor-model.js.map +1 -1
- package/lib/browser/model/debug-breakpoint.d.ts.map +1 -1
- package/lib/browser/model/debug-breakpoint.js +3 -2
- package/lib/browser/model/debug-breakpoint.js.map +1 -1
- package/lib/browser/model/debug-instruction-breakpoint.js +1 -1
- package/lib/browser/model/debug-instruction-breakpoint.js.map +1 -1
- package/lib/browser/model/debug-source-breakpoint.d.ts.map +1 -1
- package/lib/browser/model/debug-source-breakpoint.js +10 -9
- package/lib/browser/model/debug-source-breakpoint.js.map +1 -1
- package/lib/browser/model/debug-thread.js +1 -1
- package/lib/browser/model/debug-thread.js.map +1 -1
- package/lib/browser/view/debug-stack-frames-source.d.ts.map +1 -1
- package/lib/browser/view/debug-stack-frames-source.js +2 -1
- package/lib/browser/view/debug-stack-frames-source.js.map +1 -1
- package/lib/browser/view/debug-view-model.d.ts.map +1 -1
- package/lib/browser/view/debug-view-model.js +1 -1
- package/lib/browser/view/debug-view-model.js.map +1 -1
- package/lib/common/debug-preferences.js +3 -3
- package/lib/common/debug-preferences.js.map +1 -1
- package/lib/common/inline-debug-adapter.d.ts +2 -0
- package/lib/common/inline-debug-adapter.d.ts.map +1 -1
- package/package.json +16 -16
- package/src/browser/console/debug-console-items.tsx +1 -1
- package/src/browser/debug-configuration-manager.ts +3 -3
- package/src/browser/debug-frontend-application-contribution.ts +51 -36
- package/src/browser/debug-prefix-configuration.ts +2 -2
- package/src/browser/debug-session-manager.ts +14 -8
- package/src/browser/debug-session.tsx +3 -2
- package/src/browser/disassembly-view/disassembly-view-contribution.ts +1 -1
- package/src/browser/editor/debug-editor-model.ts +1 -1
- package/src/browser/model/debug-breakpoint.tsx +3 -2
- package/src/browser/model/debug-instruction-breakpoint.tsx +1 -1
- package/src/browser/model/debug-source-breakpoint.tsx +13 -10
- package/src/browser/model/debug-thread.tsx +1 -1
- package/src/browser/view/debug-stack-frames-source.tsx +2 -1
- package/src/browser/view/debug-view-model.ts +2 -2
- package/src/common/debug-preferences.ts +3 -3
|
@@ -210,7 +210,7 @@ export class DebugSessionManager {
|
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
protected async startConfiguration(options: DebugConfigurationSessionOptions): Promise<DebugSession | undefined> {
|
|
213
|
-
return this.progressService.withProgress('
|
|
213
|
+
return this.progressService.withProgress(nls.localizeByDefault('Starting...'), 'debug', async () => {
|
|
214
214
|
try {
|
|
215
215
|
// If a parent session is available saving should be handled by the parent
|
|
216
216
|
if (!options.configuration.parentSessionId && !options.configuration.suppressSaveBeforeStart && !await this.saveAll()) {
|
|
@@ -258,11 +258,11 @@ export class DebugSessionManager {
|
|
|
258
258
|
return this.doStart(sessionId, resolved);
|
|
259
259
|
} catch (e) {
|
|
260
260
|
if (DebugError.NotFound.is(e)) {
|
|
261
|
-
this.messageService.error(
|
|
261
|
+
this.messageService.error(nls.localize('theia/debug/debugSessionTypeNotSupported', 'The debug session type "{0}" is not supported.', e.data.type));
|
|
262
262
|
return undefined;
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
this.messageService.error('There was an error starting the debug session, check the logs for more details.');
|
|
265
|
+
this.messageService.error(nls.localize('theia/debug/errorStartingDebugSession', 'There was an error starting the debug session, check the logs for more details.'));
|
|
266
266
|
console.error('Error starting the debug session', e);
|
|
267
267
|
throw e;
|
|
268
268
|
}
|
|
@@ -652,8 +652,9 @@ export class DebugSessionManager {
|
|
|
652
652
|
return true;
|
|
653
653
|
}
|
|
654
654
|
|
|
655
|
+
const taskLabel = typeof taskName === 'string' ? taskName : JSON.stringify(taskName);
|
|
655
656
|
if (!taskInfo) {
|
|
656
|
-
return this.doPostTaskAction(
|
|
657
|
+
return this.doPostTaskAction(nls.localize('theia/debug/couldNotRunTask', "Could not run the task '{0}'.", taskLabel));
|
|
657
658
|
}
|
|
658
659
|
|
|
659
660
|
const getExitCodePromise: Promise<TaskEndedInfo> = this.taskService.getExitCode(taskInfo.taskId).then(result =>
|
|
@@ -671,19 +672,24 @@ export class DebugSessionManager {
|
|
|
671
672
|
if (taskEndedInfo.taskEndedType === TaskEndedTypes.TaskExited && taskEndedInfo.value === 0) {
|
|
672
673
|
return true;
|
|
673
674
|
} else if (taskEndedInfo.taskEndedType === TaskEndedTypes.TaskExited && taskEndedInfo.value !== undefined) {
|
|
674
|
-
return this.doPostTaskAction(
|
|
675
|
+
return this.doPostTaskAction(nls.localize('theia/debug/taskTerminatedWithExitCode', "Task '{0}' terminated with exit code {1}.", taskLabel, taskEndedInfo.value));
|
|
675
676
|
} else {
|
|
676
677
|
const signal = await this.taskService.getTerminateSignal(taskInfo.taskId);
|
|
677
678
|
if (signal !== undefined) {
|
|
678
|
-
return this.doPostTaskAction(
|
|
679
|
+
return this.doPostTaskAction(nls.localize('theia/debug/taskTerminatedBySignal', "Task '{0}' terminated by signal {1}.", taskLabel, signal));
|
|
679
680
|
} else {
|
|
680
|
-
return this.doPostTaskAction(
|
|
681
|
+
return this.doPostTaskAction(nls.localize('theia/debug/taskTerminatedForUnknownReason', "Task '{0}' terminated for unknown reason.", taskLabel));
|
|
681
682
|
}
|
|
682
683
|
}
|
|
683
684
|
}
|
|
684
685
|
|
|
685
686
|
protected async doPostTaskAction(errorMessage: string): Promise<boolean> {
|
|
686
|
-
const actions = [
|
|
687
|
+
const actions = [
|
|
688
|
+
nls.localizeByDefault('Open {0}', 'launch.json'),
|
|
689
|
+
nls.localizeByDefault('Cancel'),
|
|
690
|
+
nls.localizeByDefault('Configure Task'),
|
|
691
|
+
nls.localizeByDefault('Debug Anyway')
|
|
692
|
+
];
|
|
687
693
|
const result = await this.messageService.error(errorMessage, ...actions);
|
|
688
694
|
switch (result) {
|
|
689
695
|
case actions[0]: // open launch.json
|
|
@@ -342,7 +342,7 @@ export class DebugSession implements CompositeTreeElement {
|
|
|
342
342
|
try {
|
|
343
343
|
const response = await this.connection.sendRequest('initialize', {
|
|
344
344
|
clientID: 'Theia',
|
|
345
|
-
clientName: 'Theia IDE',
|
|
345
|
+
clientName: nls.localize('theia/debug/TheiaIDE', 'Theia IDE'),
|
|
346
346
|
adapterID: this.configuration.type,
|
|
347
347
|
locale: 'en-US',
|
|
348
348
|
linesStartAt1: true,
|
|
@@ -364,7 +364,8 @@ export class DebugSession implements CompositeTreeElement {
|
|
|
364
364
|
try {
|
|
365
365
|
await this.sendRequest((this.configuration.request as keyof DebugRequestTypes), this.configuration);
|
|
366
366
|
} catch (reason) {
|
|
367
|
-
this.showMessage(MessageType.Error, reason.message ||
|
|
367
|
+
this.showMessage(MessageType.Error, reason.message || nls.localize('theia/debug/debugSessionInitializationFailed',
|
|
368
|
+
'Debug session initialization failed. See console for details.'));
|
|
368
369
|
throw reason;
|
|
369
370
|
}
|
|
370
371
|
}
|
|
@@ -46,7 +46,7 @@ export class DisassemblyViewContribution extends AbstractViewContribution<Disass
|
|
|
46
46
|
constructor() {
|
|
47
47
|
super({
|
|
48
48
|
widgetId: DisassemblyViewWidget.ID,
|
|
49
|
-
widgetName: 'Disassembly View',
|
|
49
|
+
widgetName: nls.localizeByDefault('Disassembly View'),
|
|
50
50
|
defaultWidgetOptions: { area: 'main' }
|
|
51
51
|
});
|
|
52
52
|
}
|
|
@@ -191,7 +191,7 @@ export class DebugEditorModel implements Disposable {
|
|
|
191
191
|
range: columnUntilEOLRange
|
|
192
192
|
});
|
|
193
193
|
const firstNonWhitespaceColumn = this.editor.document.textEditorModel.getLineFirstNonWhitespaceColumn(currentFrame.raw.line);
|
|
194
|
-
if (currentFrame.raw.column > firstNonWhitespaceColumn) {
|
|
194
|
+
if (firstNonWhitespaceColumn !== 0 && currentFrame.raw.column > firstNonWhitespaceColumn) {
|
|
195
195
|
decorations.push({
|
|
196
196
|
options: DebugEditorModel.TOP_STACK_FRAME_INLINE_DECORATION,
|
|
197
197
|
range: columnUntilEOLRange
|
|
@@ -23,6 +23,7 @@ import { TreeElement } from '@theia/core/lib/browser/source-tree';
|
|
|
23
23
|
import { DebugSession } from '../debug-session';
|
|
24
24
|
import { BaseBreakpoint } from '../breakpoint/breakpoint-marker';
|
|
25
25
|
import { BreakpointManager } from '../breakpoint/breakpoint-manager';
|
|
26
|
+
import { nls } from '@theia/core';
|
|
26
27
|
|
|
27
28
|
export class DebugBreakpointData {
|
|
28
29
|
readonly raw?: DebugProtocol.Breakpoint;
|
|
@@ -123,7 +124,7 @@ export abstract class DebugBreakpoint<T extends BaseBreakpoint = BaseBreakpoint>
|
|
|
123
124
|
const decoration = this.getBreakpointDecoration();
|
|
124
125
|
return {
|
|
125
126
|
className: decoration.className + '-unverified',
|
|
126
|
-
message: [this.message || 'Unverified '
|
|
127
|
+
message: [this.message || nls.localize('theia/debug/unverifiedBreakpoint', 'Unverified {0}', decoration.message[0])]
|
|
127
128
|
};
|
|
128
129
|
}
|
|
129
130
|
|
|
@@ -131,7 +132,7 @@ export abstract class DebugBreakpoint<T extends BaseBreakpoint = BaseBreakpoint>
|
|
|
131
132
|
const decoration = this.getBreakpointDecoration();
|
|
132
133
|
return {
|
|
133
134
|
className: decoration.className + '-disabled',
|
|
134
|
-
message: [message || ('Disabled '
|
|
135
|
+
message: [message || nls.localize('theia/debug/disabledBreakpoint', 'Disabled {0}', decoration.message[0])]
|
|
135
136
|
};
|
|
136
137
|
}
|
|
137
138
|
|
|
@@ -57,7 +57,7 @@ export class DebugInstructionBreakpoint extends DebugBreakpoint<InstructionBreak
|
|
|
57
57
|
if (this.origin.condition || this.origin.hitCondition) {
|
|
58
58
|
return {
|
|
59
59
|
className: 'codicon-debug-breakpoint-conditional',
|
|
60
|
-
message: message || [nls.
|
|
60
|
+
message: message || [nls.localize('theia/debug/conditionalBreakpoint', 'Conditional Breakpoint')]
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
63
|
return {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import * as React from '@theia/core/shared/react';
|
|
18
18
|
import { DebugProtocol } from '@vscode/debugprotocol/lib/debugProtocol';
|
|
19
|
-
import { RecursivePartial } from '@theia/core';
|
|
19
|
+
import { nls, RecursivePartial } from '@theia/core';
|
|
20
20
|
import URI from '@theia/core/lib/common/uri';
|
|
21
21
|
import { EditorWidget, Range } from '@theia/editor/lib/browser';
|
|
22
22
|
import { TREE_NODE_INFO_CLASS, WidgetOpenerOptions } from '@theia/core/lib/browser';
|
|
@@ -163,21 +163,24 @@ export class DebugSourceBreakpoint extends DebugBreakpoint<SourceBreakpoint> imp
|
|
|
163
163
|
const { session } = this;
|
|
164
164
|
if (this.logMessage) {
|
|
165
165
|
if (session && !session.capabilities.supportsLogPoints) {
|
|
166
|
-
return this.getUnsupportedBreakpointDecoration('
|
|
166
|
+
return this.getUnsupportedBreakpointDecoration(nls.localize('theia/debug/logpointsNotSupported',
|
|
167
|
+
'Logpoints not supported by this debug type'));
|
|
167
168
|
}
|
|
168
|
-
messages.push('Log Message: '
|
|
169
|
+
messages.push(nls.localizeByDefault('Log Message: {0}', this.logMessage));
|
|
169
170
|
}
|
|
170
171
|
if (this.condition) {
|
|
171
172
|
if (session && !session.capabilities.supportsConditionalBreakpoints) {
|
|
172
|
-
return this.getUnsupportedBreakpointDecoration('
|
|
173
|
+
return this.getUnsupportedBreakpointDecoration(nls.localize('theia/debug/conditionalBreakpointsNotSupported',
|
|
174
|
+
'Conditional breakpoints not supported by this debug type'));
|
|
173
175
|
}
|
|
174
|
-
messages.push('
|
|
176
|
+
messages.push(nls.localizeByDefault('Condition: {0}', this.condition));
|
|
175
177
|
}
|
|
176
178
|
if (this.hitCondition) {
|
|
177
179
|
if (session && !session.capabilities.supportsHitConditionalBreakpoints) {
|
|
178
|
-
return this.getUnsupportedBreakpointDecoration('
|
|
180
|
+
return this.getUnsupportedBreakpointDecoration(nls.localize('theia/debug/htiConditionalBreakpointsNotSupported',
|
|
181
|
+
'Hit conditional breakpoints not supported by this debug type'));
|
|
179
182
|
}
|
|
180
|
-
messages.push('Hit Count: '
|
|
183
|
+
messages.push(nls.localizeByDefault('Hit Count: {0}', this.hitCondition));
|
|
181
184
|
}
|
|
182
185
|
}
|
|
183
186
|
return super.doGetDecoration(messages);
|
|
@@ -194,18 +197,18 @@ export class DebugSourceBreakpoint extends DebugBreakpoint<SourceBreakpoint> imp
|
|
|
194
197
|
if (this.logMessage) {
|
|
195
198
|
return {
|
|
196
199
|
className: 'codicon-debug-breakpoint-log',
|
|
197
|
-
message: message || ['Logpoint']
|
|
200
|
+
message: message || [nls.localizeByDefault('Logpoint')]
|
|
198
201
|
};
|
|
199
202
|
}
|
|
200
203
|
if (this.condition || this.hitCondition) {
|
|
201
204
|
return {
|
|
202
205
|
className: 'codicon-debug-breakpoint-conditional',
|
|
203
|
-
message: message || ['Conditional Breakpoint']
|
|
206
|
+
message: message || [nls.localize('theia/debug/conditionalBreakpoint', 'Conditional Breakpoint')]
|
|
204
207
|
};
|
|
205
208
|
}
|
|
206
209
|
return {
|
|
207
210
|
className: 'codicon-debug-breakpoint',
|
|
208
|
-
message: message || ['Breakpoint']
|
|
211
|
+
message: message || [nls.localizeByDefault('Breakpoint')]
|
|
209
212
|
};
|
|
210
213
|
}
|
|
211
214
|
|
|
@@ -127,7 +127,7 @@ export class DebugThread extends DebugThreadData implements TreeElement {
|
|
|
127
127
|
const response: DebugProtocol.GotoTargetsResponse = await this.session.sendRequest('gotoTargets', { source, line: position.lineNumber, column: position.column });
|
|
128
128
|
|
|
129
129
|
if (response && response.body.targets.length === 0) {
|
|
130
|
-
this.session.showMessage(MessageType.Warning, 'No executable code is associated at the current cursor position.');
|
|
130
|
+
this.session.showMessage(MessageType.Warning, nls.localizeByDefault('No executable code is associated at the current cursor position.'));
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -20,6 +20,7 @@ import { TreeSource, TreeElement } from '@theia/core/lib/browser/source-tree';
|
|
|
20
20
|
import { DebugThread } from '../model/debug-thread';
|
|
21
21
|
import { DebugViewModel } from './debug-view-model';
|
|
22
22
|
import debounce = require('p-debounce');
|
|
23
|
+
import { nls } from '@theia/core';
|
|
23
24
|
|
|
24
25
|
@injectable()
|
|
25
26
|
export class DebugStackFramesSource extends TreeSource {
|
|
@@ -62,7 +63,7 @@ export class LoadMoreStackFrames implements TreeElement {
|
|
|
62
63
|
) { }
|
|
63
64
|
|
|
64
65
|
render(): React.ReactNode {
|
|
65
|
-
return <span className='theia-load-more-frames'>Load More Stack Frames</span>;
|
|
66
|
+
return <span className='theia-load-more-frames'>{nls.localizeByDefault('Load More Stack Frames')}</span>;
|
|
66
67
|
}
|
|
67
68
|
|
|
68
69
|
async open(): Promise<void> {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import debounce from 'p-debounce';
|
|
18
18
|
import { injectable, inject, postConstruct } from '@theia/core/shared/inversify';
|
|
19
|
-
import { Disposable, DisposableCollection, Event, Emitter, deepClone } from '@theia/core/lib/common';
|
|
19
|
+
import { Disposable, DisposableCollection, Event, Emitter, deepClone, nls } from '@theia/core/lib/common';
|
|
20
20
|
import URI from '@theia/core/lib/common/uri';
|
|
21
21
|
import { DebugSession, DebugState } from '../debug-session';
|
|
22
22
|
import { DebugSessionManager } from '../debug-session-manager';
|
|
@@ -78,7 +78,7 @@ export class DebugViewModel implements Disposable {
|
|
|
78
78
|
return this.session && this.session.id || '-1';
|
|
79
79
|
}
|
|
80
80
|
get label(): string {
|
|
81
|
-
return this.session && this.session.label || 'Unknown Session';
|
|
81
|
+
return this.session && this.session.label || nls.localize('theia/debug/unknownSession', 'Unknown Session');
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
@postConstruct()
|
|
@@ -51,12 +51,12 @@ export const debugPreferencesSchema: PreferenceSchema = {
|
|
|
51
51
|
default: 'onFirstSessionStart'
|
|
52
52
|
},
|
|
53
53
|
'debug.confirmOnExit': {
|
|
54
|
-
description: 'Controls whether to confirm when the window closes if there are active debug sessions.',
|
|
54
|
+
description: nls.localizeByDefault('Controls whether to confirm when the window closes if there are active debug sessions.'),
|
|
55
55
|
type: 'string',
|
|
56
56
|
enum: ['never', 'always'],
|
|
57
57
|
enumDescriptions: [
|
|
58
|
-
'Never confirm.',
|
|
59
|
-
'Always confirm if there are debug sessions.',
|
|
58
|
+
nls.localizeByDefault('Never confirm.'),
|
|
59
|
+
nls.localizeByDefault('Always confirm if there are debug sessions.'),
|
|
60
60
|
],
|
|
61
61
|
default: 'never'
|
|
62
62
|
},
|