@codingame/monaco-vscode-debug-service-override 3.2.3 → 4.1.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.
Files changed (60) hide show
  1. package/debug.js +4 -4
  2. package/package.json +2 -2
  3. package/external/rollup-plugin-styles/dist/runtime/inject-css.js +0 -3
  4. package/external/tslib/tslib.es6.js +0 -11
  5. package/override/vs/platform/dialogs/common/dialogs.js +0 -8
  6. package/vscode/src/vs/platform/debug/common/extensionHostDebugIpc.js +0 -73
  7. package/vscode/src/vs/workbench/contrib/debug/browser/callStackView.js +0 -1011
  8. package/vscode/src/vs/workbench/contrib/debug/browser/debug.contribution.js +0 -970
  9. package/vscode/src/vs/workbench/contrib/debug/browser/debugANSIHandling.js +0 -347
  10. package/vscode/src/vs/workbench/contrib/debug/browser/debugActionViewItems.js +0 -324
  11. package/vscode/src/vs/workbench/contrib/debug/browser/debugAdapterManager.js +0 -432
  12. package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +0 -1039
  13. package/vscode/src/vs/workbench/contrib/debug/browser/debugConfigurationManager.js +0 -649
  14. package/vscode/src/vs/workbench/contrib/debug/browser/debugConsoleQuickAccess.js +0 -64
  15. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorActions.js +0 -636
  16. package/vscode/src/vs/workbench/contrib/debug/browser/debugEditorContribution.js +0 -725
  17. package/vscode/src/vs/workbench/contrib/debug/browser/debugHover.js +0 -398
  18. package/vscode/src/vs/workbench/contrib/debug/browser/debugMemory.js +0 -206
  19. package/vscode/src/vs/workbench/contrib/debug/browser/debugProgress.js +0 -80
  20. package/vscode/src/vs/workbench/contrib/debug/browser/debugQuickAccess.js +0 -169
  21. package/vscode/src/vs/workbench/contrib/debug/browser/debugService.js +0 -1271
  22. package/vscode/src/vs/workbench/contrib/debug/browser/debugSession.js +0 -1305
  23. package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +0 -115
  24. package/vscode/src/vs/workbench/contrib/debug/browser/debugStatus.js +0 -77
  25. package/vscode/src/vs/workbench/contrib/debug/browser/debugTaskRunner.js +0 -307
  26. package/vscode/src/vs/workbench/contrib/debug/browser/debugTitle.js +0 -31
  27. package/vscode/src/vs/workbench/contrib/debug/browser/debugToolBar.js +0 -378
  28. package/vscode/src/vs/workbench/contrib/debug/browser/debugViewlet.js +0 -267
  29. package/vscode/src/vs/workbench/contrib/debug/browser/disassemblyView.js +0 -808
  30. package/vscode/src/vs/workbench/contrib/debug/browser/exceptionWidget.js +0 -121
  31. package/vscode/src/vs/workbench/contrib/debug/browser/extensionHostDebugService.js +0 -141
  32. package/vscode/src/vs/workbench/contrib/debug/browser/linkDetector.js +0 -262
  33. package/vscode/src/vs/workbench/contrib/debug/browser/loadedScriptsView.js +0 -669
  34. package/vscode/src/vs/workbench/contrib/debug/browser/media/debug.contribution.css.js +0 -6
  35. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugHover.css.js +0 -6
  36. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugToolBar.css.js +0 -6
  37. package/vscode/src/vs/workbench/contrib/debug/browser/media/debugViewlet.css.js +0 -6
  38. package/vscode/src/vs/workbench/contrib/debug/browser/media/exceptionWidget.css.js +0 -6
  39. package/vscode/src/vs/workbench/contrib/debug/browser/media/repl.css.js +0 -6
  40. package/vscode/src/vs/workbench/contrib/debug/browser/rawDebugSession.js +0 -709
  41. package/vscode/src/vs/workbench/contrib/debug/browser/repl.js +0 -992
  42. package/vscode/src/vs/workbench/contrib/debug/browser/replFilter.js +0 -48
  43. package/vscode/src/vs/workbench/contrib/debug/browser/replViewer.js +0 -348
  44. package/vscode/src/vs/workbench/contrib/debug/browser/statusbarColorProvider.js +0 -119
  45. package/vscode/src/vs/workbench/contrib/debug/browser/variablesView.js +0 -763
  46. package/vscode/src/vs/workbench/contrib/debug/browser/watchExpressionsView.js +0 -501
  47. package/vscode/src/vs/workbench/contrib/debug/browser/welcomeView.js +0 -162
  48. package/vscode/src/vs/workbench/contrib/debug/common/breakpoints.js +0 -21
  49. package/vscode/src/vs/workbench/contrib/debug/common/debugCompoundRoot.js +0 -17
  50. package/vscode/src/vs/workbench/contrib/debug/common/debugContentProvider.js +0 -110
  51. package/vscode/src/vs/workbench/contrib/debug/common/debugLifecycle.js +0 -62
  52. package/vscode/src/vs/workbench/contrib/debug/common/debugSchemas.js +0 -460
  53. package/vscode/src/vs/workbench/contrib/debug/common/debugStorage.js +0 -162
  54. package/vscode/src/vs/workbench/contrib/debug/common/debugTelemetry.js +0 -36
  55. package/vscode/src/vs/workbench/contrib/debug/common/debugViewModel.js +0 -148
  56. package/vscode/src/vs/workbench/contrib/debug/common/debugger.js +0 -289
  57. package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +0 -87
  58. package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/notebookVariables/notebookVariableCommands.js +0 -64
  59. package/vscode/src/vs/workbench/services/configurationResolver/browser/baseConfigurationResolverService.js +0 -311
  60. package/vscode/src/vs/workbench/services/configurationResolver/browser/configurationResolverService.js +0 -28
@@ -1,115 +0,0 @@
1
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
2
- import { matchesFuzzy } from 'vscode/vscode/vs/base/common/filters';
3
- import { DisposableStore } from 'vscode/vscode/vs/base/common/lifecycle';
4
- import { IDebugService, REPL_VIEW_ID } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
5
- import { IQuickInputService } from 'vscode/vscode/vs/platform/quickinput/common/quickInput';
6
- import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService';
7
- import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
8
-
9
- async function showDebugSessionMenu(accessor, selectAndStartID) {
10
- const quickInputService = accessor.get(IQuickInputService);
11
- const debugService = accessor.get(IDebugService);
12
- const viewsService = accessor.get(IViewsService);
13
- const commandService = accessor.get(ICommandService);
14
- const localDisposableStore = ( new DisposableStore());
15
- const quickPick = quickInputService.createQuickPick();
16
- localDisposableStore.add(quickPick);
17
- quickPick.matchOnLabel = quickPick.matchOnDescription = quickPick.matchOnDetail = quickPick.sortByLabel = false;
18
- quickPick.placeholder = ( localizeWithPath(
19
- 'vs/workbench/contrib/debug/browser/debugSessionPicker',
20
- 'moveFocusedView.selectView',
21
- 'Search debug sessions by name'
22
- ));
23
- const pickItems = _getPicksAndActiveItem(quickPick.value, selectAndStartID, debugService, viewsService, commandService);
24
- quickPick.items = pickItems.picks;
25
- quickPick.activeItems = pickItems.activeItems;
26
- localDisposableStore.add(quickPick.onDidChangeValue(async () => {
27
- quickPick.items = _getPicksAndActiveItem(quickPick.value, selectAndStartID, debugService, viewsService, commandService).picks;
28
- }));
29
- localDisposableStore.add(quickPick.onDidAccept(() => {
30
- const selectedItem = quickPick.selectedItems[0];
31
- selectedItem.accept();
32
- quickPick.hide();
33
- localDisposableStore.dispose();
34
- }));
35
- quickPick.show();
36
- }
37
- function _getPicksAndActiveItem(filter, selectAndStartID, debugService, viewsService, commandService) {
38
- const debugConsolePicks = [];
39
- const headerSessions = [];
40
- const currSession = debugService.getViewModel().focusedSession;
41
- const sessions = debugService.getModel().getSessions(false);
42
- const activeItems = [];
43
- sessions.forEach((session) => {
44
- if (session.compact && session.parentSession) {
45
- headerSessions.push(session.parentSession);
46
- }
47
- });
48
- sessions.forEach((session) => {
49
- const isHeader = headerSessions.includes(session);
50
- if (!session.parentSession) {
51
- debugConsolePicks.push({ type: 'separator', label: isHeader ? session.name : undefined });
52
- }
53
- if (!isHeader) {
54
- const pick = _createPick(session, filter, debugService, viewsService);
55
- if (pick) {
56
- debugConsolePicks.push(pick);
57
- if (session.getId() === currSession?.getId()) {
58
- activeItems.push(pick);
59
- }
60
- }
61
- }
62
- });
63
- if (debugConsolePicks.length) {
64
- debugConsolePicks.push({ type: 'separator' });
65
- }
66
- const createDebugSessionLabel = ( localizeWithPath(
67
- 'vs/workbench/contrib/debug/browser/debugSessionPicker',
68
- 'workbench.action.debug.startDebug',
69
- 'Start a New Debug Session'
70
- ));
71
- debugConsolePicks.push({
72
- label: `$(plus) ${createDebugSessionLabel}`,
73
- ariaLabel: createDebugSessionLabel,
74
- accept: () => commandService.executeCommand(selectAndStartID)
75
- });
76
- return { picks: debugConsolePicks, activeItems };
77
- }
78
- function _getSessionInfo(session) {
79
- const label = (!session.configuration.name.length) ? session.name : session.configuration.name;
80
- const parentName = session.compact ? undefined : session.parentSession?.configuration.name;
81
- let description = '';
82
- let ariaLabel = '';
83
- if (parentName) {
84
- ariaLabel = ( localizeWithPath(
85
- 'vs/workbench/contrib/debug/browser/debugSessionPicker',
86
- 'workbench.action.debug.spawnFrom',
87
- 'Session {0} spawned from {1}',
88
- label,
89
- parentName
90
- ));
91
- description = parentName;
92
- }
93
- return { label, description, ariaLabel };
94
- }
95
- function _createPick(session, filter, debugService, viewsService, commandService) {
96
- const pickInfo = _getSessionInfo(session);
97
- const highlights = matchesFuzzy(filter, pickInfo.label, true);
98
- if (highlights) {
99
- return {
100
- label: pickInfo.label,
101
- description: pickInfo.description,
102
- ariaLabel: pickInfo.ariaLabel,
103
- highlights: { label: highlights },
104
- accept: () => {
105
- debugService.focusStackFrame(undefined, undefined, session, { explicit: true });
106
- if (!viewsService.isViewVisible(REPL_VIEW_ID)) {
107
- viewsService.openView(REPL_VIEW_ID, true);
108
- }
109
- }
110
- };
111
- }
112
- return undefined;
113
- }
114
-
115
- export { showDebugSessionMenu };
@@ -1,77 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
3
- import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
4
- import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
5
- import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
6
- import { IStatusbarService } from 'vscode/vscode/vs/workbench/services/statusbar/browser/statusbar';
7
-
8
- let DebugStatusContribution = class DebugStatusContribution {
9
- constructor(statusBarService, debugService, configurationService) {
10
- this.statusBarService = statusBarService;
11
- this.debugService = debugService;
12
- this.toDispose = [];
13
- const addStatusBarEntry = () => {
14
- this.entryAccessor = this.statusBarService.addEntry(this.entry, 'status.debug', 0 , 30 );
15
- };
16
- const setShowInStatusBar = () => {
17
- this.showInStatusBar = configurationService.getValue('debug').showInStatusBar;
18
- if (this.showInStatusBar === 'always' && !this.entryAccessor) {
19
- addStatusBarEntry();
20
- }
21
- };
22
- setShowInStatusBar();
23
- this.toDispose.push(this.debugService.onDidChangeState(state => {
24
- if (state !== 0 && this.showInStatusBar === 'onFirstSessionStart' && !this.entryAccessor) {
25
- addStatusBarEntry();
26
- }
27
- }));
28
- this.toDispose.push(configurationService.onDidChangeConfiguration(e => {
29
- if (e.affectsConfiguration('debug.showInStatusBar')) {
30
- setShowInStatusBar();
31
- if (this.entryAccessor && this.showInStatusBar === 'never') {
32
- this.entryAccessor.dispose();
33
- this.entryAccessor = undefined;
34
- }
35
- }
36
- }));
37
- this.toDispose.push(this.debugService.getConfigurationManager().onDidSelectConfiguration(e => {
38
- this.entryAccessor?.update(this.entry);
39
- }));
40
- }
41
- get entry() {
42
- let text = '';
43
- const manager = this.debugService.getConfigurationManager();
44
- const name = manager.selectedConfiguration.name || '';
45
- const nameAndLaunchPresent = name && manager.selectedConfiguration.launch;
46
- if (nameAndLaunchPresent) {
47
- text = (manager.getLaunches().length > 1 ? `${name} (${manager.selectedConfiguration.launch.name})` : name);
48
- }
49
- return {
50
- name: ( localizeWithPath('vs/workbench/contrib/debug/browser/debugStatus', 'status.debug', "Debug")),
51
- text: '$(debug-alt-small) ' + text,
52
- ariaLabel: ( localizeWithPath(
53
- 'vs/workbench/contrib/debug/browser/debugStatus',
54
- 'debugTarget',
55
- "Debug: {0}",
56
- text
57
- )),
58
- tooltip: ( localizeWithPath(
59
- 'vs/workbench/contrib/debug/browser/debugStatus',
60
- 'selectAndStartDebug',
61
- "Select and start debug configuration"
62
- )),
63
- command: 'workbench.action.debug.selectandstart'
64
- };
65
- }
66
- dispose() {
67
- this.entryAccessor?.dispose();
68
- dispose(this.toDispose);
69
- }
70
- };
71
- DebugStatusContribution = ( __decorate([
72
- ( __param(0, IStatusbarService)),
73
- ( __param(1, IDebugService)),
74
- ( __param(2, IConfigurationService))
75
- ], DebugStatusContribution));
76
-
77
- export { DebugStatusContribution };
@@ -1,307 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { localizeWithPath } from 'vscode/vscode/vs/nls';
3
- import Severity from 'vscode/vscode/vs/base/common/severity';
4
- import { Markers } from 'vscode/vscode/vs/workbench/contrib/markers/common/markers';
5
- import { ITaskService } from 'vscode/vscode/vs/workbench/contrib/tasks/common/taskService';
6
- import { IConfigurationService } from 'vscode/vscode/vs/platform/configuration/common/configuration';
7
- import '../../../../../../../override/vs/platform/dialogs/common/dialogs.js';
8
- import { MarkerSeverity, IMarkerService } from 'vscode/vscode/vs/platform/markers/common/markers';
9
- import { IViewsService } from 'vscode/vscode/vs/workbench/services/views/common/viewsService';
10
- import { IStorageService } from 'vscode/vscode/vs/platform/storage/common/storage';
11
- import { createErrorWithActions } from 'vscode/vscode/vs/base/common/errorMessage';
12
- import { Action } from 'vscode/vscode/vs/base/common/actions';
13
- import { DEBUG_CONFIGURE_COMMAND_ID, DEBUG_CONFIGURE_LABEL } from './debugCommands.js';
14
- import { ICommandService } from 'vscode/vscode/vs/platform/commands/common/commands';
15
- import { IDialogService } from 'vscode/vscode/vs/platform/dialogs/common/dialogs';
16
-
17
- function once(match, event) {
18
- return (listener, thisArgs = null, disposables) => {
19
- const result = event(e => {
20
- if (match(e)) {
21
- result.dispose();
22
- return listener.call(thisArgs, e);
23
- }
24
- }, null, disposables);
25
- return result;
26
- };
27
- }
28
- const DEBUG_TASK_ERROR_CHOICE_KEY = 'debug.taskerrorchoice';
29
- let DebugTaskRunner = class DebugTaskRunner {
30
- constructor(taskService, markerService, configurationService, viewsService, dialogService, storageService, commandService) {
31
- this.taskService = taskService;
32
- this.markerService = markerService;
33
- this.configurationService = configurationService;
34
- this.viewsService = viewsService;
35
- this.dialogService = dialogService;
36
- this.storageService = storageService;
37
- this.commandService = commandService;
38
- this.canceled = false;
39
- }
40
- cancel() {
41
- this.canceled = true;
42
- }
43
- async runTaskAndCheckErrors(root, taskId) {
44
- try {
45
- this.canceled = false;
46
- const taskSummary = await this.runTask(root, taskId);
47
- if (this.canceled || (taskSummary && taskSummary.exitCode === undefined)) {
48
- return 0 ;
49
- }
50
- const errorCount = taskId ? this.markerService.read({ severities: MarkerSeverity.Error, take: 2 }).length : 0;
51
- const successExitCode = taskSummary && taskSummary.exitCode === 0;
52
- const failureExitCode = taskSummary && taskSummary.exitCode !== 0;
53
- const onTaskErrors = this.configurationService.getValue('debug').onTaskErrors;
54
- if (successExitCode || onTaskErrors === 'debugAnyway' || (errorCount === 0 && !failureExitCode)) {
55
- return 1 ;
56
- }
57
- if (onTaskErrors === 'showErrors') {
58
- await this.viewsService.openView(Markers.MARKERS_VIEW_ID, true);
59
- return Promise.resolve(0 );
60
- }
61
- if (onTaskErrors === 'abort') {
62
- return Promise.resolve(0 );
63
- }
64
- const taskLabel = typeof taskId === 'string' ? taskId : taskId ? taskId.name : '';
65
- const message = errorCount > 1
66
- ? ( localizeWithPath(
67
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
68
- 'preLaunchTaskErrors',
69
- "Errors exist after running preLaunchTask '{0}'.",
70
- taskLabel
71
- ))
72
- : errorCount === 1
73
- ? ( localizeWithPath(
74
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
75
- 'preLaunchTaskError',
76
- "Error exists after running preLaunchTask '{0}'.",
77
- taskLabel
78
- ))
79
- : taskSummary && typeof taskSummary.exitCode === 'number'
80
- ? ( localizeWithPath(
81
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
82
- 'preLaunchTaskExitCode',
83
- "The preLaunchTask '{0}' terminated with exit code {1}.",
84
- taskLabel,
85
- taskSummary.exitCode
86
- ))
87
- : ( localizeWithPath(
88
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
89
- 'preLaunchTaskTerminated',
90
- "The preLaunchTask '{0}' terminated.",
91
- taskLabel
92
- ));
93
- let DebugChoice;
94
- ( (function(DebugChoice) {
95
- DebugChoice[DebugChoice["DebugAnyway"] = 1] = "DebugAnyway";
96
- DebugChoice[DebugChoice["ShowErrors"] = 2] = "ShowErrors";
97
- DebugChoice[DebugChoice["Cancel"] = 0] = "Cancel";
98
- })(DebugChoice || (DebugChoice = {})));
99
- const { result, checkboxChecked } = await this.dialogService.prompt({
100
- type: Severity.Warning,
101
- message,
102
- buttons: [
103
- {
104
- label: ( localizeWithPath(
105
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
106
- { key: 'debugAnyway', comment: ['&& denotes a mnemonic'] },
107
- "&&Debug Anyway"
108
- )),
109
- run: () => DebugChoice.DebugAnyway
110
- },
111
- {
112
- label: ( localizeWithPath(
113
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
114
- { key: 'showErrors', comment: ['&& denotes a mnemonic'] },
115
- "&&Show Errors"
116
- )),
117
- run: () => DebugChoice.ShowErrors
118
- }
119
- ],
120
- cancelButton: {
121
- label: ( localizeWithPath('vs/workbench/contrib/debug/browser/debugTaskRunner', 'abort', "Abort")),
122
- run: () => DebugChoice.Cancel
123
- },
124
- checkbox: {
125
- label: ( localizeWithPath(
126
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
127
- 'remember',
128
- "Remember my choice in user settings"
129
- )),
130
- }
131
- });
132
- const debugAnyway = result === DebugChoice.DebugAnyway;
133
- const abort = result === DebugChoice.Cancel;
134
- if (checkboxChecked) {
135
- this.configurationService.updateValue('debug.onTaskErrors', result === DebugChoice.DebugAnyway ? 'debugAnyway' : abort ? 'abort' : 'showErrors');
136
- }
137
- if (abort) {
138
- return Promise.resolve(0 );
139
- }
140
- if (debugAnyway) {
141
- return 1 ;
142
- }
143
- await this.viewsService.openView(Markers.MARKERS_VIEW_ID, true);
144
- return Promise.resolve(0 );
145
- }
146
- catch (err) {
147
- const taskConfigureAction = this.taskService.configureAction();
148
- const choiceMap = JSON.parse(this.storageService.get(DEBUG_TASK_ERROR_CHOICE_KEY, 1 , '{}'));
149
- let choice = -1;
150
- let DebugChoice;
151
- ( (function(DebugChoice) {
152
- DebugChoice[DebugChoice["DebugAnyway"] = 0] = "DebugAnyway";
153
- DebugChoice[DebugChoice["ConfigureTask"] = 1] = "ConfigureTask";
154
- DebugChoice[DebugChoice["Cancel"] = 2] = "Cancel";
155
- })(DebugChoice || (DebugChoice = {})));
156
- if (choiceMap[err.message] !== undefined) {
157
- choice = choiceMap[err.message];
158
- }
159
- else {
160
- const { result, checkboxChecked } = await this.dialogService.prompt({
161
- type: Severity.Error,
162
- message: err.message,
163
- buttons: [
164
- {
165
- label: ( localizeWithPath(
166
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
167
- { key: 'debugAnyway', comment: ['&& denotes a mnemonic'] },
168
- "&&Debug Anyway"
169
- )),
170
- run: () => DebugChoice.DebugAnyway
171
- },
172
- {
173
- label: taskConfigureAction.label,
174
- run: () => DebugChoice.ConfigureTask
175
- }
176
- ],
177
- cancelButton: {
178
- run: () => DebugChoice.Cancel
179
- },
180
- checkbox: {
181
- label: ( localizeWithPath(
182
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
183
- 'rememberTask',
184
- "Remember my choice for this task"
185
- ))
186
- }
187
- });
188
- choice = result;
189
- if (checkboxChecked) {
190
- choiceMap[err.message] = choice;
191
- this.storageService.store(DEBUG_TASK_ERROR_CHOICE_KEY, JSON.stringify(choiceMap), 1 , 1 );
192
- }
193
- }
194
- if (choice === DebugChoice.ConfigureTask) {
195
- await taskConfigureAction.run();
196
- }
197
- return choice === DebugChoice.DebugAnyway ? 1 : 0 ;
198
- }
199
- }
200
- async runTask(root, taskId) {
201
- if (!taskId) {
202
- return Promise.resolve(null);
203
- }
204
- if (!root) {
205
- return Promise.reject(( new Error(( localizeWithPath(
206
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
207
- 'invalidTaskReference',
208
- "Task '{0}' can not be referenced from a launch configuration that is in a different workspace folder.",
209
- typeof taskId === 'string' ? taskId : taskId.type
210
- )))));
211
- }
212
- const task = await this.taskService.getTask(root, taskId);
213
- if (!task) {
214
- const errorMessage = typeof taskId === 'string'
215
- ? ( localizeWithPath(
216
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
217
- 'DebugTaskNotFoundWithTaskId',
218
- "Could not find the task '{0}'.",
219
- taskId
220
- ))
221
- : ( localizeWithPath(
222
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
223
- 'DebugTaskNotFound',
224
- "Could not find the specified task."
225
- ));
226
- return Promise.reject(createErrorWithActions(errorMessage, [( new Action(
227
- DEBUG_CONFIGURE_COMMAND_ID,
228
- DEBUG_CONFIGURE_LABEL,
229
- undefined,
230
- true,
231
- () => this.commandService.executeCommand(DEBUG_CONFIGURE_COMMAND_ID)
232
- ))]));
233
- }
234
- let taskStarted = false;
235
- const getTaskKey = (t) => t.getKey() ?? t.getMapKey();
236
- const taskKey = getTaskKey(task);
237
- const inactivePromise = ( new Promise((c) => once(e => {
238
- return (e.kind === "inactive"
239
- || (e.kind === "processEnded" && e.exitCode === undefined))
240
- && getTaskKey(e.__task) === taskKey;
241
- }, this.taskService.onDidStateChange)(e => {
242
- taskStarted = true;
243
- c(e.kind === "processEnded" ? { exitCode: e.exitCode } : null);
244
- })));
245
- const promise = this.taskService.getActiveTasks().then(async (tasks) => {
246
- if (tasks.find(t => getTaskKey(t) === taskKey)) {
247
- const busyTasks = await this.taskService.getBusyTasks();
248
- if (busyTasks.find(t => getTaskKey(t) === taskKey)) {
249
- taskStarted = true;
250
- return inactivePromise;
251
- }
252
- return Promise.resolve(null);
253
- }
254
- once(e => (((e.kind === "active") ) || ((e.kind === "dependsOnStarted") )) && getTaskKey(e.__task) === taskKey, this.taskService.onDidStateChange)(() => {
255
- taskStarted = true;
256
- });
257
- const taskPromise = this.taskService.run(task);
258
- if (task.configurationProperties.isBackground) {
259
- return inactivePromise;
260
- }
261
- return taskPromise.then(x => x ?? null);
262
- });
263
- return ( new Promise((c, e) => {
264
- const waitForInput = ( new Promise(
265
- resolve => once(e => ((e.kind === "acquiredInput") ) && getTaskKey(e.__task) === taskKey, this.taskService.onDidStateChange)(() => {
266
- resolve();
267
- })
268
- ));
269
- promise.then(result => {
270
- taskStarted = true;
271
- c(result);
272
- }, error => e(error));
273
- waitForInput.then(() => {
274
- const waitTime = task.configurationProperties.isBackground ? 5000 : 10000;
275
- setTimeout(() => {
276
- if (!taskStarted) {
277
- const errorMessage = typeof taskId === 'string'
278
- ? ( localizeWithPath(
279
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
280
- 'taskNotTrackedWithTaskId',
281
- "The task '{0}' cannot be tracked. Make sure to have a problem matcher defined.",
282
- taskId
283
- ))
284
- : ( localizeWithPath(
285
- 'vs/workbench/contrib/debug/browser/debugTaskRunner',
286
- 'taskNotTracked',
287
- "The task '{0}' cannot be tracked. Make sure to have a problem matcher defined.",
288
- JSON.stringify(taskId)
289
- ));
290
- e({ severity: Severity.Error, message: errorMessage });
291
- }
292
- }, waitTime);
293
- });
294
- }));
295
- }
296
- };
297
- DebugTaskRunner = ( __decorate([
298
- ( __param(0, ITaskService)),
299
- ( __param(1, IMarkerService)),
300
- ( __param(2, IConfigurationService)),
301
- ( __param(3, IViewsService)),
302
- ( __param(4, IDialogService)),
303
- ( __param(5, IStorageService)),
304
- ( __param(6, ICommandService))
305
- ], DebugTaskRunner));
306
-
307
- export { DebugTaskRunner };
@@ -1,31 +0,0 @@
1
- import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
2
- import { IDebugService } from 'vscode/vscode/vs/workbench/contrib/debug/common/debug';
3
- import { dispose } from 'vscode/vscode/vs/base/common/lifecycle';
4
- import { IHostService } from 'vscode/vscode/vs/workbench/services/host/browser/host';
5
- import { ITitleService } from 'vscode/vscode/vs/workbench/services/title/browser/titleService';
6
-
7
- let DebugTitleContribution = class DebugTitleContribution {
8
- constructor(debugService, hostService, titleService) {
9
- this.toDispose = [];
10
- const updateTitle = () => {
11
- if (debugService.state === 2 && !hostService.hasFocus) {
12
- titleService.updateProperties({ prefix: '🔴' });
13
- }
14
- else {
15
- titleService.updateProperties({ prefix: '' });
16
- }
17
- };
18
- this.toDispose.push(debugService.onDidChangeState(updateTitle));
19
- this.toDispose.push(hostService.onDidChangeFocus(updateTitle));
20
- }
21
- dispose() {
22
- dispose(this.toDispose);
23
- }
24
- };
25
- DebugTitleContribution = ( __decorate([
26
- ( __param(0, IDebugService)),
27
- ( __param(1, IHostService)),
28
- ( __param(2, ITitleService))
29
- ], DebugTitleContribution));
30
-
31
- export { DebugTitleContribution };