@codingame/monaco-vscode-debug-service-override 9.0.3 → 10.0.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/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +160 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +22 -22
- package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +133 -136
- package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +12 -17
- package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +12 -13
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +23 -26
- package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +35 -36
- package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +21 -28
- package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +29 -42
- package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +10 -10
- package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +1 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +11 -12
- package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +55 -67
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +58 -58
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSettingMigration.js +3 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +5 -7
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +35 -42
- package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +1 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +17 -21
- package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +8 -8
- package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +13 -15
- package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +8 -9
- package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +3 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +12 -13
- package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +5 -5
- package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +66 -71
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibilityHelp.js +12 -14
- package/vscode/src/vs/workbench/contrib/debug/browser/replAccessibleView.js +4 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +2 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +40 -45
- package/vscode/src/vs/workbench/contrib/debug/browser/runAndDebugAccessibilityHelp.js +20 -22
- package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +5 -6
- package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +39 -48
- package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +34 -35
- package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +9 -10
- package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +3 -3
- package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +44 -44
- package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +24 -24
- package/vscode/src/vs/workbench/contrib/debug/common/debugVisualizers.js +5 -4
- package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +11 -11
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +2 -2
- package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +0 -347
|
@@ -12,26 +12,19 @@ import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/c
|
|
|
12
12
|
import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs.service';
|
|
13
13
|
import { MarkerSeverity } from 'vscode/vscode/vs/platform/markers/common/markers';
|
|
14
14
|
import { IMarkerService } from 'vscode/vscode/vs/platform/markers/common/markers.service';
|
|
15
|
-
import { ProgressLocation } from 'vscode/vscode/vs/platform/progress/common/progress';
|
|
16
15
|
import { IProgressService } from 'vscode/vscode/vs/platform/progress/common/progress.service';
|
|
17
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
18
16
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
19
17
|
import { DEBUG_CONFIGURE_COMMAND_ID, DEBUG_CONFIGURE_LABEL } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugCommands';
|
|
20
18
|
import { Markers } from 'vscode/vscode/vs/workbench/contrib/markers/common/markers';
|
|
21
|
-
import {
|
|
19
|
+
import { CustomTask, ConfiguringTask } from 'vscode/vscode/vs/workbench/contrib/tasks/common/tasks';
|
|
22
20
|
import { ITaskService } from 'vscode/vscode/vs/workbench/contrib/tasks/common/taskService.service';
|
|
23
21
|
import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService.service';
|
|
24
22
|
|
|
25
23
|
const onceFilter = (event, filter) => Event.once(Event.filter(event, filter));
|
|
26
|
-
var TaskRunResult;
|
|
27
|
-
( ((function(TaskRunResult) {
|
|
28
|
-
TaskRunResult[TaskRunResult["Failure"] = 0] = "Failure";
|
|
29
|
-
TaskRunResult[TaskRunResult["Success"] = 1] = "Success";
|
|
30
|
-
})(TaskRunResult || (TaskRunResult = {}))));
|
|
31
24
|
const DEBUG_TASK_ERROR_CHOICE_KEY = 'debug.taskerrorchoice';
|
|
32
|
-
const ABORT_LABEL = ( localize(
|
|
33
|
-
const DEBUG_ANYWAY_LABEL = ( localize(
|
|
34
|
-
const DEBUG_ANYWAY_LABEL_NO_MEMO = ( localize(
|
|
25
|
+
const ABORT_LABEL = ( localize(5800, "Abort"));
|
|
26
|
+
const DEBUG_ANYWAY_LABEL = ( localize(5801, "&&Debug Anyway"));
|
|
27
|
+
const DEBUG_ANYWAY_LABEL_NO_MEMO = ( localize(5802, "Debug Anyway"));
|
|
35
28
|
let DebugTaskRunner = class DebugTaskRunner {
|
|
36
29
|
constructor(taskService, markerService, configurationService, viewsService, dialogService, storageService, commandService, progressService) {
|
|
37
30
|
this.taskService = taskService;
|
|
@@ -55,35 +48,35 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
55
48
|
try {
|
|
56
49
|
const taskSummary = await this.runTask(root, taskId, this.globalCancellation.token);
|
|
57
50
|
if (taskSummary && (taskSummary.exitCode === undefined || taskSummary.cancelled)) {
|
|
58
|
-
return
|
|
51
|
+
return 0 ;
|
|
59
52
|
}
|
|
60
53
|
const errorCount = taskId ? this.markerService.read({ severities: MarkerSeverity.Error, take: 2 }).length : 0;
|
|
61
54
|
const successExitCode = taskSummary && taskSummary.exitCode === 0;
|
|
62
55
|
const failureExitCode = taskSummary && taskSummary.exitCode !== 0;
|
|
63
56
|
const onTaskErrors = this.configurationService.getValue('debug').onTaskErrors;
|
|
64
57
|
if (successExitCode || onTaskErrors === 'debugAnyway' || (errorCount === 0 && !failureExitCode)) {
|
|
65
|
-
return
|
|
58
|
+
return 1 ;
|
|
66
59
|
}
|
|
67
60
|
if (onTaskErrors === 'showErrors') {
|
|
68
61
|
await this.viewsService.openView(Markers.MARKERS_VIEW_ID, true);
|
|
69
|
-
return Promise.resolve(
|
|
62
|
+
return Promise.resolve(0 );
|
|
70
63
|
}
|
|
71
64
|
if (onTaskErrors === 'abort') {
|
|
72
|
-
return Promise.resolve(
|
|
65
|
+
return Promise.resolve(0 );
|
|
73
66
|
}
|
|
74
67
|
const taskLabel = typeof taskId === 'string' ? taskId : taskId ? taskId.name : '';
|
|
75
68
|
const message = errorCount > 1
|
|
76
|
-
? ( localize(
|
|
69
|
+
? ( localize(5803, "Errors exist after running preLaunchTask '{0}'.", taskLabel))
|
|
77
70
|
: errorCount === 1
|
|
78
|
-
? ( localize(
|
|
71
|
+
? ( localize(5804, "Error exists after running preLaunchTask '{0}'.", taskLabel))
|
|
79
72
|
: taskSummary && typeof taskSummary.exitCode === 'number'
|
|
80
73
|
? ( localize(
|
|
81
|
-
|
|
74
|
+
5805,
|
|
82
75
|
"The preLaunchTask '{0}' terminated with exit code {1}.",
|
|
83
76
|
taskLabel,
|
|
84
77
|
taskSummary.exitCode
|
|
85
78
|
))
|
|
86
|
-
: ( localize(
|
|
79
|
+
: ( localize(5806, "The preLaunchTask '{0}' terminated.", taskLabel));
|
|
87
80
|
let DebugChoice;
|
|
88
81
|
( ((function(DebugChoice) {
|
|
89
82
|
DebugChoice[DebugChoice["DebugAnyway"] = 1] = "DebugAnyway";
|
|
@@ -99,7 +92,7 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
99
92
|
run: () => DebugChoice.DebugAnyway
|
|
100
93
|
},
|
|
101
94
|
{
|
|
102
|
-
label: ( localize(
|
|
95
|
+
label: ( localize(5807, "&&Show Errors")),
|
|
103
96
|
run: () => DebugChoice.ShowErrors
|
|
104
97
|
}
|
|
105
98
|
],
|
|
@@ -108,7 +101,7 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
108
101
|
run: () => DebugChoice.Cancel
|
|
109
102
|
},
|
|
110
103
|
checkbox: {
|
|
111
|
-
label: ( localize(
|
|
104
|
+
label: ( localize(5808, "Remember my choice in user settings")),
|
|
112
105
|
}
|
|
113
106
|
});
|
|
114
107
|
const debugAnyway = result === DebugChoice.DebugAnyway;
|
|
@@ -117,17 +110,17 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
117
110
|
this.configurationService.updateValue('debug.onTaskErrors', result === DebugChoice.DebugAnyway ? 'debugAnyway' : abort ? 'abort' : 'showErrors');
|
|
118
111
|
}
|
|
119
112
|
if (abort) {
|
|
120
|
-
return Promise.resolve(
|
|
113
|
+
return Promise.resolve(0 );
|
|
121
114
|
}
|
|
122
115
|
if (debugAnyway) {
|
|
123
|
-
return
|
|
116
|
+
return 1 ;
|
|
124
117
|
}
|
|
125
118
|
await this.viewsService.openView(Markers.MARKERS_VIEW_ID, true);
|
|
126
|
-
return Promise.resolve(
|
|
119
|
+
return Promise.resolve(0 );
|
|
127
120
|
}
|
|
128
121
|
catch (err) {
|
|
129
122
|
const taskConfigureAction = this.taskService.configureAction();
|
|
130
|
-
const choiceMap = JSON.parse(this.storageService.get(DEBUG_TASK_ERROR_CHOICE_KEY,
|
|
123
|
+
const choiceMap = JSON.parse(this.storageService.get(DEBUG_TASK_ERROR_CHOICE_KEY, 1 , '{}'));
|
|
131
124
|
let choice = -1;
|
|
132
125
|
let DebugChoice;
|
|
133
126
|
( ((function(DebugChoice) {
|
|
@@ -144,7 +137,7 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
144
137
|
message: err.message,
|
|
145
138
|
buttons: [
|
|
146
139
|
{
|
|
147
|
-
label: ( localize(
|
|
140
|
+
label: ( localize(5801, "&&Debug Anyway")),
|
|
148
141
|
run: () => DebugChoice.DebugAnyway
|
|
149
142
|
},
|
|
150
143
|
{
|
|
@@ -156,19 +149,19 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
156
149
|
run: () => DebugChoice.Cancel
|
|
157
150
|
},
|
|
158
151
|
checkbox: {
|
|
159
|
-
label: ( localize(
|
|
152
|
+
label: ( localize(5809, "Remember my choice for this task"))
|
|
160
153
|
}
|
|
161
154
|
});
|
|
162
155
|
choice = result;
|
|
163
156
|
if (checkboxChecked) {
|
|
164
157
|
choiceMap[err.message] = choice;
|
|
165
|
-
this.storageService.store(DEBUG_TASK_ERROR_CHOICE_KEY, JSON.stringify(choiceMap),
|
|
158
|
+
this.storageService.store(DEBUG_TASK_ERROR_CHOICE_KEY, JSON.stringify(choiceMap), 1 , 1 );
|
|
166
159
|
}
|
|
167
160
|
}
|
|
168
161
|
if (choice === DebugChoice.ConfigureTask) {
|
|
169
162
|
await taskConfigureAction.run();
|
|
170
163
|
}
|
|
171
|
-
return choice === DebugChoice.DebugAnyway ?
|
|
164
|
+
return choice === DebugChoice.DebugAnyway ? 1 : 0 ;
|
|
172
165
|
}
|
|
173
166
|
}
|
|
174
167
|
async runTask(root, taskId, token = this.globalCancellation.token) {
|
|
@@ -177,7 +170,7 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
177
170
|
}
|
|
178
171
|
if (!root) {
|
|
179
172
|
return Promise.reject(( (new Error(( localize(
|
|
180
|
-
|
|
173
|
+
5810,
|
|
181
174
|
"Task '{0}' can not be referenced from a launch configuration that is in a different workspace folder.",
|
|
182
175
|
typeof taskId === 'string' ? taskId : taskId.type
|
|
183
176
|
))))));
|
|
@@ -185,8 +178,8 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
185
178
|
const task = await this.taskService.getTask(root, taskId);
|
|
186
179
|
if (!task) {
|
|
187
180
|
const errorMessage = typeof taskId === 'string'
|
|
188
|
-
? ( localize(
|
|
189
|
-
: ( localize(
|
|
181
|
+
? ( localize(5811, "Could not find the task '{0}'.", taskId))
|
|
182
|
+
: ( localize(5812, "Could not find the specified task."));
|
|
190
183
|
return Promise.reject(createErrorWithActions(errorMessage, [( (new Action(
|
|
191
184
|
DEBUG_CONFIGURE_COMMAND_ID,
|
|
192
185
|
DEBUG_CONFIGURE_LABEL,
|
|
@@ -201,19 +194,19 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
201
194
|
const taskKey = getTaskKey(task);
|
|
202
195
|
const inactivePromise = ( (new Promise(
|
|
203
196
|
(resolve) => store.add(onceFilter(this.taskService.onDidStateChange, e => {
|
|
204
|
-
return (e.kind ===
|
|
205
|
-
|| (e.kind ===
|
|
197
|
+
return (e.kind === "inactive"
|
|
198
|
+
|| (e.kind === "processEnded" && e.exitCode === undefined))
|
|
206
199
|
&& getTaskKey(e.__task) === taskKey;
|
|
207
200
|
})(e => {
|
|
208
201
|
taskStarted = true;
|
|
209
|
-
resolve(e.kind ===
|
|
202
|
+
resolve(e.kind === "processEnded" ? { exitCode: e.exitCode } : null);
|
|
210
203
|
}))
|
|
211
204
|
)));
|
|
212
|
-
store.add(onceFilter(this.taskService.onDidStateChange, e => ((e.kind ===
|
|
205
|
+
store.add(onceFilter(this.taskService.onDidStateChange, e => (((e.kind === "active") ) || ((e.kind === "dependsOnStarted") )) && getTaskKey(e.__task) === taskKey)(() => {
|
|
213
206
|
taskStarted = true;
|
|
214
207
|
}));
|
|
215
208
|
const didAcquireInput = store.add(( (new Emitter())));
|
|
216
|
-
store.add(onceFilter(this.taskService.onDidStateChange, e => (e.kind ===
|
|
209
|
+
store.add(onceFilter(this.taskService.onDidStateChange, e => ((e.kind === "acquiredInput") ) && getTaskKey(e.__task) === taskKey)(() => didAcquireInput.fire()));
|
|
217
210
|
const taskDonePromise = this.taskService.getActiveTasks().then(async (tasks) => {
|
|
218
211
|
if (tasks.find(t => getTaskKey(t) === taskKey)) {
|
|
219
212
|
didAcquireInput.fire();
|
|
@@ -244,7 +237,7 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
244
237
|
store.add(disposableTimeout(() => {
|
|
245
238
|
if (!taskStarted) {
|
|
246
239
|
const errorMessage = ( localize(
|
|
247
|
-
|
|
240
|
+
5813,
|
|
248
241
|
"The task '{0}' has not exited and doesn't have a 'problemMatcher' defined. Make sure to define a problem matcher for watch tasks.",
|
|
249
242
|
typeof taskId === 'string' ? taskId : JSON.stringify(taskId)
|
|
250
243
|
));
|
|
@@ -253,16 +246,16 @@ let DebugTaskRunner = class DebugTaskRunner {
|
|
|
253
246
|
}, waitTime));
|
|
254
247
|
store.add(disposableTimeout(() => {
|
|
255
248
|
const message = ( localize(
|
|
256
|
-
|
|
249
|
+
5814,
|
|
257
250
|
"Waiting for preLaunchTask '{0}'...",
|
|
258
251
|
task.configurationProperties.name
|
|
259
252
|
));
|
|
260
253
|
const buttons = [DEBUG_ANYWAY_LABEL_NO_MEMO, ABORT_LABEL];
|
|
261
254
|
const canConfigure = task instanceof CustomTask || task instanceof ConfiguringTask;
|
|
262
255
|
if (canConfigure) {
|
|
263
|
-
buttons.splice(1, 0, ( localize(
|
|
256
|
+
buttons.splice(1, 0, ( localize(5815, "Configure Task")));
|
|
264
257
|
}
|
|
265
|
-
this.progressService.withProgress({ location:
|
|
258
|
+
this.progressService.withProgress({ location: 15 , title: message, buttons }, () => result.catch(() => { }), (choice) => {
|
|
266
259
|
if (choice === undefined) ;
|
|
267
260
|
else if (choice === 0) {
|
|
268
261
|
resolve({ exitCode: 0 });
|
|
@@ -292,4 +285,4 @@ DebugTaskRunner = ( (__decorate([
|
|
|
292
285
|
( (__param(7, IProgressService)))
|
|
293
286
|
], DebugTaskRunner)));
|
|
294
287
|
|
|
295
|
-
export { DebugTaskRunner
|
|
288
|
+
export { DebugTaskRunner };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
|
-
import { State } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
3
2
|
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
4
3
|
import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
5
4
|
import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host.service';
|
|
@@ -9,7 +8,7 @@ let DebugTitleContribution = class DebugTitleContribution {
|
|
|
9
8
|
constructor(debugService, hostService, titleService) {
|
|
10
9
|
this.toDispose = [];
|
|
11
10
|
const updateTitle = () => {
|
|
12
|
-
if (debugService.state ===
|
|
11
|
+
if (debugService.state === 2 && !hostService.hasFocus) {
|
|
13
12
|
titleService.updateProperties({ prefix: '🔴' });
|
|
14
13
|
}
|
|
15
14
|
else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __param } from 'vscode/external/tslib/tslib.es6.js';
|
|
2
2
|
import { $, append, addDisposableGenericMouseUpListener, getWindow, addDisposableGenericMouseDownListener, addDisposableGenericMouseMoveListener, addDisposableListener, EventType, show, hide } from 'vscode/vscode/vs/base/browser/dom';
|
|
3
3
|
import { StandardMouseEvent } from 'vscode/vscode/vs/base/browser/mouseEvent';
|
|
4
|
-
import { ActionBar
|
|
4
|
+
import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
5
5
|
import { Action } from 'vscode/vscode/vs/base/common/actions';
|
|
6
6
|
import { equals } from 'vscode/vscode/vs/base/common/arrays';
|
|
7
7
|
import { RunOnceScheduler } from 'vscode/vscode/vs/base/common/async';
|
|
@@ -16,10 +16,8 @@ import { IMenuService } from 'vscode/vscode/vs/platform/actions/common/actions.s
|
|
|
16
16
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
17
17
|
import { ContextKeyExpr } from 'vscode/vscode/vs/platform/contextkey/common/contextkey';
|
|
18
18
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
19
|
-
import { IContextMenuService } from 'vscode/vscode/vs/platform/contextview/browser/contextView.service';
|
|
20
19
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
21
20
|
import { INotificationService } from 'vscode/vscode/vs/platform/notification/common/notification.service';
|
|
22
|
-
import { StorageScope, StorageTarget } from 'vscode/vscode/vs/platform/storage/common/storage';
|
|
23
21
|
import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage.service';
|
|
24
22
|
import { ITelemetryService } from 'vscode/vscode/vs/platform/telemetry/common/telemetry.service';
|
|
25
23
|
import 'vscode/vscode/vs/platform/theme/common/colorUtils';
|
|
@@ -40,9 +38,8 @@ import { FocusSessionActionViewItem } from './debugActionViewItems.js';
|
|
|
40
38
|
import { debugToolBarBackground, debugToolBarBorder } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugColors';
|
|
41
39
|
import { FOCUS_SESSION_ID, STOP_ID, DISCONNECT_ID, CONTINUE_ID, CONTINUE_LABEL, PAUSE_ID, PAUSE_LABEL, STOP_LABEL, DISCONNECT_LABEL, STEP_OVER_ID, STEP_OVER_LABEL, STEP_INTO_ID, STEP_INTO_LABEL, STEP_OUT_ID, STEP_OUT_LABEL, RESTART_SESSION_ID, RESTART_LABEL, STEP_BACK_ID, REVERSE_CONTINUE_ID, FOCUS_SESSION_LABEL, DISCONNECT_AND_SUSPEND_ID, DISCONNECT_AND_SUSPEND_LABEL } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugCommands';
|
|
42
40
|
import { debugGripper, debugContinue, debugPause, debugStop, debugDisconnect, debugStepOver, debugStepInto, debugStepOut, debugRestart, debugStepBack, debugReverseContinue } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
|
|
43
|
-
import {
|
|
41
|
+
import { VIEWLET_ID, CONTEXT_DEBUG_STATE, CONTEXT_IN_DEBUG_MODE, CONTEXT_FOCUSED_SESSION_IS_NO_DEBUG, CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_TERMINATE_DEBUGGEE_SUPPORTED, CONTEXT_STEP_BACK_SUPPORTED, CONTEXT_MULTI_SESSION_DEBUG, CONTEXT_SUSPEND_DEBUGGEE_SUPPORTED } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
44
42
|
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
45
|
-
import { LayoutSettings, Parts, EditorTabsMode } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService';
|
|
46
43
|
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
47
44
|
import { Codicon } from 'vscode/vscode/vs/base/common/codicons';
|
|
48
45
|
import { mainWindow } from 'vscode/vscode/vs/base/browser/window';
|
|
@@ -74,7 +71,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
74
71
|
this._register(this.debugToolBarMenu);
|
|
75
72
|
this.activeActions = [];
|
|
76
73
|
this.actionBar = this._register(( (new ActionBar(actionBarContainer, {
|
|
77
|
-
orientation:
|
|
74
|
+
orientation: 0 ,
|
|
78
75
|
actionViewItemProvider: (action, options) => {
|
|
79
76
|
if (action.id === FOCUS_SESSION_ID) {
|
|
80
77
|
return this.instantiationService.createInstance(FocusSessionActionViewItem, action, undefined);
|
|
@@ -92,10 +89,10 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
92
89
|
this.updateScheduler = this._register(( (new RunOnceScheduler(() => {
|
|
93
90
|
const state = this.debugService.state;
|
|
94
91
|
const toolBarLocation = this.configurationService.getValue('debug').toolBarLocation;
|
|
95
|
-
if (state ===
|
|
92
|
+
if (state === 0 ||
|
|
96
93
|
toolBarLocation !== 'floating' ||
|
|
97
94
|
this.debugService.getModel().getSessions().every(s => s.suppressDebugToolbar) ||
|
|
98
|
-
(state ===
|
|
95
|
+
(state === 1 && this.debugService.initializingOptions?.suppressDebugToolbar)) {
|
|
99
96
|
return this.hide();
|
|
100
97
|
}
|
|
101
98
|
const actions = [];
|
|
@@ -117,7 +114,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
117
114
|
if (e.affectsConfiguration('debug.toolBarLocation')) {
|
|
118
115
|
this.updateScheduler.schedule();
|
|
119
116
|
}
|
|
120
|
-
if (e.affectsConfiguration(
|
|
117
|
+
if (e.affectsConfiguration("workbench.editor.showTabs" ) || e.affectsConfiguration("window.commandCenter" )) {
|
|
121
118
|
this._yRange = undefined;
|
|
122
119
|
this.setCoordinates();
|
|
123
120
|
}
|
|
@@ -176,8 +173,8 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
176
173
|
const y = rect.top;
|
|
177
174
|
const x = rect.left / activeWindow.innerWidth;
|
|
178
175
|
if (isMainWindow) {
|
|
179
|
-
this.storageService.store(DEBUG_TOOLBAR_POSITION_KEY, x,
|
|
180
|
-
this.storageService.store(DEBUG_TOOLBAR_Y_KEY, y,
|
|
176
|
+
this.storageService.store(DEBUG_TOOLBAR_POSITION_KEY, x, 0 , 1 );
|
|
177
|
+
this.storageService.store(DEBUG_TOOLBAR_Y_KEY, y, 0 , 1 );
|
|
181
178
|
}
|
|
182
179
|
else {
|
|
183
180
|
this.auxWindowCoordinates.set(activeWindow, { x, y });
|
|
@@ -209,7 +206,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
209
206
|
const isMainWindow = currentWindow === mainWindow;
|
|
210
207
|
if (x === undefined) {
|
|
211
208
|
const positionPercentage = isMainWindow
|
|
212
|
-
? Number(this.storageService.get(DEBUG_TOOLBAR_POSITION_KEY,
|
|
209
|
+
? Number(this.storageService.get(DEBUG_TOOLBAR_POSITION_KEY, 0 ))
|
|
213
210
|
: this.auxWindowCoordinates.get(currentWindow)?.x;
|
|
214
211
|
x = positionPercentage !== undefined && !isNaN(positionPercentage)
|
|
215
212
|
? positionPercentage * currentWindow.innerWidth
|
|
@@ -219,7 +216,7 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
219
216
|
this.$el.style.left = `${x}px`;
|
|
220
217
|
if (y === undefined) {
|
|
221
218
|
y = isMainWindow
|
|
222
|
-
? this.storageService.getNumber(DEBUG_TOOLBAR_Y_KEY,
|
|
219
|
+
? this.storageService.getNumber(DEBUG_TOOLBAR_Y_KEY, 0 )
|
|
223
220
|
: this.auxWindowCoordinates.get(currentWindow)?.y;
|
|
224
221
|
}
|
|
225
222
|
this.setYCoordinate(y ?? this.yDefault);
|
|
@@ -234,18 +231,18 @@ let DebugToolBar = class DebugToolBar extends Themable {
|
|
|
234
231
|
}
|
|
235
232
|
get yRange() {
|
|
236
233
|
if (!this._yRange) {
|
|
237
|
-
const isTitleBarVisible = this.layoutService.isVisible(
|
|
234
|
+
const isTitleBarVisible = this.layoutService.isVisible("workbench.parts.titlebar" , getWindow(this.layoutService.activeContainer));
|
|
238
235
|
const yMin = isTitleBarVisible ? 0 : this.layoutService.mainContainerOffset.top;
|
|
239
236
|
let yMax = 0;
|
|
240
237
|
if (isTitleBarVisible) {
|
|
241
|
-
if (this.configurationService.getValue(
|
|
238
|
+
if (this.configurationService.getValue("window.commandCenter" ) === true) {
|
|
242
239
|
yMax += 35;
|
|
243
240
|
}
|
|
244
241
|
else {
|
|
245
242
|
yMax += 28;
|
|
246
243
|
}
|
|
247
244
|
}
|
|
248
|
-
if (this.configurationService.getValue(
|
|
245
|
+
if (this.configurationService.getValue("workbench.editor.showTabs" ) !== "none" ) {
|
|
249
246
|
yMax += 35;
|
|
250
247
|
}
|
|
251
248
|
this._yRange = [yMin, yMax];
|
|
@@ -294,15 +291,14 @@ function createDisconnectMenuItemAction(action, disposables, accessor, options)
|
|
|
294
291
|
const menuService = accessor.get(IMenuService);
|
|
295
292
|
const contextKeyService = accessor.get(IContextKeyService);
|
|
296
293
|
const instantiationService = accessor.get(IInstantiationService);
|
|
297
|
-
const contextMenuService = accessor.get(IContextMenuService);
|
|
298
294
|
const menu = menuService.getMenuActions(MenuId.DebugToolBarStop, contextKeyService, { shouldForwardArgs: true });
|
|
299
295
|
const secondary = [];
|
|
300
296
|
createAndFillInActionBarActions(menu, secondary);
|
|
301
297
|
if (!secondary.length) {
|
|
302
298
|
return undefined;
|
|
303
299
|
}
|
|
304
|
-
const dropdownAction = disposables.add(( (new Action('notebook.moreRunActions', ( localize(
|
|
305
|
-
const item = instantiationService.createInstance(DropdownWithPrimaryActionViewItem, action, dropdownAction, secondary, 'debug-stop-actions',
|
|
300
|
+
const dropdownAction = disposables.add(( (new Action('notebook.moreRunActions', ( localize(6044, "More...")), 'codicon-chevron-down', true))));
|
|
301
|
+
const item = instantiationService.createInstance(DropdownWithPrimaryActionViewItem, action, dropdownAction, secondary, 'debug-stop-actions', options);
|
|
306
302
|
return item;
|
|
307
303
|
}
|
|
308
304
|
const debugViewTitleItems = [];
|
|
@@ -375,8 +371,8 @@ registerDebugToolBarItem(STEP_OVER_ID, STEP_OVER_LABEL, 20, debugStepOver, undef
|
|
|
375
371
|
registerDebugToolBarItem(STEP_INTO_ID, STEP_INTO_LABEL, 30, debugStepInto, undefined, ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))));
|
|
376
372
|
registerDebugToolBarItem(STEP_OUT_ID, STEP_OUT_LABEL, 40, debugStepOut, undefined, ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))));
|
|
377
373
|
registerDebugToolBarItem(RESTART_SESSION_ID, RESTART_LABEL, 60, debugRestart);
|
|
378
|
-
registerDebugToolBarItem(STEP_BACK_ID, ( localize(
|
|
379
|
-
registerDebugToolBarItem(REVERSE_CONTINUE_ID, ( localize(
|
|
374
|
+
registerDebugToolBarItem(STEP_BACK_ID, ( localize(6045, "Step Back")), 50, debugStepBack, CONTEXT_STEP_BACK_SUPPORTED, ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))));
|
|
375
|
+
registerDebugToolBarItem(REVERSE_CONTINUE_ID, ( localize(6046, "Reverse")), 55, debugReverseContinue, CONTEXT_STEP_BACK_SUPPORTED, ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))));
|
|
380
376
|
registerDebugToolBarItem(FOCUS_SESSION_ID, FOCUS_SESSION_LABEL, 100, Codicon.listTree, ( (ContextKeyExpr.and(
|
|
381
377
|
CONTEXT_MULTI_SESSION_DEBUG,
|
|
382
378
|
(CONTEXT_TOOLBAR_COMMAND_CENTER.negate())
|
|
@@ -24,7 +24,7 @@ import { DEBUG_START_COMMAND_ID, FOCUS_SESSION_ID, STOP_ID, DISCONNECT_ID, DEBUG
|
|
|
24
24
|
import { debugConfigure } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
|
|
25
25
|
import { createDisconnectMenuItemAction } from './debugToolBar.js';
|
|
26
26
|
import { WelcomeView } from './welcomeView.js';
|
|
27
|
-
import { VIEWLET_ID, CONTEXT_DEBUG_UX_KEY,
|
|
27
|
+
import { VIEWLET_ID, CONTEXT_DEBUG_UX_KEY, BREAKPOINTS_VIEW_ID, CONTEXT_DEBUG_UX, CONTEXT_DEBUG_STATE, getStateLabel, CONTEXT_DEBUGGERS_AVAILABLE, REPL_VIEW_ID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
28
28
|
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
29
29
|
import { IExtensionService } from 'vscode/vscode/vs/workbench/services/extensions/common/extensions.service';
|
|
30
30
|
import { IWorkbenchLayoutService } from 'vscode/vscode/vs/workbench/services/layout/browser/layoutService.service';
|
|
@@ -100,7 +100,7 @@ let DebugViewPaneContainer = class DebugViewPaneContainer extends ViewPaneContai
|
|
|
100
100
|
this.progressResolve();
|
|
101
101
|
this.progressResolve = undefined;
|
|
102
102
|
}
|
|
103
|
-
if (state ===
|
|
103
|
+
if (state === 1 ) {
|
|
104
104
|
this.progressService.withProgress({ location: VIEWLET_ID, }, _progress => {
|
|
105
105
|
return (
|
|
106
106
|
(new Promise(resolve => this.progressResolve = resolve))
|
|
@@ -167,7 +167,7 @@ MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
|
|
|
167
167
|
order: 10,
|
|
168
168
|
group: 'navigation',
|
|
169
169
|
command: {
|
|
170
|
-
precondition: ( (CONTEXT_DEBUG_STATE.notEqualsTo(getStateLabel(
|
|
170
|
+
precondition: ( (CONTEXT_DEBUG_STATE.notEqualsTo(getStateLabel(1 )))),
|
|
171
171
|
id: DEBUG_START_COMMAND_ID,
|
|
172
172
|
title: DEBUG_START_LABEL
|
|
173
173
|
}
|
|
@@ -179,10 +179,10 @@ registerAction2(class extends Action2 {
|
|
|
179
179
|
title: {
|
|
180
180
|
value: DEBUG_CONFIGURE_LABEL,
|
|
181
181
|
original: 'Open \'launch.json\'',
|
|
182
|
-
mnemonicTitle: ( localize(
|
|
182
|
+
mnemonicTitle: ( localize(6047, "Open &&Configurations"))
|
|
183
183
|
},
|
|
184
184
|
metadata: {
|
|
185
|
-
description: ( localize2(
|
|
185
|
+
description: ( localize2(6048, 'Opens the file used to configure how your program is debugged'))
|
|
186
186
|
},
|
|
187
187
|
f1: true,
|
|
188
188
|
icon: debugConfigure,
|
|
@@ -234,7 +234,7 @@ registerAction2(class extends Action2 {
|
|
|
234
234
|
const picked = await quickInputService.pick(picks, {
|
|
235
235
|
activeItem: picks[0],
|
|
236
236
|
placeHolder: ( localize(
|
|
237
|
-
|
|
237
|
+
6049,
|
|
238
238
|
"Select a workspace folder to create a launch.json file in or add it to the workspace config file"
|
|
239
239
|
))
|
|
240
240
|
});
|
|
@@ -252,7 +252,7 @@ registerAction2(class extends Action2 {
|
|
|
252
252
|
constructor() {
|
|
253
253
|
super({
|
|
254
254
|
id: 'debug.toggleReplIgnoreFocus',
|
|
255
|
-
title: ( localize(
|
|
255
|
+
title: ( localize(6050, "Debug Console")),
|
|
256
256
|
toggled: ( (ContextKeyExpr.has(`view.${REPL_VIEW_ID}.visible`))),
|
|
257
257
|
menu: [{
|
|
258
258
|
id: ViewsSubMenu,
|
|
@@ -284,7 +284,7 @@ MenuRegistry.appendMenuItem(MenuId.ViewContainerTitle, {
|
|
|
284
284
|
order: 10,
|
|
285
285
|
command: {
|
|
286
286
|
id: SELECT_AND_START_ID,
|
|
287
|
-
title: ( localize(
|
|
287
|
+
title: ( localize(6051, "Start Additional Session")),
|
|
288
288
|
}
|
|
289
289
|
});
|
|
290
290
|
|
|
@@ -5,7 +5,6 @@ import { binarySearch2 } from 'vscode/vscode/vs/base/common/arrays';
|
|
|
5
5
|
import { Emitter } from 'vscode/vscode/vs/base/common/event';
|
|
6
6
|
import { dispose, Disposable } from 'vscode/vscode/vs/base/common/lifecycle';
|
|
7
7
|
import { isAbsolute } from 'vscode/vscode/vs/base/common/path';
|
|
8
|
-
import { Constants } from 'vscode/vscode/vs/base/common/uint';
|
|
9
8
|
import { URI } from 'vscode/vscode/vs/base/common/uri';
|
|
10
9
|
import { applyFontInfo } from 'vscode/vscode/vs/editor/browser/config/domFontInfo';
|
|
11
10
|
import { isCodeEditor } from 'vscode/vscode/vs/editor/browser/editorBrowser';
|
|
@@ -16,7 +15,6 @@ import { ITextModelService } from 'vscode/vscode/vs/editor/common/services/resol
|
|
|
16
15
|
import { localize } from 'vscode/vscode/vs/nls';
|
|
17
16
|
import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration.service';
|
|
18
17
|
import { IContextKeyService } from 'vscode/vscode/vs/platform/contextkey/common/contextkey.service';
|
|
19
|
-
import { TextEditorSelectionRevealType } from 'vscode/vscode/vs/platform/editor/common/editor';
|
|
20
18
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
21
19
|
import { WorkbenchTable } from 'vscode/vscode/vs/platform/list/browser/listService';
|
|
22
20
|
import { ILogService } from 'vscode/vscode/vs/platform/log/common/log.service';
|
|
@@ -38,7 +36,7 @@ import { IUriIdentityService } from 'vscode/vscode/vs/platform/uriIdentity/commo
|
|
|
38
36
|
import { EditorPane } from 'vscode/vscode/vs/workbench/browser/parts/editor/editorPane';
|
|
39
37
|
import { topStackFrameColor, focusedStackFrameColor } from 'vscode/vscode/vs/workbench/contrib/debug/browser/callStackEditorContribution';
|
|
40
38
|
import { breakpoint, debugBreakpointHint, debugStackframe, debugStackframeFocused } from 'vscode/vscode/vs/workbench/contrib/debug/browser/debugIcons';
|
|
41
|
-
import { DISASSEMBLY_VIEW_ID,
|
|
39
|
+
import { DISASSEMBLY_VIEW_ID, CONTEXT_LANGUAGE_SUPPORTS_DISASSEMBLE_REQUEST } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
|
|
42
40
|
import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug.service';
|
|
43
41
|
import { InstructionBreakpoint } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugModel';
|
|
44
42
|
import { getUriFromSource } from 'vscode/vscode/vs/workbench/contrib/debug/common/debugSource';
|
|
@@ -56,7 +54,7 @@ const disassemblyNotAvailable = {
|
|
|
56
54
|
address: 0n,
|
|
57
55
|
instruction: {
|
|
58
56
|
address: '-1',
|
|
59
|
-
instruction: ( localize(
|
|
57
|
+
instruction: ( localize(6069, "Disassembly not available."))
|
|
60
58
|
},
|
|
61
59
|
};
|
|
62
60
|
let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
@@ -170,7 +168,7 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
170
168
|
project(row) { return row; }
|
|
171
169
|
},
|
|
172
170
|
{
|
|
173
|
-
label: ( localize(
|
|
171
|
+
label: ( localize(6070, "instructions")),
|
|
174
172
|
tooltip: '',
|
|
175
173
|
weight: 0.3,
|
|
176
174
|
templateId: InstructionRenderer.TEMPLATE_ID,
|
|
@@ -263,8 +261,8 @@ let DisassemblyView = class DisassemblyView extends EditorPane {
|
|
|
263
261
|
}
|
|
264
262
|
}));
|
|
265
263
|
this._register(this._debugService.onDidChangeState(e => {
|
|
266
|
-
if ((e ===
|
|
267
|
-
(this._previousDebuggingState !==
|
|
264
|
+
if (((e === 3 || e === 2) ) &&
|
|
265
|
+
((this._previousDebuggingState !== 3 && this._previousDebuggingState !== 2) )) {
|
|
268
266
|
this.clear();
|
|
269
267
|
this._enableSourceCodeRender = this._configurationService.getValue('debug').disassemblyView.showSourceCode;
|
|
270
268
|
}
|
|
@@ -696,21 +694,21 @@ let InstructionRenderer = class InstructionRenderer extends Disposable {
|
|
|
696
694
|
startLineNumber: instruction.line,
|
|
697
695
|
endLineNumber: instruction.endLine,
|
|
698
696
|
startColumn: instruction.column || 1,
|
|
699
|
-
endColumn: instruction.endColumn ||
|
|
697
|
+
endColumn: instruction.endColumn || 1073741824 ,
|
|
700
698
|
} : {
|
|
701
699
|
startLineNumber: instruction.line,
|
|
702
700
|
endLineNumber: instruction.line,
|
|
703
701
|
startColumn: instruction.column || 1,
|
|
704
|
-
endColumn: instruction.endColumn ||
|
|
702
|
+
endColumn: instruction.endColumn || 1073741824 ,
|
|
705
703
|
};
|
|
706
704
|
this.editorService.openEditor({
|
|
707
705
|
resource: sourceURI,
|
|
708
|
-
description: ( localize(
|
|
706
|
+
description: ( localize(6071, "from disassembly")),
|
|
709
707
|
options: {
|
|
710
708
|
preserveFocus: false,
|
|
711
709
|
selection: selection,
|
|
712
710
|
revealIfOpened: true,
|
|
713
|
-
selectionRevealType:
|
|
711
|
+
selectionRevealType: 1 ,
|
|
714
712
|
pinned: false,
|
|
715
713
|
}
|
|
716
714
|
});
|
|
@@ -740,18 +738,18 @@ InstructionRenderer = InstructionRenderer_1 = ( (__decorate([
|
|
|
740
738
|
], InstructionRenderer)));
|
|
741
739
|
class AccessibilityProvider {
|
|
742
740
|
getWidgetAriaLabel() {
|
|
743
|
-
return ( localize(
|
|
741
|
+
return ( localize(6072, "Disassembly View"));
|
|
744
742
|
}
|
|
745
743
|
getAriaLabel(element) {
|
|
746
744
|
let label = '';
|
|
747
745
|
const instruction = element.instruction;
|
|
748
746
|
if (instruction.address !== '-1') {
|
|
749
|
-
label += `${( localize(
|
|
747
|
+
label += `${( localize(6073, "Address"))}: ${instruction.address}`;
|
|
750
748
|
}
|
|
751
749
|
if (instruction.instructionBytes) {
|
|
752
|
-
label += `, ${( localize(
|
|
750
|
+
label += `, ${( localize(6074, "Bytes"))}: ${instruction.instructionBytes}`;
|
|
753
751
|
}
|
|
754
|
-
label += `, ${( localize(
|
|
752
|
+
label += `, ${( localize(6075, "Instruction"))}: ${instruction.instruction}`;
|
|
755
753
|
return label;
|
|
756
754
|
}
|
|
757
755
|
}
|
|
@@ -19,15 +19,14 @@ import 'vscode/vscode/vs/platform/theme/common/colors/miscColors';
|
|
|
19
19
|
import 'vscode/vscode/vs/platform/theme/common/colors/quickpickColors';
|
|
20
20
|
import 'vscode/vscode/vs/platform/theme/common/colors/searchColors';
|
|
21
21
|
import { IInstantiationService } from 'vscode/vscode/vs/platform/instantiation/common/instantiation';
|
|
22
|
-
import { LinkDetector
|
|
23
|
-
import { EditorOption } from 'vscode/vscode/vs/editor/common/config/editorOptions';
|
|
22
|
+
import { LinkDetector } from 'vscode/vscode/vs/workbench/contrib/debug/browser/linkDetector';
|
|
24
23
|
import { ActionBar } from 'vscode/vscode/vs/base/browser/ui/actionbar/actionbar';
|
|
25
24
|
import { Action } from 'vscode/vscode/vs/base/common/actions';
|
|
26
25
|
import { widgetClose } from 'vscode/vscode/vs/platform/theme/common/iconRegistry';
|
|
27
26
|
|
|
28
27
|
const $ = $$1;
|
|
29
|
-
const debugExceptionWidgetBorder = registerColor('debugExceptionWidget.border', '#a31515', ( localize(
|
|
30
|
-
const debugExceptionWidgetBackground = registerColor('debugExceptionWidget.background', { dark: '#420b0d', light: '#f1dfde', hcDark: '#420b0d', hcLight: '#f1dfde' }, ( localize(
|
|
28
|
+
const debugExceptionWidgetBorder = registerColor('debugExceptionWidget.border', '#a31515', ( localize(10343, 'Exception widget border color.')));
|
|
29
|
+
const debugExceptionWidgetBackground = registerColor('debugExceptionWidget.background', { dark: '#420b0d', light: '#f1dfde', hcDark: '#420b0d', hcLight: '#f1dfde' }, ( localize(10344, 'Exception widget background color.')));
|
|
31
30
|
let ExceptionWidget = class ExceptionWidget extends ZoneWidget {
|
|
32
31
|
constructor(editor, exceptionInfo, debugSession, themeService, instantiationService) {
|
|
33
32
|
super(editor, { showFrame: true, showArrow: true, isAccessible: true, frameWidth: 1, className: 'exception-widget-container' });
|
|
@@ -57,7 +56,7 @@ let ExceptionWidget = class ExceptionWidget extends ZoneWidget {
|
|
|
57
56
|
}
|
|
58
57
|
_fillContainer(container) {
|
|
59
58
|
this.setCssClass('exception-widget');
|
|
60
|
-
const fontInfo = this.editor.getOption(
|
|
59
|
+
const fontInfo = this.editor.getOption(52 );
|
|
61
60
|
container.style.fontSize = `${fontInfo.fontSize}px`;
|
|
62
61
|
container.style.lineHeight = `${fontInfo.lineHeight}px`;
|
|
63
62
|
container.tabIndex = 0;
|
|
@@ -66,10 +65,10 @@ let ExceptionWidget = class ExceptionWidget extends ZoneWidget {
|
|
|
66
65
|
append(title, label);
|
|
67
66
|
const actions = $('.actions');
|
|
68
67
|
append(title, actions);
|
|
69
|
-
label.textContent = this.exceptionInfo.id ? ( localize(
|
|
68
|
+
label.textContent = this.exceptionInfo.id ? ( localize(10345, 'Exception has occurred: {0}', this.exceptionInfo.id)) : ( localize(10346, 'Exception has occurred.'));
|
|
70
69
|
let ariaLabel = label.textContent;
|
|
71
70
|
const actionBar = ( (new ActionBar(actions)));
|
|
72
|
-
actionBar.push(( (new Action('editor.closeExceptionWidget', ( localize(
|
|
71
|
+
actionBar.push(( (new Action('editor.closeExceptionWidget', ( localize(10347, "Close")), ThemeIcon.asClassName(widgetClose), true, async () => {
|
|
73
72
|
const contribution = this.editor.getContribution(EDITOR_CONTRIBUTION_ID);
|
|
74
73
|
contribution?.closeExceptionWidget();
|
|
75
74
|
}))), { label: false, icon: true });
|
|
@@ -83,7 +82,7 @@ let ExceptionWidget = class ExceptionWidget extends ZoneWidget {
|
|
|
83
82
|
if (this.exceptionInfo.details && this.exceptionInfo.details.stackTrace) {
|
|
84
83
|
const stackTrace = $('.stack-trace');
|
|
85
84
|
const linkDetector = this.instantiationService.createInstance(LinkDetector);
|
|
86
|
-
const linkedStackTrace = linkDetector.linkify(this.exceptionInfo.details.stackTrace, true, this.debugSession ? this.debugSession.root : undefined, undefined, { type:
|
|
85
|
+
const linkedStackTrace = linkDetector.linkify(this.exceptionInfo.details.stackTrace, true, this.debugSession ? this.debugSession.root : undefined, undefined, { type: 0 , store: this._disposables });
|
|
87
86
|
stackTrace.appendChild(linkedStackTrace);
|
|
88
87
|
append(container, stackTrace);
|
|
89
88
|
ariaLabel += ', ' + this.exceptionInfo.details.stackTrace;
|
|
@@ -92,7 +91,7 @@ let ExceptionWidget = class ExceptionWidget extends ZoneWidget {
|
|
|
92
91
|
}
|
|
93
92
|
_doLayout(_heightInPixel, _widthInPixel) {
|
|
94
93
|
this.container.style.height = 'initial';
|
|
95
|
-
const lineHeight = this.editor.getOption(
|
|
94
|
+
const lineHeight = this.editor.getOption(69 );
|
|
96
95
|
const arrowHeight = Math.round(lineHeight / 3);
|
|
97
96
|
const computedLinesNumber = Math.ceil((this.container.offsetHeight + arrowHeight) / lineHeight);
|
|
98
97
|
this._relayout(computedLinesNumber);
|