@opensumi/ide-debug 2.21.9-rc-1671440760.0 → 2.21.9
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/debug-configuration-manager.js +1 -1
- package/lib/browser/debug-configuration-manager.js.map +1 -1
- package/lib/browser/debug-session-manager.js +1 -1
- 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 +1 -5
- package/lib/browser/debug-session.js.map +1 -1
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +9 -2
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/preferences/launch-folder-preference-provider.d.ts +2 -2
- package/lib/browser/preferences/launch-folder-preference-provider.d.ts.map +1 -1
- package/lib/browser/preferences/launch-folder-preference-provider.js +2 -2
- package/lib/browser/preferences/launch-folder-preference-provider.js.map +1 -1
- package/lib/browser/view/configuration/debug-configuration.module.less +5 -5
- package/lib/browser/view/configuration/debug-configuration.view.d.ts.map +1 -1
- package/lib/browser/view/configuration/debug-configuration.view.js +1 -1
- package/lib/browser/view/configuration/debug-configuration.view.js.map +1 -1
- package/lib/browser/view/configuration/debug-toolbar.view.js +2 -2
- package/lib/browser/view/configuration/debug-toolbar.view.js.map +1 -1
- package/lib/browser/view/console/debug-console.module.less +1 -2
- package/lib/browser/view/console/debug-console.view.js +2 -2
- package/lib/browser/view/console/debug-console.view.js.map +1 -1
- package/lib/browser/view/frames/debug-call-stack-frame.view.d.ts.map +1 -1
- package/lib/browser/view/frames/debug-call-stack-frame.view.js +24 -32
- package/lib/browser/view/frames/debug-call-stack-frame.view.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 +5 -8
- 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 +7 -12
- package/lib/browser/view/frames/debug-call-stack-thread.view.js.map +1 -1
- package/lib/browser/view/variables/debug-variables.module.less +1 -2
- package/lib/browser/view/variables/debug-variables.view.js +1 -1
- package/lib/browser/view/variables/debug-variables.view.js.map +1 -1
- package/lib/browser/view/watch/debug-watch.module.less +1 -2
- package/lib/browser/view/watch/debug-watch.view.js +1 -1
- package/lib/browser/view/watch/debug-watch.view.js.map +1 -1
- package/package.json +24 -25
- package/src/browser/assets/breakpoint-conditional-disabled.svg +0 -4
- package/src/browser/assets/breakpoint-conditional-unverified.svg +0 -4
- package/src/browser/assets/breakpoint-conditional.svg +0 -4
- package/src/browser/assets/breakpoint-disabled.svg +0 -4
- package/src/browser/assets/breakpoint-hint.svg +0 -4
- package/src/browser/assets/breakpoint-log-disabled.svg +0 -4
- package/src/browser/assets/breakpoint-log-unverified.svg +0 -4
- package/src/browser/assets/breakpoint-log.svg +0 -4
- package/src/browser/assets/breakpoint-unsupported.svg +0 -4
- package/src/browser/assets/breakpoint-unverified.svg +0 -4
- package/src/browser/assets/breakpoint.svg +0 -4
- package/src/browser/assets/breakpoints-activate-inverse.svg +0 -4
- package/src/browser/assets/breakpoints-activate.svg +0 -4
- package/src/browser/assets/configure-inverse.svg +0 -4
- package/src/browser/assets/configure.svg +0 -4
- package/src/browser/assets/continue-inverse.svg +0 -4
- package/src/browser/assets/current-and-breakpoint.svg +0 -4
- package/src/browser/assets/current-arrow.svg +0 -4
- package/src/browser/assets/remove-all-inverse.svg +0 -4
- package/src/browser/assets/remove-all.svg +0 -4
- package/src/browser/assets/repl-inverse.svg +0 -4
- package/src/browser/assets/repl.svg +0 -4
- package/src/browser/assets/restart-inverse.svg +0 -4
- package/src/browser/assets/stackframe-and-breakpoint.svg +0 -4
- package/src/browser/assets/stackframe-arrow.svg +0 -4
- package/src/browser/assets/start-inverse.svg +0 -4
- package/src/browser/breakpoint/breakpoint-decoration.ts +0 -57
- package/src/browser/breakpoint/breakpoint-manager.ts +0 -348
- package/src/browser/breakpoint/breakpoint-marker.ts +0 -70
- package/src/browser/breakpoint/index.ts +0 -3
- package/src/browser/components/debug-action/index.module.less +0 -73
- package/src/browser/components/debug-action/index.tsx +0 -40
- package/src/browser/components/debug-exception-widget.less +0 -42
- package/src/browser/components/floating-click-widget/index.module.less +0 -5
- package/src/browser/components/floating-click-widget/index.tsx +0 -21
- package/src/browser/components/index.ts +0 -1
- package/src/browser/contextkeys/debug-call-stack-item-type-key.ts +0 -4
- package/src/browser/contextkeys/debug-contextkey.service.ts +0 -54
- package/src/browser/contextkeys/index.ts +0 -1
- package/src/browser/debug-ansi-handle.ts +0 -521
- package/src/browser/debug-configuration-manager.ts +0 -513
- package/src/browser/debug-configuration-model.ts +0 -66
- package/src/browser/debug-contribution.ts +0 -904
- package/src/browser/debug-exception-widget.tsx +0 -89
- package/src/browser/debug-link-detector.ts +0 -234
- package/src/browser/debug-memory.ts +0 -220
- package/src/browser/debug-preferences.ts +0 -70
- package/src/browser/debug-progress.service.ts +0 -122
- package/src/browser/debug-schema-updater.ts +0 -67
- package/src/browser/debug-service.ts +0 -42
- package/src/browser/debug-session-connection.ts +0 -333
- package/src/browser/debug-session-contribution.ts +0 -57
- package/src/browser/debug-session-manager.ts +0 -622
- package/src/browser/debug-session.ts +0 -1182
- package/src/browser/debug-style.less +0 -128
- package/src/browser/debugUtils.ts +0 -110
- package/src/browser/editor/debug-breakpoint-widget.ts +0 -99
- package/src/browser/editor/debug-breakpoint-zone-widget.tsx +0 -262
- package/src/browser/editor/debug-breakpoint.module.less +0 -31
- package/src/browser/editor/debug-editor-contribution.ts +0 -590
- package/src/browser/editor/debug-expression-provider.ts +0 -101
- package/src/browser/editor/debug-hover-model.ts +0 -38
- package/src/browser/editor/debug-hover-source.ts +0 -107
- package/src/browser/editor/debug-hover-tree.model.service.ts +0 -332
- package/src/browser/editor/debug-hover-widget.tsx +0 -200
- package/src/browser/editor/debug-hover.module.less +0 -29
- package/src/browser/editor/debug-hover.view.tsx +0 -147
- package/src/browser/editor/debug-model-manager.ts +0 -220
- package/src/browser/editor/debug-model.ts +0 -853
- package/src/browser/editor/debug-run-to-cursor.service.ts +0 -180
- package/src/browser/editor/debug-styles.ts +0 -66
- package/src/browser/editor/evaluatable-expression.ts +0 -47
- package/src/browser/editor/index.ts +0 -6
- package/src/browser/index.ts +0 -121
- package/src/browser/markers/index.ts +0 -2
- package/src/browser/markers/marker-manager.ts +0 -201
- package/src/browser/markers/marker.ts +0 -20
- package/src/browser/model/debug-source.ts +0 -144
- package/src/browser/model/debug-stack-frame.ts +0 -111
- package/src/browser/model/debug-thread.ts +0 -186
- package/src/browser/model/debug-watch.ts +0 -130
- package/src/browser/model/index.ts +0 -4
- package/src/browser/preferences/launch-folder-preference-provider.ts +0 -23
- package/src/browser/preferences/launch-preferences-contribution.ts +0 -9
- package/src/browser/preferences/launch-preferences.ts +0 -16
- package/src/browser/tree/debug-console-tree-node.define.tsx +0 -76
- package/src/browser/tree/debug-tree-node.define.ts +0 -768
- package/src/browser/tree/index.ts +0 -2
- package/src/browser/view/breakpoints/debug-breakpoints.module.less +0 -72
- package/src/browser/view/breakpoints/debug-breakpoints.service.ts +0 -217
- package/src/browser/view/breakpoints/debug-breakpoints.view.tsx +0 -174
- package/src/browser/view/configuration/debug-configuration.module.less +0 -110
- package/src/browser/view/configuration/debug-configuration.service.ts +0 -170
- package/src/browser/view/configuration/debug-configuration.view.tsx +0 -252
- package/src/browser/view/configuration/debug-toolbar.service.ts +0 -167
- package/src/browser/view/configuration/debug-toolbar.view.tsx +0 -335
- package/src/browser/view/console/debug-console-filter.model.ts +0 -49
- package/src/browser/view/console/debug-console-filter.service.ts +0 -81
- package/src/browser/view/console/debug-console-filter.view.tsx +0 -78
- package/src/browser/view/console/debug-console-model.ts +0 -48
- package/src/browser/view/console/debug-console-session.ts +0 -164
- package/src/browser/view/console/debug-console-toolbar.view.tsx +0 -28
- package/src/browser/view/console/debug-console-tree.model.service.ts +0 -550
- package/src/browser/view/console/debug-console.contribution.ts +0 -181
- package/src/browser/view/console/debug-console.module.less +0 -373
- package/src/browser/view/console/debug-console.service.ts +0 -433
- package/src/browser/view/console/debug-console.view.tsx +0 -500
- package/src/browser/view/debug-view-model.ts +0 -182
- package/src/browser/view/frames/debug-call-stack-frame.view.tsx +0 -238
- package/src/browser/view/frames/debug-call-stack-session.view.tsx +0 -253
- package/src/browser/view/frames/debug-call-stack-thread.view.tsx +0 -103
- package/src/browser/view/frames/debug-call-stack.contribution.ts +0 -88
- package/src/browser/view/frames/debug-call-stack.module.less +0 -193
- package/src/browser/view/frames/debug-call-stack.operation.tsx +0 -97
- package/src/browser/view/frames/debug-call-stack.service.ts +0 -105
- package/src/browser/view/frames/debug-call-stack.view.tsx +0 -43
- package/src/browser/view/variables/debug-variables-model.ts +0 -38
- package/src/browser/view/variables/debug-variables-tree.model.service.ts +0 -467
- package/src/browser/view/variables/debug-variables.contribution.ts +0 -244
- package/src/browser/view/variables/debug-variables.module.less +0 -149
- package/src/browser/view/variables/debug-variables.view.tsx +0 -303
- package/src/browser/view/watch/debug-watch-model.ts +0 -38
- package/src/browser/view/watch/debug-watch-tree.model.service.ts +0 -567
- package/src/browser/view/watch/debug-watch.contribution.ts +0 -167
- package/src/browser/view/watch/debug-watch.module.less +0 -189
- package/src/browser/view/watch/debug-watch.view.tsx +0 -337
- package/src/common/constants.ts +0 -81
- package/src/common/debug-breakpoint.ts +0 -43
- package/src/common/debug-configuration.ts +0 -68
- package/src/common/debug-editor.ts +0 -4
- package/src/common/debug-hover.ts +0 -31
- package/src/common/debug-model.ts +0 -247
- package/src/common/debug-progress.ts +0 -8
- package/src/common/debug-schema-updater.ts +0 -1
- package/src/common/debug-service.ts +0 -176
- package/src/common/debug-session-options.ts +0 -19
- package/src/common/debug-session.ts +0 -200
- package/src/common/evaluatable-expression.ts +0 -43
- package/src/common/index.ts +0 -14
- package/src/common/inline-values.ts +0 -77
- package/src/common/terminal.ts +0 -163
- package/src/common/types.ts +0 -86
- package/src/index.ts +0 -1
|
@@ -1,904 +0,0 @@
|
|
|
1
|
-
import { Injector, Autowired, INJECTOR_TOKEN } from '@opensumi/di';
|
|
2
|
-
import {
|
|
3
|
-
Domain,
|
|
4
|
-
ClientAppContribution,
|
|
5
|
-
localize,
|
|
6
|
-
CommandContribution,
|
|
7
|
-
CommandRegistry,
|
|
8
|
-
KeybindingContribution,
|
|
9
|
-
JsonSchemaContribution,
|
|
10
|
-
IJSONSchemaRegistry,
|
|
11
|
-
PreferenceSchema,
|
|
12
|
-
PreferenceContribution,
|
|
13
|
-
CommandService,
|
|
14
|
-
IReporterService,
|
|
15
|
-
formatLocalize,
|
|
16
|
-
CoreConfiguration,
|
|
17
|
-
ComponentContribution,
|
|
18
|
-
ComponentRegistry,
|
|
19
|
-
KeybindingRegistry,
|
|
20
|
-
getIcon,
|
|
21
|
-
PreferenceService,
|
|
22
|
-
IPreferenceSettingsService,
|
|
23
|
-
COMMON_COMMANDS,
|
|
24
|
-
} from '@opensumi/ide-core-browser';
|
|
25
|
-
import { browserViews } from '@opensumi/ide-core-browser/lib/extensions/schema/browserViews';
|
|
26
|
-
import { ToolbarRegistry, TabBarToolbarContribution } from '@opensumi/ide-core-browser/lib/layout';
|
|
27
|
-
import { MenuContribution, MenuId, IMenuRegistry } from '@opensumi/ide-core-browser/lib/menu/next';
|
|
28
|
-
import { IExtensionsSchemaService, URI } from '@opensumi/ide-core-common';
|
|
29
|
-
import {
|
|
30
|
-
BrowserEditorContribution,
|
|
31
|
-
IEditorFeatureRegistry,
|
|
32
|
-
EditorComponentRegistry,
|
|
33
|
-
IEditor,
|
|
34
|
-
} from '@opensumi/ide-editor/lib/browser';
|
|
35
|
-
import { IFileServiceClient, IShadowFileProvider } from '@opensumi/ide-file-service';
|
|
36
|
-
import { FileServiceClient } from '@opensumi/ide-file-service/lib/browser/file-service-client';
|
|
37
|
-
import { IMainLayoutService, IViewsRegistry } from '@opensumi/ide-main-layout';
|
|
38
|
-
import { WelcomeView } from '@opensumi/ide-main-layout/lib/browser/welcome.view';
|
|
39
|
-
import * as monaco from '@opensumi/monaco-editor-core/esm/vs/editor/editor.api';
|
|
40
|
-
|
|
41
|
-
import {
|
|
42
|
-
IDebugSessionManager,
|
|
43
|
-
launchSchemaUri,
|
|
44
|
-
DEBUG_CONTAINER_ID,
|
|
45
|
-
DEBUG_WATCH_ID,
|
|
46
|
-
DEBUG_VARIABLES_ID,
|
|
47
|
-
DEBUG_STACK_ID,
|
|
48
|
-
DEBUG_BREAKPOINTS_ID,
|
|
49
|
-
DEBUG_FLOATING_CLICK_WIDGET,
|
|
50
|
-
DEBUG_REPORT_NAME,
|
|
51
|
-
DEBUG_WELCOME_ID,
|
|
52
|
-
DEBUG_SCHEME,
|
|
53
|
-
TSourceBrekpointProperties,
|
|
54
|
-
} from '../common';
|
|
55
|
-
|
|
56
|
-
import {
|
|
57
|
-
CONTEXT_DEBUGGERS_AVAILABLE,
|
|
58
|
-
CONTEXT_IN_DEBUG_MODE,
|
|
59
|
-
CONTEXT_BREAKPOINT_INPUT_FOCUSED,
|
|
60
|
-
CONTEXT_EXCEPTION_WIDGET_VISIBLE,
|
|
61
|
-
} from './../common/constants';
|
|
62
|
-
import { BreakpointManager, SelectedBreakpoint } from './breakpoint';
|
|
63
|
-
import { FloatingClickWidget } from './components/floating-click-widget';
|
|
64
|
-
import { DebugContextKey } from './contextkeys/debug-contextkey.service';
|
|
65
|
-
import { DebugConfigurationManager } from './debug-configuration-manager';
|
|
66
|
-
import { DebugPreferences, debugPreferencesSchema } from './debug-preferences';
|
|
67
|
-
import { DebugProgressService } from './debug-progress.service';
|
|
68
|
-
import { launchSchema } from './debug-schema-updater';
|
|
69
|
-
import { DebugSession } from './debug-session';
|
|
70
|
-
import { DebugSessionManager } from './debug-session-manager';
|
|
71
|
-
import { DebugEditorContribution } from './editor/debug-editor-contribution';
|
|
72
|
-
import { DebugModelManager } from './editor/debug-model-manager';
|
|
73
|
-
import { DebugRunToCursorService } from './editor/debug-run-to-cursor.service';
|
|
74
|
-
import { DebugBreakpointsService } from './view/breakpoints/debug-breakpoints.service';
|
|
75
|
-
import { DebugBreakpointView } from './view/breakpoints/debug-breakpoints.view';
|
|
76
|
-
import { DebugConfigurationService } from './view/configuration/debug-configuration.service';
|
|
77
|
-
import { DebugConfigurationView } from './view/configuration/debug-configuration.view';
|
|
78
|
-
import { DebugToolbarService } from './view/configuration/debug-toolbar.service';
|
|
79
|
-
import { DebugConsoleService } from './view/console/debug-console.service';
|
|
80
|
-
import { DebugViewModel } from './view/debug-view-model';
|
|
81
|
-
import { DebugCallStackView } from './view/frames/debug-call-stack.view';
|
|
82
|
-
import { DebugVariableView } from './view/variables/debug-variables.view';
|
|
83
|
-
import { DebugWatchView } from './view/watch/debug-watch.view';
|
|
84
|
-
|
|
85
|
-
const LAUNCH_JSON_REGEX = /launch\.json$/;
|
|
86
|
-
|
|
87
|
-
export namespace DEBUG_COMMANDS {
|
|
88
|
-
export const ADD_WATCHER = {
|
|
89
|
-
id: 'debug.watch.add',
|
|
90
|
-
iconClass: getIcon('plus'),
|
|
91
|
-
};
|
|
92
|
-
export const COLLAPSE_ALL_WATCHER = {
|
|
93
|
-
id: 'debug.watch.collapseAll',
|
|
94
|
-
iconClass: getIcon('collapse-all'),
|
|
95
|
-
};
|
|
96
|
-
export const REMOVE_ALL_WATCHER = {
|
|
97
|
-
id: 'debug.watch.removeAll',
|
|
98
|
-
iconClass: getIcon('close-all'),
|
|
99
|
-
};
|
|
100
|
-
export const REMOVE_WATCHER = {
|
|
101
|
-
id: 'debug.watch.remove',
|
|
102
|
-
};
|
|
103
|
-
export const EDIT_WATCHER = {
|
|
104
|
-
id: 'debug.watch.edit',
|
|
105
|
-
};
|
|
106
|
-
export const COPY_WATCHER_VALUE = {
|
|
107
|
-
id: 'debug.watch.copyValue',
|
|
108
|
-
};
|
|
109
|
-
export const REMOVE_ALL_BREAKPOINTS = {
|
|
110
|
-
id: 'debug.breakpoints.remove.all',
|
|
111
|
-
iconClass: getIcon('close-all'),
|
|
112
|
-
};
|
|
113
|
-
export const TOGGLE_BREAKPOINTS = {
|
|
114
|
-
id: 'debug.breakpoints.toggle',
|
|
115
|
-
iconClass: getIcon('deactivate-breakpoints'),
|
|
116
|
-
};
|
|
117
|
-
export const START = {
|
|
118
|
-
id: 'debug.start',
|
|
119
|
-
};
|
|
120
|
-
export const NEXT = {
|
|
121
|
-
id: 'debug.next',
|
|
122
|
-
};
|
|
123
|
-
export const PREV = {
|
|
124
|
-
id: 'debug.prev',
|
|
125
|
-
};
|
|
126
|
-
export const OVER = {
|
|
127
|
-
id: 'debug.over',
|
|
128
|
-
};
|
|
129
|
-
export const STOP = {
|
|
130
|
-
id: 'debug.stop',
|
|
131
|
-
};
|
|
132
|
-
export const CONTINUE = {
|
|
133
|
-
id: 'debug.continue',
|
|
134
|
-
};
|
|
135
|
-
export const RESTART = {
|
|
136
|
-
id: 'debug.restart',
|
|
137
|
-
};
|
|
138
|
-
export const PAUSE = {
|
|
139
|
-
id: 'debug.pause',
|
|
140
|
-
};
|
|
141
|
-
// menu commands
|
|
142
|
-
export const DELETE_BREAKPOINT = {
|
|
143
|
-
id: 'debug.delete.breakpoint',
|
|
144
|
-
label: '%debug.menu.delete.breakpoint%',
|
|
145
|
-
};
|
|
146
|
-
export const EDIT_BREAKPOINT = {
|
|
147
|
-
id: 'debug.edit.breakpoint',
|
|
148
|
-
label: '%debug.menu.edit.breakpoint%',
|
|
149
|
-
};
|
|
150
|
-
export const DISABLE_BREAKPOINT = {
|
|
151
|
-
id: 'debug.disable.breakpoint',
|
|
152
|
-
label: '%debug.menu.disable.breakpoint%',
|
|
153
|
-
};
|
|
154
|
-
export const ENABLE_BREAKPOINT = {
|
|
155
|
-
id: 'debug.enable.breakpoint',
|
|
156
|
-
label: '%debug.menu.enable.breakpoint%',
|
|
157
|
-
};
|
|
158
|
-
export const ENABLE_LOGPOINT = {
|
|
159
|
-
id: 'debug.enable.logpoint',
|
|
160
|
-
label: '%debug.menu.enable.logpoint',
|
|
161
|
-
};
|
|
162
|
-
export const ADD_BREAKPOINT = {
|
|
163
|
-
id: 'debug.add.breakpoint',
|
|
164
|
-
label: '%debug.menu.add.breakpoint%',
|
|
165
|
-
};
|
|
166
|
-
export const ADD_LOGPOINT = {
|
|
167
|
-
id: 'debug.add.logpoint',
|
|
168
|
-
label: '%debug.menu.add.logpoint%',
|
|
169
|
-
};
|
|
170
|
-
export const ADD_CONDITIONAL_BREAKPOINT = {
|
|
171
|
-
id: 'debug.add.conditional',
|
|
172
|
-
label: '%debug.menu.add.conditional%',
|
|
173
|
-
};
|
|
174
|
-
export const RESTART_FRAME = {
|
|
175
|
-
id: 'debug.callstack.restart.frame',
|
|
176
|
-
};
|
|
177
|
-
export const COPY_STACK_TRACE = {
|
|
178
|
-
id: 'debug.callstack.copy',
|
|
179
|
-
};
|
|
180
|
-
// variables
|
|
181
|
-
export const SET_VARIABLE_VALUE = {
|
|
182
|
-
id: 'debug.variables.setValue',
|
|
183
|
-
};
|
|
184
|
-
export const COPY_VARIABLE_VALUE = {
|
|
185
|
-
id: 'debug.variables.copy',
|
|
186
|
-
};
|
|
187
|
-
export const COPY_EVALUATE_PATH = {
|
|
188
|
-
id: 'debug.evaluate.copy',
|
|
189
|
-
};
|
|
190
|
-
export const ADD_TO_WATCH_ID = {
|
|
191
|
-
id: 'debug.addToWatchExpressions',
|
|
192
|
-
};
|
|
193
|
-
export const VIEW_MEMORY_ID = {
|
|
194
|
-
id: 'debug.variables.view.memory',
|
|
195
|
-
};
|
|
196
|
-
// console commands
|
|
197
|
-
export const CLEAR_CONSOLE = {
|
|
198
|
-
id: 'debug.console.clear',
|
|
199
|
-
label: '%debug.console.clear%',
|
|
200
|
-
};
|
|
201
|
-
export const COPY_CONSOLE_ITEM = {
|
|
202
|
-
id: 'debug.console.copy',
|
|
203
|
-
};
|
|
204
|
-
export const COPY_CONSOLE_ALL = {
|
|
205
|
-
id: 'debug.console.copyALl',
|
|
206
|
-
};
|
|
207
|
-
export const COLLAPSE_ALL_CONSOLE_ITEM = {
|
|
208
|
-
id: 'debug.console.collapseAll',
|
|
209
|
-
label: '%debug.console.collapseAll%',
|
|
210
|
-
};
|
|
211
|
-
export const CONSOLE_ENTER_EVALUATE = {
|
|
212
|
-
id: 'debug.console.keybing.enter.evaluate',
|
|
213
|
-
};
|
|
214
|
-
export const CONSOLE_INPUT_DOWN_ARROW = {
|
|
215
|
-
id: 'debug.console.input.down.arrow',
|
|
216
|
-
};
|
|
217
|
-
export const CONSOLE_INPUT_UP_ARROW = {
|
|
218
|
-
id: 'debug.console.input.up.arrow',
|
|
219
|
-
};
|
|
220
|
-
export const CONSOLE_FILTER_FOCUS = {
|
|
221
|
-
id: 'debug.console.filter.input.focus',
|
|
222
|
-
};
|
|
223
|
-
export const RUN_TO_CURSOR = {
|
|
224
|
-
id: 'debug.action.runToCursor',
|
|
225
|
-
label: '%debug.action.runToCursor%',
|
|
226
|
-
};
|
|
227
|
-
export const FORCE_RUN_TO_CURSOR = {
|
|
228
|
-
id: 'debug.action.forceRunToCursor',
|
|
229
|
-
label: '%debug.action.forceRunToCursor%',
|
|
230
|
-
};
|
|
231
|
-
// exception widget
|
|
232
|
-
export const EXCEPTION_WIDGET_CLOSE = {
|
|
233
|
-
id: 'debug.action.closeExceptionWidget',
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
export namespace DebugBreakpointWidgetCommands {
|
|
238
|
-
export const ACCEPT = {
|
|
239
|
-
id: 'debug.breakpointWidget.accept',
|
|
240
|
-
};
|
|
241
|
-
export const CLOSE = {
|
|
242
|
-
id: 'debug.breakpointWidget.close',
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
@Domain(
|
|
247
|
-
ClientAppContribution,
|
|
248
|
-
ComponentContribution,
|
|
249
|
-
TabBarToolbarContribution,
|
|
250
|
-
CommandContribution,
|
|
251
|
-
KeybindingContribution,
|
|
252
|
-
JsonSchemaContribution,
|
|
253
|
-
PreferenceContribution,
|
|
254
|
-
MenuContribution,
|
|
255
|
-
BrowserEditorContribution,
|
|
256
|
-
)
|
|
257
|
-
export class DebugContribution
|
|
258
|
-
implements
|
|
259
|
-
ComponentContribution,
|
|
260
|
-
TabBarToolbarContribution,
|
|
261
|
-
CommandContribution,
|
|
262
|
-
KeybindingContribution,
|
|
263
|
-
JsonSchemaContribution,
|
|
264
|
-
PreferenceContribution,
|
|
265
|
-
MenuContribution,
|
|
266
|
-
BrowserEditorContribution
|
|
267
|
-
{
|
|
268
|
-
schema: PreferenceSchema = debugPreferencesSchema;
|
|
269
|
-
|
|
270
|
-
@Autowired(IMainLayoutService)
|
|
271
|
-
protected readonly mainlayoutService: IMainLayoutService;
|
|
272
|
-
|
|
273
|
-
@Autowired(BreakpointManager)
|
|
274
|
-
protected readonly breakpointManager: BreakpointManager;
|
|
275
|
-
|
|
276
|
-
@Autowired(DebugConfigurationManager)
|
|
277
|
-
protected readonly configurations: DebugConfigurationManager;
|
|
278
|
-
|
|
279
|
-
@Autowired(DebugModelManager)
|
|
280
|
-
protected debugEditorController: DebugModelManager;
|
|
281
|
-
|
|
282
|
-
@Autowired(DebugBreakpointsService)
|
|
283
|
-
protected debugBreakpointsService: DebugBreakpointsService;
|
|
284
|
-
|
|
285
|
-
@Autowired(DebugViewModel)
|
|
286
|
-
protected readonly debugModel: DebugViewModel;
|
|
287
|
-
|
|
288
|
-
@Autowired(DebugPreferences)
|
|
289
|
-
protected readonly debugPreferences: DebugPreferences;
|
|
290
|
-
|
|
291
|
-
@Autowired(DebugConsoleService)
|
|
292
|
-
protected readonly debugConsole: DebugConsoleService;
|
|
293
|
-
|
|
294
|
-
@Autowired(DebugConfigurationService)
|
|
295
|
-
protected readonly debugConfigurationService: DebugConfigurationService;
|
|
296
|
-
|
|
297
|
-
@Autowired(IDebugSessionManager)
|
|
298
|
-
protected readonly sessionManager: DebugSessionManager;
|
|
299
|
-
|
|
300
|
-
@Autowired(CommandService)
|
|
301
|
-
protected readonly commandService: CommandService;
|
|
302
|
-
|
|
303
|
-
@Autowired(DebugToolbarService)
|
|
304
|
-
protected readonly debugToolbarService: DebugToolbarService;
|
|
305
|
-
|
|
306
|
-
@Autowired(INJECTOR_TOKEN)
|
|
307
|
-
private readonly injector: Injector;
|
|
308
|
-
|
|
309
|
-
@Autowired(PreferenceService)
|
|
310
|
-
protected readonly preferences: PreferenceService;
|
|
311
|
-
|
|
312
|
-
@Autowired(IReporterService)
|
|
313
|
-
private readonly reporterService: IReporterService;
|
|
314
|
-
|
|
315
|
-
@Autowired(IViewsRegistry)
|
|
316
|
-
private viewsRegistry: IViewsRegistry;
|
|
317
|
-
|
|
318
|
-
@Autowired(IShadowFileProvider)
|
|
319
|
-
private shadowFileServiceProvider: IShadowFileProvider;
|
|
320
|
-
|
|
321
|
-
@Autowired(IFileServiceClient)
|
|
322
|
-
protected readonly fileSystem: FileServiceClient;
|
|
323
|
-
|
|
324
|
-
@Autowired(IPreferenceSettingsService)
|
|
325
|
-
protected readonly preferenceSettings: IPreferenceSettingsService;
|
|
326
|
-
|
|
327
|
-
@Autowired(DebugProgressService)
|
|
328
|
-
protected readonly debugProgressService: DebugProgressService;
|
|
329
|
-
|
|
330
|
-
@Autowired(DebugRunToCursorService)
|
|
331
|
-
protected readonly debugRunToCursorService: DebugRunToCursorService;
|
|
332
|
-
|
|
333
|
-
@Autowired(DebugContextKey)
|
|
334
|
-
protected readonly debugContextKey: DebugContextKey;
|
|
335
|
-
|
|
336
|
-
@Autowired(IExtensionsSchemaService)
|
|
337
|
-
protected readonly extensionsPointService: IExtensionsSchemaService;
|
|
338
|
-
|
|
339
|
-
private firstSessionStart = true;
|
|
340
|
-
private openedViewSessions = new Set();
|
|
341
|
-
|
|
342
|
-
get selectedBreakpoint(): SelectedBreakpoint | undefined {
|
|
343
|
-
const { selectedBreakpoint } = this.breakpointManager;
|
|
344
|
-
return selectedBreakpoint;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
registerEditorComponent(registry: EditorComponentRegistry) {
|
|
348
|
-
registry.registerEditorSideWidget({
|
|
349
|
-
id: DEBUG_FLOATING_CLICK_WIDGET,
|
|
350
|
-
component: FloatingClickWidget as any,
|
|
351
|
-
displaysOnResource: (r) => {
|
|
352
|
-
const { configUri } = this.preferences.resolve('launch');
|
|
353
|
-
if (!configUri) {
|
|
354
|
-
return false;
|
|
355
|
-
}
|
|
356
|
-
return configUri.isEqual(r.uri) && LAUNCH_JSON_REGEX.test(r.uri.toString());
|
|
357
|
-
},
|
|
358
|
-
});
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
registerComponent(registry: ComponentRegistry) {
|
|
362
|
-
registry.register(
|
|
363
|
-
'@opensumi/ide-debug',
|
|
364
|
-
[
|
|
365
|
-
{
|
|
366
|
-
component: DebugWatchView,
|
|
367
|
-
id: DEBUG_WATCH_ID,
|
|
368
|
-
name: localize('debug.watch.title'),
|
|
369
|
-
when: `${CONTEXT_DEBUGGERS_AVAILABLE.equalsTo(true)} || ${CONTEXT_IN_DEBUG_MODE.equalsTo(true)}`,
|
|
370
|
-
collapsed: false,
|
|
371
|
-
},
|
|
372
|
-
{
|
|
373
|
-
component: DebugCallStackView,
|
|
374
|
-
id: DEBUG_STACK_ID,
|
|
375
|
-
name: localize('debug.callStack.title'),
|
|
376
|
-
when: `${CONTEXT_DEBUGGERS_AVAILABLE.equalsTo(true)} || ${CONTEXT_IN_DEBUG_MODE.equalsTo(true)}`,
|
|
377
|
-
collapsed: false,
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
component: DebugVariableView,
|
|
381
|
-
id: DEBUG_VARIABLES_ID,
|
|
382
|
-
name: localize('debug.variables.title'),
|
|
383
|
-
when: `${CONTEXT_DEBUGGERS_AVAILABLE.equalsTo(true)} || ${CONTEXT_IN_DEBUG_MODE.equalsTo(true)}`,
|
|
384
|
-
collapsed: false,
|
|
385
|
-
},
|
|
386
|
-
{
|
|
387
|
-
component: DebugBreakpointView,
|
|
388
|
-
id: DEBUG_BREAKPOINTS_ID,
|
|
389
|
-
name: localize('debug.breakpoints.title'),
|
|
390
|
-
when: `${CONTEXT_DEBUGGERS_AVAILABLE.equalsTo(true)} || ${CONTEXT_IN_DEBUG_MODE.equalsTo(true)}`,
|
|
391
|
-
collapsed: false,
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
component: WelcomeView,
|
|
395
|
-
id: DEBUG_WELCOME_ID,
|
|
396
|
-
name: 'Debug Welcome',
|
|
397
|
-
when: `${CONTEXT_DEBUGGERS_AVAILABLE.equalsTo(false)} && ${CONTEXT_IN_DEBUG_MODE.equalsTo(false)}`,
|
|
398
|
-
initialProps: { viewId: DEBUG_WELCOME_ID },
|
|
399
|
-
},
|
|
400
|
-
],
|
|
401
|
-
{
|
|
402
|
-
iconClass: getIcon('debug'),
|
|
403
|
-
priority: 7,
|
|
404
|
-
title: localize('debug.container.title'),
|
|
405
|
-
containerId: DEBUG_CONTAINER_ID,
|
|
406
|
-
titleComponent: DebugConfigurationView,
|
|
407
|
-
activateKeyBinding: 'ctrlcmd+shift+d',
|
|
408
|
-
},
|
|
409
|
-
);
|
|
410
|
-
}
|
|
411
|
-
|
|
412
|
-
async initialize() {
|
|
413
|
-
this.fileSystem.registerProvider(DEBUG_SCHEME, this.shadowFileServiceProvider);
|
|
414
|
-
this.debugEditorController.init();
|
|
415
|
-
this.debugProgressService.run(this.sessionManager);
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
onStart() {
|
|
419
|
-
this.viewsRegistry.registerViewWelcomeContent(DEBUG_WELCOME_ID, {
|
|
420
|
-
content: formatLocalize('welcome-view.noLaunchJson', DEBUG_COMMANDS.START.id),
|
|
421
|
-
when: 'default',
|
|
422
|
-
});
|
|
423
|
-
this.sessionManager.onDidCreateDebugSession((session: DebugSession) => {
|
|
424
|
-
this.debugModel.init(session);
|
|
425
|
-
});
|
|
426
|
-
this.sessionManager.onDidStartDebugSession((session: DebugSession) => {
|
|
427
|
-
const { internalConsoleOptions } = session.configuration;
|
|
428
|
-
const openDebug = session.configuration.openDebug || this.debugPreferences['debug.openDebug'];
|
|
429
|
-
if (openDebug === 'openOnSessionStart' || openDebug === 'openOnFirstSessionStart') {
|
|
430
|
-
if (this.firstSessionStart) {
|
|
431
|
-
this.openDebugView();
|
|
432
|
-
}
|
|
433
|
-
} else if (openDebug !== 'neverOpen') {
|
|
434
|
-
const parentSession = session.parentSession;
|
|
435
|
-
const sessionId = parentSession?.id || session.id;
|
|
436
|
-
if (!this.openedViewSessions.has(sessionId)) {
|
|
437
|
-
this.openedViewSessions.add(sessionId);
|
|
438
|
-
this.openDebugView();
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
if (
|
|
443
|
-
internalConsoleOptions === 'openOnSessionStart' ||
|
|
444
|
-
(internalConsoleOptions === 'openOnFirstSessionStart' && this.firstSessionStart)
|
|
445
|
-
) {
|
|
446
|
-
this.openDebugConsoleView();
|
|
447
|
-
}
|
|
448
|
-
this.firstSessionStart = false;
|
|
449
|
-
this.commandService.tryExecuteCommand('statusbar.changeBackgroundColor', 'var(--statusBar-debuggingBackground)');
|
|
450
|
-
this.commandService.tryExecuteCommand('statusbar.changeColor', 'var(--statusBar-debuggingForeground)');
|
|
451
|
-
});
|
|
452
|
-
this.sessionManager.onDidStopDebugSession((session) => {
|
|
453
|
-
const { openDebug } = session.configuration;
|
|
454
|
-
if (openDebug === 'openOnDebugBreak') {
|
|
455
|
-
this.openDebugView();
|
|
456
|
-
}
|
|
457
|
-
});
|
|
458
|
-
this.sessionManager.onDidDestroyDebugSession((session) => {
|
|
459
|
-
if (this.sessionManager.sessions.length === 0) {
|
|
460
|
-
this.commandService.tryExecuteCommand('statusbar.changeBackgroundColor', 'var(--statusBar-background)');
|
|
461
|
-
this.commandService.tryExecuteCommand('statusbar.changeColor');
|
|
462
|
-
}
|
|
463
|
-
});
|
|
464
|
-
this.configurations.load();
|
|
465
|
-
this.breakpointManager.load();
|
|
466
|
-
this.configurations.onDidChange(() => this.configurations.save());
|
|
467
|
-
this.breakpointManager.onDidChangeBreakpoints(() => this.breakpointManager.save());
|
|
468
|
-
this.breakpointManager.onDidChangeExceptionsBreakpoints(() => this.breakpointManager.save());
|
|
469
|
-
this.breakpointManager.onDidChangeMarkers(() => this.breakpointManager.save());
|
|
470
|
-
|
|
471
|
-
this.extensionsPointService.appendExtensionPoint(['browserViews', 'properties'], {
|
|
472
|
-
extensionPoint: DEBUG_CONTAINER_ID,
|
|
473
|
-
frameworkKind: ['opensumi'],
|
|
474
|
-
jsonSchema: {
|
|
475
|
-
...browserViews.properties,
|
|
476
|
-
description: formatLocalize('sumiContributes.browserViews.location.custom', localize('menu-bar.title.debug')),
|
|
477
|
-
},
|
|
478
|
-
});
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
// 左侧调试面板
|
|
482
|
-
openDebugView() {
|
|
483
|
-
const handler = this.mainlayoutService.getTabbarHandler(DEBUG_CONTAINER_ID);
|
|
484
|
-
if (handler && !handler.isVisible) {
|
|
485
|
-
handler.activate();
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
// 底部调试控制台面板
|
|
490
|
-
openDebugConsoleView() {
|
|
491
|
-
if (!this.debugConsole.isVisible) {
|
|
492
|
-
this.debugConsole.activate();
|
|
493
|
-
}
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
onDidRender() {
|
|
497
|
-
const handler = this.mainlayoutService.getTabbarHandler(DEBUG_CONTAINER_ID);
|
|
498
|
-
if (handler) {
|
|
499
|
-
handler!.setTitleComponent(DebugConfigurationView);
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
registerCommands(commands: CommandRegistry) {
|
|
504
|
-
commands.registerCommand(COMMON_COMMANDS.OPEN_LAUNCH_CONFIGURATION, {
|
|
505
|
-
execute: () => {
|
|
506
|
-
this.debugConfigurationService.openConfiguration();
|
|
507
|
-
},
|
|
508
|
-
});
|
|
509
|
-
commands.registerCommand(DEBUG_COMMANDS.REMOVE_ALL_BREAKPOINTS, {
|
|
510
|
-
execute: () => {
|
|
511
|
-
this.debugBreakpointsService.removeAllBreakpoints();
|
|
512
|
-
},
|
|
513
|
-
});
|
|
514
|
-
commands.registerCommand(DEBUG_COMMANDS.START, {
|
|
515
|
-
execute: () => {
|
|
516
|
-
this.debugConfigurationService.start();
|
|
517
|
-
},
|
|
518
|
-
});
|
|
519
|
-
commands.registerCommand(DEBUG_COMMANDS.STOP, {
|
|
520
|
-
execute: () => {
|
|
521
|
-
this.debugToolbarService.doStop();
|
|
522
|
-
},
|
|
523
|
-
});
|
|
524
|
-
commands.registerCommand(DEBUG_COMMANDS.NEXT, {
|
|
525
|
-
execute: () => {
|
|
526
|
-
this.debugToolbarService.doStepIn();
|
|
527
|
-
},
|
|
528
|
-
});
|
|
529
|
-
commands.registerCommand(DEBUG_COMMANDS.PREV, {
|
|
530
|
-
execute: () => {
|
|
531
|
-
this.debugToolbarService.doStepOut();
|
|
532
|
-
},
|
|
533
|
-
});
|
|
534
|
-
commands.registerCommand(DEBUG_COMMANDS.CONTINUE, {
|
|
535
|
-
execute: () => {
|
|
536
|
-
this.debugToolbarService.doContinue();
|
|
537
|
-
},
|
|
538
|
-
});
|
|
539
|
-
commands.registerCommand(DEBUG_COMMANDS.PAUSE, {
|
|
540
|
-
execute: () => {
|
|
541
|
-
this.debugToolbarService.doPause();
|
|
542
|
-
},
|
|
543
|
-
});
|
|
544
|
-
commands.registerCommand(DEBUG_COMMANDS.OVER, {
|
|
545
|
-
execute: () => {
|
|
546
|
-
this.debugToolbarService.doStepOver();
|
|
547
|
-
},
|
|
548
|
-
});
|
|
549
|
-
commands.registerCommand(DEBUG_COMMANDS.RESTART, {
|
|
550
|
-
execute: () => {
|
|
551
|
-
this.debugToolbarService.doRestart();
|
|
552
|
-
},
|
|
553
|
-
});
|
|
554
|
-
commands.registerCommand(DEBUG_COMMANDS.TOGGLE_BREAKPOINTS, {
|
|
555
|
-
execute: () => {
|
|
556
|
-
this.debugBreakpointsService.toggleBreakpoints();
|
|
557
|
-
},
|
|
558
|
-
});
|
|
559
|
-
commands.registerCommand(DEBUG_COMMANDS.EDIT_BREAKPOINT, {
|
|
560
|
-
execute: async (position: monaco.Position) => {
|
|
561
|
-
this.reporterService.point(DEBUG_REPORT_NAME?.DEBUG_BREAKPOINT, 'edit');
|
|
562
|
-
const { selectedBreakpoint } = this;
|
|
563
|
-
if (selectedBreakpoint) {
|
|
564
|
-
const { openBreakpointView } = selectedBreakpoint.model;
|
|
565
|
-
let defaultContext: TSourceBrekpointProperties = 'condition';
|
|
566
|
-
if (selectedBreakpoint.breakpoint) {
|
|
567
|
-
const raw = selectedBreakpoint.breakpoint.raw;
|
|
568
|
-
if (raw.condition) {
|
|
569
|
-
defaultContext = 'condition';
|
|
570
|
-
} else if (raw.hitCondition) {
|
|
571
|
-
defaultContext = 'hitCondition';
|
|
572
|
-
} else if (raw.logMessage) {
|
|
573
|
-
defaultContext = 'logMessage';
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
openBreakpointView(
|
|
577
|
-
position,
|
|
578
|
-
selectedBreakpoint.breakpoint && selectedBreakpoint.breakpoint.raw,
|
|
579
|
-
defaultContext,
|
|
580
|
-
);
|
|
581
|
-
}
|
|
582
|
-
},
|
|
583
|
-
isVisible: () => !!this.selectedBreakpoint && !!this.selectedBreakpoint.breakpoint,
|
|
584
|
-
isEnabled: () => !!this.selectedBreakpoint && !!this.selectedBreakpoint.breakpoint,
|
|
585
|
-
});
|
|
586
|
-
commands.registerCommand(DEBUG_COMMANDS.DISABLE_BREAKPOINT, {
|
|
587
|
-
execute: async (position: monaco.Position) => {
|
|
588
|
-
const { selectedBreakpoint } = this;
|
|
589
|
-
if (selectedBreakpoint) {
|
|
590
|
-
const { uri } = selectedBreakpoint.model;
|
|
591
|
-
const breakpoint = this.breakpointManager.getBreakpoint(uri, position.lineNumber);
|
|
592
|
-
if (breakpoint) {
|
|
593
|
-
breakpoint.enabled = false;
|
|
594
|
-
this.breakpointManager.updateBreakpoint(breakpoint);
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
},
|
|
598
|
-
isVisible: () =>
|
|
599
|
-
!!this.selectedBreakpoint && !!this.selectedBreakpoint.breakpoint && this.selectedBreakpoint.breakpoint.enabled,
|
|
600
|
-
isEnabled: () =>
|
|
601
|
-
!!this.selectedBreakpoint && !!this.selectedBreakpoint.breakpoint && this.selectedBreakpoint.breakpoint.enabled,
|
|
602
|
-
});
|
|
603
|
-
commands.registerCommand(DEBUG_COMMANDS.ENABLE_BREAKPOINT, {
|
|
604
|
-
execute: async (position: monaco.Position) => {
|
|
605
|
-
const { selectedBreakpoint } = this;
|
|
606
|
-
if (selectedBreakpoint) {
|
|
607
|
-
const { uri } = selectedBreakpoint.model;
|
|
608
|
-
const breakpoint = this.breakpointManager.getBreakpoint(uri, position.lineNumber);
|
|
609
|
-
if (breakpoint) {
|
|
610
|
-
breakpoint.enabled = true;
|
|
611
|
-
this.breakpointManager.updateBreakpoint(breakpoint);
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
},
|
|
615
|
-
isVisible: () =>
|
|
616
|
-
!!this.selectedBreakpoint &&
|
|
617
|
-
!!this.selectedBreakpoint.breakpoint &&
|
|
618
|
-
!this.selectedBreakpoint.breakpoint.enabled,
|
|
619
|
-
isEnabled: () =>
|
|
620
|
-
!!this.selectedBreakpoint &&
|
|
621
|
-
!!this.selectedBreakpoint.breakpoint &&
|
|
622
|
-
!this.selectedBreakpoint.breakpoint.enabled,
|
|
623
|
-
});
|
|
624
|
-
commands.registerCommand(DEBUG_COMMANDS.DELETE_BREAKPOINT, {
|
|
625
|
-
execute: async (position: monaco.Position) => {
|
|
626
|
-
const { selectedBreakpoint } = this;
|
|
627
|
-
if (selectedBreakpoint) {
|
|
628
|
-
const { uri } = selectedBreakpoint.model;
|
|
629
|
-
const breakpoint = this.breakpointManager.getBreakpoint(uri, position.lineNumber);
|
|
630
|
-
if (breakpoint) {
|
|
631
|
-
this.breakpointManager.delBreakpoint(breakpoint);
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
},
|
|
635
|
-
isVisible: () => !!this.selectedBreakpoint && !!this.selectedBreakpoint.breakpoint,
|
|
636
|
-
isEnabled: () => !!this.selectedBreakpoint && !!this.selectedBreakpoint.breakpoint,
|
|
637
|
-
});
|
|
638
|
-
|
|
639
|
-
commands.registerCommand(DEBUG_COMMANDS.ADD_CONDITIONAL_BREAKPOINT, {
|
|
640
|
-
execute: async (position: monaco.Position) => {
|
|
641
|
-
const { selectedBreakpoint } = this;
|
|
642
|
-
if (selectedBreakpoint) {
|
|
643
|
-
const { uri, openBreakpointView, toggleBreakpoint } = selectedBreakpoint.model;
|
|
644
|
-
toggleBreakpoint(position);
|
|
645
|
-
const breakpoint = this.breakpointManager.getBreakpoint(uri, position!.lineNumber);
|
|
646
|
-
// 更新当前右键选中的断点
|
|
647
|
-
if (breakpoint) {
|
|
648
|
-
this.breakpointManager.selectedBreakpoint = {
|
|
649
|
-
breakpoint,
|
|
650
|
-
model: selectedBreakpoint.model,
|
|
651
|
-
};
|
|
652
|
-
}
|
|
653
|
-
openBreakpointView(position, selectedBreakpoint.breakpoint && selectedBreakpoint.breakpoint.raw, 'condition');
|
|
654
|
-
}
|
|
655
|
-
},
|
|
656
|
-
isVisible: () => !!this.selectedBreakpoint && !this.selectedBreakpoint.breakpoint,
|
|
657
|
-
isEnabled: () => !!this.selectedBreakpoint && !this.selectedBreakpoint.breakpoint,
|
|
658
|
-
});
|
|
659
|
-
commands.registerCommand(DEBUG_COMMANDS.ADD_LOGPOINT, {
|
|
660
|
-
execute: async (position: monaco.Position) => {
|
|
661
|
-
const { selectedBreakpoint } = this;
|
|
662
|
-
if (selectedBreakpoint) {
|
|
663
|
-
const { openBreakpointView, toggleBreakpoint, uri } = selectedBreakpoint.model;
|
|
664
|
-
toggleBreakpoint(position);
|
|
665
|
-
const breakpoint = this.breakpointManager.getBreakpoint(uri, position!.lineNumber);
|
|
666
|
-
// 更新当前右键选中的断点
|
|
667
|
-
if (breakpoint) {
|
|
668
|
-
this.breakpointManager.selectedBreakpoint = {
|
|
669
|
-
breakpoint,
|
|
670
|
-
model: selectedBreakpoint.model,
|
|
671
|
-
};
|
|
672
|
-
}
|
|
673
|
-
openBreakpointView(
|
|
674
|
-
position,
|
|
675
|
-
selectedBreakpoint.breakpoint && selectedBreakpoint.breakpoint.raw,
|
|
676
|
-
'logMessage',
|
|
677
|
-
);
|
|
678
|
-
}
|
|
679
|
-
},
|
|
680
|
-
isVisible: () => !!this.selectedBreakpoint && !this.selectedBreakpoint.breakpoint,
|
|
681
|
-
isEnabled: () => !!this.selectedBreakpoint && !this.selectedBreakpoint.breakpoint,
|
|
682
|
-
});
|
|
683
|
-
commands.registerCommand(DEBUG_COMMANDS.ADD_BREAKPOINT, {
|
|
684
|
-
execute: async (position: monaco.Position) => {
|
|
685
|
-
const { selectedBreakpoint } = this;
|
|
686
|
-
if (selectedBreakpoint) {
|
|
687
|
-
const { toggleBreakpoint } = selectedBreakpoint.model;
|
|
688
|
-
toggleBreakpoint(position);
|
|
689
|
-
}
|
|
690
|
-
},
|
|
691
|
-
isVisible: () => !!this.selectedBreakpoint && !this.selectedBreakpoint.breakpoint,
|
|
692
|
-
isEnabled: () => !!this.selectedBreakpoint && !this.selectedBreakpoint.breakpoint,
|
|
693
|
-
});
|
|
694
|
-
|
|
695
|
-
commands.registerCommand(DebugBreakpointWidgetCommands.ACCEPT, {
|
|
696
|
-
execute: () => {
|
|
697
|
-
const { selectedBreakpoint } = this;
|
|
698
|
-
if (selectedBreakpoint) {
|
|
699
|
-
const { acceptBreakpoint } = selectedBreakpoint.model;
|
|
700
|
-
acceptBreakpoint();
|
|
701
|
-
}
|
|
702
|
-
},
|
|
703
|
-
isVisible: () => !!this.selectedBreakpoint && !!this.selectedBreakpoint.breakpoint,
|
|
704
|
-
isEnabled: () => !!this.selectedBreakpoint && !!this.selectedBreakpoint.breakpoint,
|
|
705
|
-
});
|
|
706
|
-
commands.registerCommand(DebugBreakpointWidgetCommands.CLOSE, {
|
|
707
|
-
execute: () => {
|
|
708
|
-
const { selectedBreakpoint } = this;
|
|
709
|
-
if (selectedBreakpoint) {
|
|
710
|
-
const { closeBreakpointView } = selectedBreakpoint.model;
|
|
711
|
-
closeBreakpointView();
|
|
712
|
-
}
|
|
713
|
-
},
|
|
714
|
-
isVisible: () => !!this.selectedBreakpoint && !!this.selectedBreakpoint.breakpoint,
|
|
715
|
-
isEnabled: () => !!this.selectedBreakpoint && !!this.selectedBreakpoint.breakpoint,
|
|
716
|
-
});
|
|
717
|
-
commands.registerCommand(DEBUG_COMMANDS.RUN_TO_CURSOR, {
|
|
718
|
-
execute: (uri: URI) => {
|
|
719
|
-
this.debugRunToCursorService.run(uri);
|
|
720
|
-
},
|
|
721
|
-
isEnabled: () => this.debugContextKey.contextDebugState.get() === 'Stopped',
|
|
722
|
-
});
|
|
723
|
-
commands.registerCommand(DEBUG_COMMANDS.FORCE_RUN_TO_CURSOR, {
|
|
724
|
-
execute: (uri: URI) => {
|
|
725
|
-
this.debugRunToCursorService.run(uri, true);
|
|
726
|
-
},
|
|
727
|
-
isEnabled: () => this.debugContextKey.contextDebugState.get() === 'Stopped',
|
|
728
|
-
});
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
registerToolbarItems(registry: ToolbarRegistry) {
|
|
732
|
-
/**
|
|
733
|
-
* end
|
|
734
|
-
*/
|
|
735
|
-
|
|
736
|
-
/**
|
|
737
|
-
* 断点面板菜单
|
|
738
|
-
*/
|
|
739
|
-
registry.registerItem({
|
|
740
|
-
id: DEBUG_COMMANDS.REMOVE_ALL_BREAKPOINTS.id,
|
|
741
|
-
command: DEBUG_COMMANDS.REMOVE_ALL_BREAKPOINTS.id,
|
|
742
|
-
viewId: DEBUG_BREAKPOINTS_ID,
|
|
743
|
-
tooltip: localize('debug.breakpoint.removeAll'),
|
|
744
|
-
});
|
|
745
|
-
|
|
746
|
-
registry.registerItem({
|
|
747
|
-
id: DEBUG_COMMANDS.TOGGLE_BREAKPOINTS.id,
|
|
748
|
-
command: DEBUG_COMMANDS.TOGGLE_BREAKPOINTS.id,
|
|
749
|
-
viewId: DEBUG_BREAKPOINTS_ID,
|
|
750
|
-
tooltip: localize('debug.breakpoint.toggle'),
|
|
751
|
-
});
|
|
752
|
-
/**
|
|
753
|
-
* end
|
|
754
|
-
*/
|
|
755
|
-
}
|
|
756
|
-
|
|
757
|
-
registerSchema(registry: IJSONSchemaRegistry) {
|
|
758
|
-
registry.registerSchema(`${launchSchemaUri}/default`, launchSchema, ['launch.json']);
|
|
759
|
-
}
|
|
760
|
-
|
|
761
|
-
registerKeybindings(keybindings: KeybindingRegistry) {
|
|
762
|
-
keybindings.registerKeybinding({
|
|
763
|
-
command: DEBUG_COMMANDS.START.id,
|
|
764
|
-
keybinding: 'f5',
|
|
765
|
-
when: `!${CONTEXT_IN_DEBUG_MODE.raw}`,
|
|
766
|
-
});
|
|
767
|
-
keybindings.registerKeybinding({
|
|
768
|
-
command: DEBUG_COMMANDS.CONTINUE.id,
|
|
769
|
-
keybinding: 'f5',
|
|
770
|
-
when: CONTEXT_IN_DEBUG_MODE.raw,
|
|
771
|
-
});
|
|
772
|
-
keybindings.registerKeybinding({
|
|
773
|
-
command: DEBUG_COMMANDS.STOP.id,
|
|
774
|
-
keybinding: 'shift+f5',
|
|
775
|
-
when: CONTEXT_IN_DEBUG_MODE.raw,
|
|
776
|
-
});
|
|
777
|
-
keybindings.registerKeybinding({
|
|
778
|
-
command: DEBUG_COMMANDS.NEXT.id,
|
|
779
|
-
keybinding: 'f11',
|
|
780
|
-
when: CONTEXT_IN_DEBUG_MODE.raw,
|
|
781
|
-
});
|
|
782
|
-
keybindings.registerKeybinding({
|
|
783
|
-
command: DEBUG_COMMANDS.PREV.id,
|
|
784
|
-
keybinding: 'shift+f11',
|
|
785
|
-
when: CONTEXT_IN_DEBUG_MODE.raw,
|
|
786
|
-
});
|
|
787
|
-
keybindings.registerKeybinding({
|
|
788
|
-
command: DEBUG_COMMANDS.OVER.id,
|
|
789
|
-
keybinding: 'f10',
|
|
790
|
-
when: CONTEXT_IN_DEBUG_MODE.raw,
|
|
791
|
-
});
|
|
792
|
-
keybindings.registerKeybinding({
|
|
793
|
-
command: DEBUG_COMMANDS.RESTART.id,
|
|
794
|
-
keybinding: 'shift+ctrlcmd+f5',
|
|
795
|
-
when: CONTEXT_IN_DEBUG_MODE.raw,
|
|
796
|
-
});
|
|
797
|
-
|
|
798
|
-
keybindings.registerKeybinding({
|
|
799
|
-
command: DebugBreakpointWidgetCommands.ACCEPT.id,
|
|
800
|
-
keybinding: 'enter',
|
|
801
|
-
when: CONTEXT_BREAKPOINT_INPUT_FOCUSED.raw,
|
|
802
|
-
});
|
|
803
|
-
keybindings.registerKeybinding({
|
|
804
|
-
command: DebugBreakpointWidgetCommands.CLOSE.id,
|
|
805
|
-
keybinding: 'esc',
|
|
806
|
-
when: CONTEXT_BREAKPOINT_INPUT_FOCUSED.raw,
|
|
807
|
-
});
|
|
808
|
-
keybindings.registerKeybinding({
|
|
809
|
-
command: DEBUG_COMMANDS.EXCEPTION_WIDGET_CLOSE.id,
|
|
810
|
-
keybinding: 'esc',
|
|
811
|
-
when: CONTEXT_EXCEPTION_WIDGET_VISIBLE.raw,
|
|
812
|
-
});
|
|
813
|
-
}
|
|
814
|
-
|
|
815
|
-
registerMenus(menuRegistry: IMenuRegistry) {
|
|
816
|
-
menuRegistry.registerMenuItem(MenuId.DebugBreakpointsContext, {
|
|
817
|
-
command: DEBUG_COMMANDS.DELETE_BREAKPOINT.id,
|
|
818
|
-
group: '1_has_breakpoint',
|
|
819
|
-
order: 1,
|
|
820
|
-
});
|
|
821
|
-
menuRegistry.registerMenuItem(MenuId.DebugBreakpointsContext, {
|
|
822
|
-
command: DEBUG_COMMANDS.EDIT_BREAKPOINT.id,
|
|
823
|
-
group: '1_has_breakpoint',
|
|
824
|
-
order: 2,
|
|
825
|
-
});
|
|
826
|
-
menuRegistry.registerMenuItem(MenuId.DebugBreakpointsContext, {
|
|
827
|
-
command: DEBUG_COMMANDS.DISABLE_BREAKPOINT.id,
|
|
828
|
-
group: '1_has_breakpoint',
|
|
829
|
-
order: 3,
|
|
830
|
-
});
|
|
831
|
-
menuRegistry.registerMenuItem(MenuId.DebugBreakpointsContext, {
|
|
832
|
-
command: DEBUG_COMMANDS.ENABLE_BREAKPOINT.id,
|
|
833
|
-
group: '1_has_breakpoint',
|
|
834
|
-
order: 4,
|
|
835
|
-
});
|
|
836
|
-
|
|
837
|
-
menuRegistry.registerMenuItem(MenuId.DebugBreakpointsContext, {
|
|
838
|
-
command: DEBUG_COMMANDS.ADD_BREAKPOINT.id,
|
|
839
|
-
group: '2_has_not_breakpoint',
|
|
840
|
-
});
|
|
841
|
-
menuRegistry.registerMenuItem(MenuId.DebugBreakpointsContext, {
|
|
842
|
-
command: DEBUG_COMMANDS.ADD_CONDITIONAL_BREAKPOINT.id,
|
|
843
|
-
group: '2_has_not_breakpoint',
|
|
844
|
-
});
|
|
845
|
-
menuRegistry.registerMenuItem(MenuId.DebugBreakpointsContext, {
|
|
846
|
-
command: DEBUG_COMMANDS.ADD_LOGPOINT.id,
|
|
847
|
-
group: '2_has_not_breakpoint',
|
|
848
|
-
});
|
|
849
|
-
|
|
850
|
-
// editor/context
|
|
851
|
-
menuRegistry.registerMenuItem(MenuId.EditorContext, {
|
|
852
|
-
command: {
|
|
853
|
-
id: DEBUG_COMMANDS.RUN_TO_CURSOR.id,
|
|
854
|
-
label: DEBUG_COMMANDS.RUN_TO_CURSOR.label,
|
|
855
|
-
},
|
|
856
|
-
when: `${CONTEXT_IN_DEBUG_MODE.raw}`,
|
|
857
|
-
group: 'debug',
|
|
858
|
-
order: 2,
|
|
859
|
-
});
|
|
860
|
-
menuRegistry.registerMenuItem(MenuId.EditorContext, {
|
|
861
|
-
command: {
|
|
862
|
-
id: DEBUG_COMMANDS.FORCE_RUN_TO_CURSOR.id,
|
|
863
|
-
label: DEBUG_COMMANDS.FORCE_RUN_TO_CURSOR.label,
|
|
864
|
-
},
|
|
865
|
-
when: `${CONTEXT_IN_DEBUG_MODE.raw}`,
|
|
866
|
-
group: 'debug',
|
|
867
|
-
order: 2,
|
|
868
|
-
});
|
|
869
|
-
|
|
870
|
-
menuRegistry.registerMenuItem(MenuId.EditorTitle, {
|
|
871
|
-
submenu: MenuId.EditorTitleRun,
|
|
872
|
-
label: localize('debug.menu.title.run'),
|
|
873
|
-
iconClass: getIcon('start'),
|
|
874
|
-
group: 'navigation',
|
|
875
|
-
order: -1,
|
|
876
|
-
});
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
protected isPosition(position: monaco.Position): boolean {
|
|
880
|
-
return position instanceof monaco.Position;
|
|
881
|
-
}
|
|
882
|
-
|
|
883
|
-
registerEditorFeature(registry: IEditorFeatureRegistry) {
|
|
884
|
-
let debugEditorContribution: DebugEditorContribution;
|
|
885
|
-
|
|
886
|
-
registry.registerEditorFeatureContribution({
|
|
887
|
-
contribute: (editor: IEditor) => {
|
|
888
|
-
debugEditorContribution = this.injector.get(DebugEditorContribution, [editor]);
|
|
889
|
-
return debugEditorContribution.contribute(editor);
|
|
890
|
-
},
|
|
891
|
-
});
|
|
892
|
-
// 这里是为了通过 MonacoOverrideServiceRegistry 来获取 codeEditorService ,但由于存在时序问题,所以加个 setTimeout 0
|
|
893
|
-
setTimeout(() => {
|
|
894
|
-
debugEditorContribution?.registerDecorationType();
|
|
895
|
-
}, 0);
|
|
896
|
-
this.preferenceSettings.setEnumLabels(
|
|
897
|
-
'debug.console.filter.mode' as keyof CoreConfiguration,
|
|
898
|
-
{
|
|
899
|
-
filter: localize('preference.debug.console.filter.mode.filter'),
|
|
900
|
-
matcher: localize('preference.debug.console.filter.mode.matcher'),
|
|
901
|
-
} as { [key in CoreConfiguration['debug.console.filter.mode']]: string },
|
|
902
|
-
);
|
|
903
|
-
}
|
|
904
|
-
}
|