@theia/debug 1.45.0 → 1.46.0-next.72
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/README.md +62 -62
- package/lib/browser/breakpoint/breakpoint-manager.d.ts +70 -70
- package/lib/browser/breakpoint/breakpoint-manager.js +328 -328
- package/lib/browser/breakpoint/breakpoint-marker.d.ts +41 -41
- package/lib/browser/breakpoint/breakpoint-marker.js +87 -87
- package/lib/browser/console/debug-console-contribution.d.ts +40 -40
- package/lib/browser/console/debug-console-contribution.js +231 -231
- package/lib/browser/console/debug-console-items.d.ts +93 -93
- package/lib/browser/console/debug-console-items.js +319 -319
- package/lib/browser/console/debug-console-session.d.ts +31 -31
- package/lib/browser/console/debug-console-session.js +199 -199
- package/lib/browser/debug-call-stack-item-type-key.d.ts +3 -3
- package/lib/browser/debug-call-stack-item-type-key.js +19 -19
- package/lib/browser/debug-configuration-manager.d.ts +102 -102
- package/lib/browser/debug-configuration-manager.js +552 -552
- package/lib/browser/debug-configuration-model.d.ts +29 -29
- package/lib/browser/debug-configuration-model.js +79 -79
- package/lib/browser/debug-contribution.d.ts +22 -22
- package/lib/browser/debug-contribution.js +19 -19
- package/lib/browser/debug-frontend-application-contribution.d.ts +222 -222
- package/lib/browser/debug-frontend-application-contribution.js +1404 -1404
- package/lib/browser/debug-frontend-module.d.ts +4 -4
- package/lib/browser/debug-frontend-module.d.ts.map +1 -1
- package/lib/browser/debug-frontend-module.js +105 -104
- package/lib/browser/debug-frontend-module.js.map +1 -1
- package/lib/browser/debug-package.spec.js +18 -18
- package/lib/browser/debug-preferences.d.ts +17 -17
- package/lib/browser/debug-preferences.js +89 -89
- package/lib/browser/debug-prefix-configuration.d.ts +51 -51
- package/lib/browser/debug-prefix-configuration.js +208 -208
- package/lib/browser/debug-resource.d.ts +14 -14
- package/lib/browser/debug-resource.js +65 -65
- package/lib/browser/debug-schema-updater.d.ts +15 -15
- package/lib/browser/debug-schema-updater.js +168 -168
- package/lib/browser/debug-session-connection.d.ts +110 -110
- package/lib/browser/debug-session-connection.js +258 -258
- package/lib/browser/debug-session-contribution.d.ts +73 -73
- package/lib/browser/debug-session-contribution.js +145 -145
- package/lib/browser/debug-session-manager.d.ts +137 -137
- package/lib/browser/debug-session-manager.js +599 -599
- package/lib/browser/debug-session-manager.js.map +1 -1
- package/lib/browser/debug-session-options.d.ts +48 -48
- package/lib/browser/debug-session-options.js +85 -85
- package/lib/browser/debug-session.d.ts +178 -178
- package/lib/browser/debug-session.js +871 -871
- package/lib/browser/debug-tab-bar-decorator.d.ts +16 -16
- package/lib/browser/debug-tab-bar-decorator.js +70 -70
- package/lib/browser/debug-watch-manager.d.ts +21 -21
- package/lib/browser/debug-watch-manager.js +93 -93
- package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.d.ts +6 -6
- package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.js +38 -38
- package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.d.ts +19 -19
- package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.js +110 -110
- package/lib/browser/disassembly-view/disassembly-view-contribution.d.ts +24 -24
- package/lib/browser/disassembly-view/disassembly-view-contribution.js +131 -131
- package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.d.ts +38 -38
- package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.js +222 -222
- package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.js.map +1 -1
- package/lib/browser/disassembly-view/disassembly-view-table-delegate.d.ts +15 -15
- package/lib/browser/disassembly-view/disassembly-view-table-delegate.js +38 -38
- package/lib/browser/disassembly-view/disassembly-view-utilities.d.ts +37 -37
- package/lib/browser/disassembly-view/disassembly-view-utilities.js +17 -17
- package/lib/browser/disassembly-view/disassembly-view-widget.d.ts +60 -60
- package/lib/browser/disassembly-view/disassembly-view-widget.js +453 -452
- package/lib/browser/disassembly-view/disassembly-view-widget.js.map +1 -1
- package/lib/browser/editor/debug-breakpoint-widget.d.ts +53 -53
- package/lib/browser/editor/debug-breakpoint-widget.js +261 -261
- package/lib/browser/editor/debug-editor-model.d.ts +91 -93
- package/lib/browser/editor/debug-editor-model.d.ts.map +1 -1
- package/lib/browser/editor/debug-editor-model.js +515 -516
- package/lib/browser/editor/debug-editor-model.js.map +1 -1
- package/lib/browser/editor/debug-editor-service.d.ts +35 -35
- package/lib/browser/editor/debug-editor-service.js +202 -202
- package/lib/browser/editor/debug-editor.d.ts +3 -3
- package/lib/browser/editor/debug-editor.js +19 -19
- package/lib/browser/editor/debug-exception-widget.d.ts +29 -29
- package/lib/browser/editor/debug-exception-widget.js +114 -114
- package/lib/browser/editor/debug-expression-provider.d.ts +11 -11
- package/lib/browser/editor/debug-expression-provider.js +81 -81
- package/lib/browser/editor/debug-hover-source.d.ts +18 -18
- package/lib/browser/editor/debug-hover-source.js +117 -117
- package/lib/browser/editor/debug-hover-widget.d.ts +47 -47
- package/lib/browser/editor/debug-hover-widget.js +276 -276
- package/lib/browser/editor/debug-inline-value-decorator.d.ts +19 -21
- package/lib/browser/editor/debug-inline-value-decorator.d.ts.map +1 -1
- package/lib/browser/editor/debug-inline-value-decorator.js +333 -337
- package/lib/browser/editor/debug-inline-value-decorator.js.map +1 -1
- package/lib/browser/model/debug-breakpoint.d.ts +47 -47
- package/lib/browser/model/debug-breakpoint.js +109 -109
- package/lib/browser/model/debug-function-breakpoint.d.ts +18 -18
- package/lib/browser/model/debug-function-breakpoint.js +92 -92
- package/lib/browser/model/debug-instruction-breakpoint.d.ts +14 -14
- package/lib/browser/model/debug-instruction-breakpoint.js +65 -65
- package/lib/browser/model/debug-source-breakpoint.d.ts +37 -37
- package/lib/browser/model/debug-source-breakpoint.js +217 -217
- package/lib/browser/model/debug-source.d.ts +24 -24
- package/lib/browser/model/debug-source.js +80 -80
- package/lib/browser/model/debug-stack-frame.d.ts +41 -41
- package/lib/browser/model/debug-stack-frame.js +150 -150
- package/lib/browser/model/debug-thread.d.ts +62 -62
- package/lib/browser/model/debug-thread.js +237 -237
- package/lib/browser/preferences/launch-preferences.d.ts +4 -4
- package/lib/browser/preferences/launch-preferences.js +38 -38
- package/lib/browser/view/debug-action.d.ts +16 -16
- package/lib/browser/view/debug-action.js +43 -43
- package/lib/browser/view/debug-breakpoints-source.d.ts +9 -9
- package/lib/browser/view/debug-breakpoints-source.js +70 -70
- package/lib/browser/view/debug-breakpoints-widget.d.ts +22 -22
- package/lib/browser/view/debug-breakpoints-widget.js +87 -87
- package/lib/browser/view/debug-configuration-select.d.ts +64 -64
- package/lib/browser/view/debug-configuration-select.js +216 -216
- package/lib/browser/view/debug-configuration-widget.d.ts +30 -30
- package/lib/browser/view/debug-configuration-widget.js +135 -135
- package/lib/browser/view/debug-exception-breakpoint.d.ts +14 -14
- package/lib/browser/view/debug-exception-breakpoint.js +61 -61
- package/lib/browser/view/debug-session-widget.d.ts +28 -28
- package/lib/browser/view/debug-session-widget.js +134 -134
- package/lib/browser/view/debug-stack-frames-source.d.ts +17 -17
- package/lib/browser/view/debug-stack-frames-source.js +89 -89
- package/lib/browser/view/debug-stack-frames-widget.d.ts +24 -24
- package/lib/browser/view/debug-stack-frames-widget.js +154 -154
- package/lib/browser/view/debug-threads-source.d.ts +8 -8
- package/lib/browser/view/debug-threads-source.js +63 -63
- package/lib/browser/view/debug-threads-widget.d.ts +26 -26
- package/lib/browser/view/debug-threads-widget.js +145 -145
- package/lib/browser/view/debug-toolbar-widget.d.ts +34 -34
- package/lib/browser/view/debug-toolbar-widget.js +156 -156
- package/lib/browser/view/debug-variables-source.d.ts +9 -9
- package/lib/browser/view/debug-variables-source.js +60 -60
- package/lib/browser/view/debug-variables-widget.d.ts +16 -16
- package/lib/browser/view/debug-variables-widget.js +78 -78
- package/lib/browser/view/debug-view-model.d.ts +51 -51
- package/lib/browser/view/debug-view-model.js +220 -220
- package/lib/browser/view/debug-watch-expression.d.ts +30 -30
- package/lib/browser/view/debug-watch-expression.js +73 -73
- package/lib/browser/view/debug-watch-source.d.ts +9 -9
- package/lib/browser/view/debug-watch-source.js +58 -58
- package/lib/browser/view/debug-watch-widget.d.ts +16 -16
- package/lib/browser/view/debug-watch-widget.js +78 -78
- package/lib/browser/view/debug-widget.d.ts +23 -23
- package/lib/browser/view/debug-widget.js +108 -108
- package/lib/common/debug-adapter-contribution-registry.d.ts +59 -59
- package/lib/common/debug-adapter-contribution-registry.js +212 -212
- package/lib/common/debug-adapter-session.d.ts +18 -18
- package/lib/common/debug-adapter-session.js +78 -78
- package/lib/common/debug-common.d.ts +1 -1
- package/lib/common/debug-common.js +29 -29
- package/lib/common/debug-compound.d.ts +14 -14
- package/lib/common/debug-compound.js +27 -27
- package/lib/common/debug-configuration.d.ts +70 -70
- package/lib/common/debug-configuration.js +31 -31
- package/lib/common/debug-model.d.ts +152 -152
- package/lib/common/debug-model.js +35 -35
- package/lib/common/debug-service.d.ts +123 -123
- package/lib/common/debug-service.js +66 -66
- package/lib/common/debug-uri-utils.d.ts +23 -23
- package/lib/common/debug-uri-utils.js +26 -26
- package/lib/common/inline-debug-adapter.d.ts +18 -18
- package/lib/common/inline-debug-adapter.js +44 -44
- package/lib/node/debug-adapter-factory.d.ts +19 -19
- package/lib/node/debug-adapter-factory.js +96 -96
- package/lib/node/debug-adapter-session-manager.d.ts +37 -37
- package/lib/node/debug-adapter-session-manager.js +111 -111
- package/lib/node/debug-backend-module.d.ts +3 -3
- package/lib/node/debug-backend-module.js +41 -41
- package/lib/node/debug-service-impl.d.ts +30 -30
- package/lib/node/debug-service-impl.js +124 -124
- package/lib/node/stream-debug-adapter.d.ts +36 -36
- package/lib/node/stream-debug-adapter.js +112 -112
- package/package.json +16 -16
- package/src/browser/breakpoint/breakpoint-manager.ts +369 -369
- package/src/browser/breakpoint/breakpoint-marker.ts +104 -104
- package/src/browser/console/debug-console-contribution.tsx +240 -240
- package/src/browser/console/debug-console-items.tsx +384 -384
- package/src/browser/console/debug-console-session.ts +205 -205
- package/src/browser/debug-call-stack-item-type-key.ts +20 -20
- package/src/browser/debug-configuration-manager.ts +591 -591
- package/src/browser/debug-configuration-model.ts +100 -100
- package/src/browser/debug-contribution.ts +43 -43
- package/src/browser/debug-frontend-application-contribution.ts +1551 -1551
- package/src/browser/debug-frontend-module.ts +133 -132
- package/src/browser/debug-package.spec.ts +20 -20
- package/src/browser/debug-preferences.ts +98 -98
- package/src/browser/debug-prefix-configuration.ts +195 -195
- package/src/browser/debug-resource.ts +59 -59
- package/src/browser/debug-schema-updater.ts +149 -149
- package/src/browser/debug-session-connection.ts +357 -357
- package/src/browser/debug-session-contribution.ts +150 -150
- package/src/browser/debug-session-manager.ts +682 -682
- package/src/browser/debug-session-options.ts +114 -114
- package/src/browser/debug-session.tsx +947 -947
- package/src/browser/debug-tab-bar-decorator.ts +57 -57
- package/src/browser/debug-watch-manager.ts +93 -93
- package/src/browser/disassembly-view/disassembly-view-accessibility-provider.ts +43 -43
- package/src/browser/disassembly-view/disassembly-view-breakpoint-renderer.ts +119 -119
- package/src/browser/disassembly-view/disassembly-view-contribution.ts +109 -109
- package/src/browser/disassembly-view/disassembly-view-instruction-renderer.ts +245 -245
- package/src/browser/disassembly-view/disassembly-view-table-delegate.ts +39 -39
- package/src/browser/disassembly-view/disassembly-view-utilities.ts +55 -55
- package/src/browser/disassembly-view/disassembly-view-widget.ts +463 -463
- package/src/browser/editor/debug-breakpoint-widget.tsx +293 -293
- package/src/browser/editor/debug-editor-model.ts +529 -528
- package/src/browser/editor/debug-editor-service.ts +192 -192
- package/src/browser/editor/debug-editor.ts +20 -20
- package/src/browser/editor/debug-exception-widget.tsx +122 -122
- package/src/browser/editor/debug-expression-provider.ts +78 -78
- package/src/browser/editor/debug-hover-source.tsx +105 -105
- package/src/browser/editor/debug-hover-widget.ts +298 -298
- package/src/browser/editor/debug-inline-value-decorator.ts +373 -377
- package/src/browser/model/debug-breakpoint.tsx +151 -151
- package/src/browser/model/debug-function-breakpoint.tsx +101 -101
- package/src/browser/model/debug-instruction-breakpoint.tsx +68 -68
- package/src/browser/model/debug-source-breakpoint.tsx +237 -237
- package/src/browser/model/debug-source.ts +93 -93
- package/src/browser/model/debug-stack-frame.tsx +170 -170
- package/src/browser/model/debug-thread.tsx +285 -285
- package/src/browser/preferences/launch-preferences.ts +38 -38
- package/src/browser/style/index.css +453 -453
- package/src/browser/view/debug-action.tsx +57 -57
- package/src/browser/view/debug-breakpoints-source.tsx +53 -53
- package/src/browser/view/debug-breakpoints-widget.ts +71 -71
- package/src/browser/view/debug-configuration-select.tsx +269 -269
- package/src/browser/view/debug-configuration-widget.tsx +121 -121
- package/src/browser/view/debug-exception-breakpoint.tsx +68 -68
- package/src/browser/view/debug-session-widget.ts +124 -124
- package/src/browser/view/debug-stack-frames-source.tsx +75 -75
- package/src/browser/view/debug-stack-frames-widget.ts +135 -135
- package/src/browser/view/debug-threads-source.tsx +48 -48
- package/src/browser/view/debug-threads-widget.ts +125 -125
- package/src/browser/view/debug-toolbar-widget.tsx +145 -145
- package/src/browser/view/debug-variables-source.ts +43 -43
- package/src/browser/view/debug-variables-widget.ts +61 -61
- package/src/browser/view/debug-view-model.ts +230 -230
- package/src/browser/view/debug-watch-expression.tsx +88 -88
- package/src/browser/view/debug-watch-source.ts +41 -41
- package/src/browser/view/debug-watch-widget.ts +61 -61
- package/src/browser/view/debug-widget.ts +97 -97
- package/src/common/debug-adapter-contribution-registry.ts +206 -206
- package/src/common/debug-adapter-session.ts +102 -102
- package/src/common/debug-common.ts +19 -19
- package/src/common/debug-compound.ts +33 -33
- package/src/common/debug-configuration.ts +108 -108
- package/src/common/debug-model.ts +200 -200
- package/src/common/debug-service.ts +184 -184
- package/src/common/debug-uri-utils.ts +24 -24
- package/src/common/inline-debug-adapter.ts +47 -47
- package/src/node/debug-adapter-factory.ts +107 -107
- package/src/node/debug-adapter-session-manager.ts +106 -106
- package/src/node/debug-backend-module.ts +57 -57
- package/src/node/debug-service-impl.ts +119 -119
- package/src/node/stream-debug-adapter.ts +126 -126
|
@@ -1,1405 +1,1405 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// *****************************************************************************
|
|
3
|
-
// Copyright (C) 2018 TypeFox and others.
|
|
4
|
-
//
|
|
5
|
-
// This program and the accompanying materials are made available under the
|
|
6
|
-
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
-
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
-
//
|
|
9
|
-
// This Source Code may also be made available under the following Secondary
|
|
10
|
-
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
-
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
-
// with the GNU Classpath Exception which is available at
|
|
13
|
-
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
-
//
|
|
15
|
-
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
-
// *****************************************************************************
|
|
17
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
-
};
|
|
23
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
-
};
|
|
26
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
-
exports.DebugFrontendApplicationContribution = exports.DebugBreakpointWidgetCommands = exports.DebugEditorContextCommands = exports.DebugSessionContextCommands = exports.DebugThreadContextCommands = exports.DebugCommands = exports.DebugMenus = void 0;
|
|
28
|
-
const browser_1 = require("@theia/core/lib/browser");
|
|
29
|
-
const inversify_1 = require("@theia/core/shared/inversify");
|
|
30
|
-
const monaco = require("@theia/monaco-editor-core");
|
|
31
|
-
const common_1 = require("@theia/core/lib/common");
|
|
32
|
-
const browser_2 = require("@theia/editor/lib/browser");
|
|
33
|
-
const debug_session_manager_1 = require("./debug-session-manager");
|
|
34
|
-
const debug_widget_1 = require("./view/debug-widget");
|
|
35
|
-
const breakpoint_marker_1 = require("./breakpoint/breakpoint-marker");
|
|
36
|
-
const breakpoint_manager_1 = require("./breakpoint/breakpoint-manager");
|
|
37
|
-
const debug_configuration_manager_1 = require("./debug-configuration-manager");
|
|
38
|
-
const debug_session_1 = require("./debug-session");
|
|
39
|
-
const debug_breakpoints_widget_1 = require("./view/debug-breakpoints-widget");
|
|
40
|
-
const debug_source_breakpoint_1 = require("./model/debug-source-breakpoint");
|
|
41
|
-
const debug_threads_widget_1 = require("./view/debug-threads-widget");
|
|
42
|
-
const debug_thread_1 = require("./model/debug-thread");
|
|
43
|
-
const debug_stack_frames_widget_1 = require("./view/debug-stack-frames-widget");
|
|
44
|
-
const debug_stack_frame_1 = require("./model/debug-stack-frame");
|
|
45
|
-
const debug_variables_widget_1 = require("./view/debug-variables-widget");
|
|
46
|
-
const debug_console_items_1 = require("./console/debug-console-items");
|
|
47
|
-
const debug_editor_model_1 = require("./editor/debug-editor-model");
|
|
48
|
-
const debug_editor_service_1 = require("./editor/debug-editor-service");
|
|
49
|
-
const debug_console_contribution_1 = require("./console/debug-console-contribution");
|
|
50
|
-
const debug_service_1 = require("../common/debug-service");
|
|
51
|
-
const debug_schema_updater_1 = require("./debug-schema-updater");
|
|
52
|
-
const debug_preferences_1 = require("./debug-preferences");
|
|
53
|
-
const debug_watch_widget_1 = require("./view/debug-watch-widget");
|
|
54
|
-
const debug_watch_expression_1 = require("./view/debug-watch-expression");
|
|
55
|
-
const debug_watch_manager_1 = require("./debug-watch-manager");
|
|
56
|
-
const debug_function_breakpoint_1 = require("./model/debug-function-breakpoint");
|
|
57
|
-
const debug_breakpoint_1 = require("./model/debug-breakpoint");
|
|
58
|
-
const nls_1 = require("@theia/core/lib/common/nls");
|
|
59
|
-
const debug_instruction_breakpoint_1 = require("./model/debug-instruction-breakpoint");
|
|
60
|
-
const debug_exception_breakpoint_1 = require("./view/debug-exception-breakpoint");
|
|
61
|
-
var DebugMenus;
|
|
62
|
-
(function (DebugMenus) {
|
|
63
|
-
DebugMenus.DEBUG = [...common_1.MAIN_MENU_BAR, '6_debug'];
|
|
64
|
-
DebugMenus.DEBUG_CONTROLS = [...DebugMenus.DEBUG, 'a_controls'];
|
|
65
|
-
DebugMenus.DEBUG_CONFIGURATION = [...DebugMenus.DEBUG, 'b_configuration'];
|
|
66
|
-
DebugMenus.DEBUG_THREADS = [...DebugMenus.DEBUG, 'c_threads'];
|
|
67
|
-
DebugMenus.DEBUG_SESSIONS = [...DebugMenus.DEBUG, 'd_sessions'];
|
|
68
|
-
DebugMenus.DEBUG_BREAKPOINT = [...DebugMenus.DEBUG, 'e_breakpoint'];
|
|
69
|
-
DebugMenus.DEBUG_NEW_BREAKPOINT = [...DebugMenus.DEBUG_BREAKPOINT, 'a_new_breakpoint'];
|
|
70
|
-
DebugMenus.DEBUG_BREAKPOINTS = [...DebugMenus.DEBUG, 'f_breakpoints'];
|
|
71
|
-
})(DebugMenus = exports.DebugMenus || (exports.DebugMenus = {}));
|
|
72
|
-
function nlsEditBreakpoint(breakpoint) {
|
|
73
|
-
return nls_1.nls.localizeByDefault('Edit {0}...', nls_1.nls.localizeByDefault(breakpoint));
|
|
74
|
-
}
|
|
75
|
-
function nlsRemoveBreakpoint(breakpoint) {
|
|
76
|
-
return nls_1.nls.localizeByDefault('Remove {0}', nls_1.nls.localizeByDefault(breakpoint));
|
|
77
|
-
}
|
|
78
|
-
function nlsEnableBreakpoint(breakpoint) {
|
|
79
|
-
return nls_1.nls.localizeByDefault('Enable {0}', nls_1.nls.localizeByDefault(breakpoint));
|
|
80
|
-
}
|
|
81
|
-
function nlsDisableBreakpoint(breakpoint) {
|
|
82
|
-
return nls_1.nls.localizeByDefault('Disable {0}', nls_1.nls.localizeByDefault(breakpoint));
|
|
83
|
-
}
|
|
84
|
-
var DebugCommands;
|
|
85
|
-
(function (DebugCommands) {
|
|
86
|
-
DebugCommands.DEBUG_CATEGORY = 'Debug';
|
|
87
|
-
DebugCommands.DEBUG_CATEGORY_KEY = nls_1.nls.getDefaultKey(DebugCommands.DEBUG_CATEGORY);
|
|
88
|
-
DebugCommands.START = common_1.Command.toDefaultLocalizedCommand({
|
|
89
|
-
id: 'workbench.action.debug.start',
|
|
90
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
91
|
-
label: 'Start Debugging',
|
|
92
|
-
iconClass: (0, browser_1.codicon)('debug-alt')
|
|
93
|
-
});
|
|
94
|
-
DebugCommands.START_NO_DEBUG = common_1.Command.toDefaultLocalizedCommand({
|
|
95
|
-
id: 'workbench.action.debug.run',
|
|
96
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
97
|
-
label: 'Start Without Debugging'
|
|
98
|
-
});
|
|
99
|
-
DebugCommands.STOP = common_1.Command.toDefaultLocalizedCommand({
|
|
100
|
-
id: 'workbench.action.debug.stop',
|
|
101
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
102
|
-
label: 'Stop',
|
|
103
|
-
iconClass: (0, browser_1.codicon)('debug-stop')
|
|
104
|
-
});
|
|
105
|
-
DebugCommands.RESTART = common_1.Command.toDefaultLocalizedCommand({
|
|
106
|
-
id: 'workbench.action.debug.restart',
|
|
107
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
108
|
-
label: 'Restart',
|
|
109
|
-
});
|
|
110
|
-
DebugCommands.OPEN_CONFIGURATIONS = common_1.Command.toDefaultLocalizedCommand({
|
|
111
|
-
id: 'debug.configurations.open',
|
|
112
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
113
|
-
label: 'Open Configurations'
|
|
114
|
-
});
|
|
115
|
-
DebugCommands.ADD_CONFIGURATION = common_1.Command.toDefaultLocalizedCommand({
|
|
116
|
-
id: 'debug.configurations.add',
|
|
117
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
118
|
-
label: 'Add Configuration...'
|
|
119
|
-
});
|
|
120
|
-
DebugCommands.STEP_OVER = common_1.Command.toDefaultLocalizedCommand({
|
|
121
|
-
id: 'workbench.action.debug.stepOver',
|
|
122
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
123
|
-
label: 'Step Over',
|
|
124
|
-
iconClass: (0, browser_1.codicon)('debug-step-over')
|
|
125
|
-
});
|
|
126
|
-
DebugCommands.STEP_INTO = common_1.Command.toDefaultLocalizedCommand({
|
|
127
|
-
id: 'workbench.action.debug.stepInto',
|
|
128
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
129
|
-
label: 'Step Into',
|
|
130
|
-
iconClass: (0, browser_1.codicon)('debug-step-into')
|
|
131
|
-
});
|
|
132
|
-
DebugCommands.STEP_OUT = common_1.Command.toDefaultLocalizedCommand({
|
|
133
|
-
id: 'workbench.action.debug.stepOut',
|
|
134
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
135
|
-
label: 'Step Out',
|
|
136
|
-
iconClass: (0, browser_1.codicon)('debug-step-out')
|
|
137
|
-
});
|
|
138
|
-
DebugCommands.CONTINUE = common_1.Command.toDefaultLocalizedCommand({
|
|
139
|
-
id: 'workbench.action.debug.continue',
|
|
140
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
141
|
-
label: 'Continue',
|
|
142
|
-
iconClass: (0, browser_1.codicon)('debug-continue')
|
|
143
|
-
});
|
|
144
|
-
DebugCommands.PAUSE = common_1.Command.toDefaultLocalizedCommand({
|
|
145
|
-
id: 'workbench.action.debug.pause',
|
|
146
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
147
|
-
label: 'Pause',
|
|
148
|
-
iconClass: (0, browser_1.codicon)('debug-pause')
|
|
149
|
-
});
|
|
150
|
-
DebugCommands.CONTINUE_ALL = common_1.Command.toLocalizedCommand({
|
|
151
|
-
id: 'debug.thread.continue.all',
|
|
152
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
153
|
-
label: 'Continue All',
|
|
154
|
-
iconClass: (0, browser_1.codicon)('debug-continue')
|
|
155
|
-
}, 'theia/debug/continueAll', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
156
|
-
DebugCommands.PAUSE_ALL = common_1.Command.toLocalizedCommand({
|
|
157
|
-
id: 'debug.thread.pause.all',
|
|
158
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
159
|
-
label: 'Pause All',
|
|
160
|
-
iconClass: (0, browser_1.codicon)('debug-pause')
|
|
161
|
-
}, 'theia/debug/pauseAll', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
162
|
-
DebugCommands.TOGGLE_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
|
|
163
|
-
id: 'editor.debug.action.toggleBreakpoint',
|
|
164
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
165
|
-
label: 'Toggle Breakpoint',
|
|
166
|
-
});
|
|
167
|
-
DebugCommands.INLINE_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
|
|
168
|
-
id: 'editor.debug.action.inlineBreakpoint',
|
|
169
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
170
|
-
label: 'Inline Breakpoint',
|
|
171
|
-
});
|
|
172
|
-
DebugCommands.ADD_CONDITIONAL_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
|
|
173
|
-
id: 'debug.breakpoint.add.conditional',
|
|
174
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
175
|
-
label: 'Add Conditional Breakpoint...',
|
|
176
|
-
});
|
|
177
|
-
DebugCommands.ADD_LOGPOINT = common_1.Command.toDefaultLocalizedCommand({
|
|
178
|
-
id: 'debug.breakpoint.add.logpoint',
|
|
179
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
180
|
-
label: 'Add Logpoint...',
|
|
181
|
-
});
|
|
182
|
-
DebugCommands.ADD_FUNCTION_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
|
|
183
|
-
id: 'debug.breakpoint.add.function',
|
|
184
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
185
|
-
label: 'Add Function Breakpoint',
|
|
186
|
-
});
|
|
187
|
-
DebugCommands.ENABLE_ALL_BREAKPOINTS = common_1.Command.toDefaultLocalizedCommand({
|
|
188
|
-
id: 'debug.breakpoint.enableAll',
|
|
189
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
190
|
-
label: 'Enable All Breakpoints',
|
|
191
|
-
});
|
|
192
|
-
DebugCommands.DISABLE_ALL_BREAKPOINTS = common_1.Command.toDefaultLocalizedCommand({
|
|
193
|
-
id: 'debug.breakpoint.disableAll',
|
|
194
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
195
|
-
label: 'Disable All Breakpoints',
|
|
196
|
-
});
|
|
197
|
-
DebugCommands.EDIT_BREAKPOINT = common_1.Command.toLocalizedCommand({
|
|
198
|
-
id: 'debug.breakpoint.edit',
|
|
199
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
200
|
-
originalLabel: 'Edit Breakpoint...',
|
|
201
|
-
label: nlsEditBreakpoint('Breakpoint')
|
|
202
|
-
}, '', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
203
|
-
DebugCommands.EDIT_LOGPOINT = common_1.Command.toLocalizedCommand({
|
|
204
|
-
id: 'debug.logpoint.edit',
|
|
205
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
206
|
-
originalLabel: 'Edit Logpoint...',
|
|
207
|
-
label: nlsEditBreakpoint('Logpoint')
|
|
208
|
-
}, '', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
209
|
-
DebugCommands.EDIT_BREAKPOINT_CONDITION = common_1.Command.toLocalizedCommand({
|
|
210
|
-
id: 'debug.breakpoint.editCondition',
|
|
211
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
212
|
-
label: 'Edit Condition...'
|
|
213
|
-
}, '', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
214
|
-
DebugCommands.REMOVE_BREAKPOINT = common_1.Command.toLocalizedCommand({
|
|
215
|
-
id: 'debug.breakpoint.remove',
|
|
216
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
217
|
-
originalLabel: 'Remove Breakpoint',
|
|
218
|
-
label: nlsRemoveBreakpoint('Breakpoint')
|
|
219
|
-
}, '', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
220
|
-
DebugCommands.REMOVE_LOGPOINT = common_1.Command.toLocalizedCommand({
|
|
221
|
-
id: 'debug.logpoint.remove',
|
|
222
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
223
|
-
originalLabel: 'Remove Logpoint',
|
|
224
|
-
label: nlsRemoveBreakpoint('Logpoint')
|
|
225
|
-
}, '', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
226
|
-
DebugCommands.REMOVE_ALL_BREAKPOINTS = common_1.Command.toDefaultLocalizedCommand({
|
|
227
|
-
id: 'debug.breakpoint.removeAll',
|
|
228
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
229
|
-
label: 'Remove All Breakpoints',
|
|
230
|
-
});
|
|
231
|
-
DebugCommands.TOGGLE_BREAKPOINTS_ENABLED = common_1.Command.toLocalizedCommand({
|
|
232
|
-
id: 'debug.breakpoint.toggleEnabled'
|
|
233
|
-
});
|
|
234
|
-
DebugCommands.SHOW_HOVER = common_1.Command.toDefaultLocalizedCommand({
|
|
235
|
-
id: 'editor.debug.action.showDebugHover',
|
|
236
|
-
label: 'Debug: Show Hover'
|
|
237
|
-
});
|
|
238
|
-
DebugCommands.RESTART_FRAME = common_1.Command.toDefaultLocalizedCommand({
|
|
239
|
-
id: 'debug.frame.restart',
|
|
240
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
241
|
-
label: 'Restart Frame',
|
|
242
|
-
});
|
|
243
|
-
DebugCommands.COPY_CALL_STACK = common_1.Command.toDefaultLocalizedCommand({
|
|
244
|
-
id: 'debug.callStack.copy',
|
|
245
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
246
|
-
label: 'Copy Call Stack',
|
|
247
|
-
});
|
|
248
|
-
DebugCommands.SET_VARIABLE_VALUE = common_1.Command.toDefaultLocalizedCommand({
|
|
249
|
-
id: 'debug.variable.setValue',
|
|
250
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
251
|
-
label: 'Set Value',
|
|
252
|
-
});
|
|
253
|
-
DebugCommands.COPY_VARIABLE_VALUE = common_1.Command.toDefaultLocalizedCommand({
|
|
254
|
-
id: 'debug.variable.copyValue',
|
|
255
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
256
|
-
label: 'Copy Value',
|
|
257
|
-
});
|
|
258
|
-
DebugCommands.COPY_VARIABLE_AS_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
|
|
259
|
-
id: 'debug.variable.copyAsExpression',
|
|
260
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
261
|
-
label: 'Copy as Expression',
|
|
262
|
-
});
|
|
263
|
-
DebugCommands.WATCH_VARIABLE = common_1.Command.toDefaultLocalizedCommand({
|
|
264
|
-
id: 'debug.variable.watch',
|
|
265
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
266
|
-
label: 'Add to Watch',
|
|
267
|
-
});
|
|
268
|
-
DebugCommands.ADD_WATCH_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
|
|
269
|
-
id: 'debug.watch.addExpression',
|
|
270
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
271
|
-
label: 'Add Expression'
|
|
272
|
-
});
|
|
273
|
-
DebugCommands.EDIT_WATCH_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
|
|
274
|
-
id: 'debug.watch.editExpression',
|
|
275
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
276
|
-
label: 'Edit Expression'
|
|
277
|
-
});
|
|
278
|
-
DebugCommands.COPY_WATCH_EXPRESSION_VALUE = common_1.Command.toLocalizedCommand({
|
|
279
|
-
id: 'debug.watch.copyExpressionValue',
|
|
280
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
281
|
-
label: 'Copy Expression Value'
|
|
282
|
-
}, 'theia/debug/copyExpressionValue', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
283
|
-
DebugCommands.REMOVE_WATCH_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
|
|
284
|
-
id: 'debug.watch.removeExpression',
|
|
285
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
286
|
-
label: 'Remove Expression'
|
|
287
|
-
});
|
|
288
|
-
DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS = common_1.Command.toDefaultLocalizedCommand({
|
|
289
|
-
id: 'debug.watch.collapseAllExpressions',
|
|
290
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
291
|
-
label: 'Collapse All'
|
|
292
|
-
});
|
|
293
|
-
DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS = common_1.Command.toDefaultLocalizedCommand({
|
|
294
|
-
id: 'debug.watch.removeAllExpressions',
|
|
295
|
-
category: DebugCommands.DEBUG_CATEGORY,
|
|
296
|
-
label: 'Remove All Expressions'
|
|
297
|
-
});
|
|
298
|
-
})(DebugCommands = exports.DebugCommands || (exports.DebugCommands = {}));
|
|
299
|
-
var DebugThreadContextCommands;
|
|
300
|
-
(function (DebugThreadContextCommands) {
|
|
301
|
-
DebugThreadContextCommands.STEP_OVER = {
|
|
302
|
-
id: 'debug.thread.context.context.next'
|
|
303
|
-
};
|
|
304
|
-
DebugThreadContextCommands.STEP_INTO = {
|
|
305
|
-
id: 'debug.thread.context.stepin'
|
|
306
|
-
};
|
|
307
|
-
DebugThreadContextCommands.STEP_OUT = {
|
|
308
|
-
id: 'debug.thread.context.stepout'
|
|
309
|
-
};
|
|
310
|
-
DebugThreadContextCommands.CONTINUE = {
|
|
311
|
-
id: 'debug.thread.context.continue'
|
|
312
|
-
};
|
|
313
|
-
DebugThreadContextCommands.PAUSE = {
|
|
314
|
-
id: 'debug.thread.context.pause'
|
|
315
|
-
};
|
|
316
|
-
DebugThreadContextCommands.TERMINATE = {
|
|
317
|
-
id: 'debug.thread.context.terminate'
|
|
318
|
-
};
|
|
319
|
-
})(DebugThreadContextCommands = exports.DebugThreadContextCommands || (exports.DebugThreadContextCommands = {}));
|
|
320
|
-
var DebugSessionContextCommands;
|
|
321
|
-
(function (DebugSessionContextCommands) {
|
|
322
|
-
DebugSessionContextCommands.STOP = {
|
|
323
|
-
id: 'debug.session.context.stop'
|
|
324
|
-
};
|
|
325
|
-
DebugSessionContextCommands.RESTART = {
|
|
326
|
-
id: 'debug.session.context.restart'
|
|
327
|
-
};
|
|
328
|
-
DebugSessionContextCommands.PAUSE_ALL = {
|
|
329
|
-
id: 'debug.session.context.pauseAll'
|
|
330
|
-
};
|
|
331
|
-
DebugSessionContextCommands.CONTINUE_ALL = {
|
|
332
|
-
id: 'debug.session.context.continueAll'
|
|
333
|
-
};
|
|
334
|
-
DebugSessionContextCommands.REVEAL = {
|
|
335
|
-
id: 'debug.session.context.reveal'
|
|
336
|
-
};
|
|
337
|
-
})(DebugSessionContextCommands = exports.DebugSessionContextCommands || (exports.DebugSessionContextCommands = {}));
|
|
338
|
-
var DebugEditorContextCommands;
|
|
339
|
-
(function (DebugEditorContextCommands) {
|
|
340
|
-
DebugEditorContextCommands.ADD_BREAKPOINT = {
|
|
341
|
-
id: 'debug.editor.context.addBreakpoint'
|
|
342
|
-
};
|
|
343
|
-
DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT = {
|
|
344
|
-
id: 'debug.editor.context.addBreakpoint.conditional'
|
|
345
|
-
};
|
|
346
|
-
DebugEditorContextCommands.ADD_LOGPOINT = {
|
|
347
|
-
id: 'debug.editor.context.add.logpoint'
|
|
348
|
-
};
|
|
349
|
-
DebugEditorContextCommands.REMOVE_BREAKPOINT = {
|
|
350
|
-
id: 'debug.editor.context.removeBreakpoint'
|
|
351
|
-
};
|
|
352
|
-
DebugEditorContextCommands.EDIT_BREAKPOINT = {
|
|
353
|
-
id: 'debug.editor.context.edit.breakpoint'
|
|
354
|
-
};
|
|
355
|
-
DebugEditorContextCommands.ENABLE_BREAKPOINT = {
|
|
356
|
-
id: 'debug.editor.context.enableBreakpoint'
|
|
357
|
-
};
|
|
358
|
-
DebugEditorContextCommands.DISABLE_BREAKPOINT = {
|
|
359
|
-
id: 'debug.editor.context.disableBreakpoint'
|
|
360
|
-
};
|
|
361
|
-
DebugEditorContextCommands.REMOVE_LOGPOINT = {
|
|
362
|
-
id: 'debug.editor.context.logpoint.remove'
|
|
363
|
-
};
|
|
364
|
-
DebugEditorContextCommands.EDIT_LOGPOINT = {
|
|
365
|
-
id: 'debug.editor.context.logpoint.edit'
|
|
366
|
-
};
|
|
367
|
-
DebugEditorContextCommands.ENABLE_LOGPOINT = {
|
|
368
|
-
id: 'debug.editor.context.logpoint.enable'
|
|
369
|
-
};
|
|
370
|
-
DebugEditorContextCommands.DISABLE_LOGPOINT = {
|
|
371
|
-
id: 'debug.editor.context.logpoint.disable'
|
|
372
|
-
};
|
|
373
|
-
})(DebugEditorContextCommands = exports.DebugEditorContextCommands || (exports.DebugEditorContextCommands = {}));
|
|
374
|
-
var DebugBreakpointWidgetCommands;
|
|
375
|
-
(function (DebugBreakpointWidgetCommands) {
|
|
376
|
-
DebugBreakpointWidgetCommands.ACCEPT = {
|
|
377
|
-
id: 'debug.breakpointWidget.accept'
|
|
378
|
-
};
|
|
379
|
-
DebugBreakpointWidgetCommands.CLOSE = {
|
|
380
|
-
id: 'debug.breakpointWidget.close'
|
|
381
|
-
};
|
|
382
|
-
})(DebugBreakpointWidgetCommands = exports.DebugBreakpointWidgetCommands || (exports.DebugBreakpointWidgetCommands = {}));
|
|
383
|
-
let DebugFrontendApplicationContribution = class DebugFrontendApplicationContribution extends browser_1.AbstractViewContribution {
|
|
384
|
-
constructor() {
|
|
385
|
-
super({
|
|
386
|
-
widgetId: debug_widget_1.DebugWidget.ID,
|
|
387
|
-
widgetName: debug_widget_1.DebugWidget.LABEL,
|
|
388
|
-
defaultWidgetOptions: {
|
|
389
|
-
area: 'left',
|
|
390
|
-
rank: 400
|
|
391
|
-
},
|
|
392
|
-
toggleCommandId: 'debug:toggle',
|
|
393
|
-
toggleKeybinding: 'ctrlcmd+shift+d'
|
|
394
|
-
});
|
|
395
|
-
this.firstSessionStart = true;
|
|
396
|
-
}
|
|
397
|
-
async initializeLayout() {
|
|
398
|
-
await this.openView();
|
|
399
|
-
}
|
|
400
|
-
async onStart() {
|
|
401
|
-
this.manager.onDidCreateDebugSession(session => this.openSession(session, { reveal: false }));
|
|
402
|
-
this.manager.onDidStartDebugSession(session => {
|
|
403
|
-
const { noDebug } = session.configuration;
|
|
404
|
-
const openDebug = session.configuration.openDebug || this.preference['debug.openDebug'];
|
|
405
|
-
const internalConsoleOptions = session.configuration.internalConsoleOptions || this.preference['debug.internalConsoleOptions'];
|
|
406
|
-
if (internalConsoleOptions === 'openOnSessionStart' ||
|
|
407
|
-
(internalConsoleOptions === 'openOnFirstSessionStart' && this.firstSessionStart)) {
|
|
408
|
-
this.console.openView({
|
|
409
|
-
reveal: true,
|
|
410
|
-
activate: false,
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
const shouldOpenDebug = openDebug === 'openOnSessionStart' || (openDebug === 'openOnFirstSessionStart' && this.firstSessionStart);
|
|
414
|
-
// Do not open debug view when suppressed via configuration
|
|
415
|
-
if (!noDebug && !this.getOption(session, 'suppressDebugView') && shouldOpenDebug) {
|
|
416
|
-
this.openSession(session);
|
|
417
|
-
}
|
|
418
|
-
this.firstSessionStart = false;
|
|
419
|
-
});
|
|
420
|
-
this.manager.onDidStopDebugSession(session => {
|
|
421
|
-
const { openDebug } = session.configuration;
|
|
422
|
-
if (!this.getOption(session, 'suppressDebugView') && openDebug === 'openOnDebugBreak') {
|
|
423
|
-
this.openSession(session);
|
|
424
|
-
}
|
|
425
|
-
});
|
|
426
|
-
this.updateStatusBar();
|
|
427
|
-
this.manager.onDidChange(() => this.updateStatusBar());
|
|
428
|
-
this.schemaUpdater.update();
|
|
429
|
-
this.configurations.load();
|
|
430
|
-
this.breakpointManager.load();
|
|
431
|
-
this.watchManager.load();
|
|
432
|
-
}
|
|
433
|
-
onStop() {
|
|
434
|
-
this.configurations.save();
|
|
435
|
-
this.breakpointManager.save();
|
|
436
|
-
this.watchManager.save();
|
|
437
|
-
}
|
|
438
|
-
onWillStop() {
|
|
439
|
-
if (this.preference['debug.confirmOnExit'] === 'always' && this.manager.currentSession) {
|
|
440
|
-
return {
|
|
441
|
-
reason: 'active-debug-sessions',
|
|
442
|
-
action: async () => {
|
|
443
|
-
if (this.manager.currentSession) {
|
|
444
|
-
const msg = this.manager.sessions.length === 1
|
|
445
|
-
? nls_1.nls.localizeByDefault('There is an active debug session, are you sure you want to stop it?')
|
|
446
|
-
: nls_1.nls.localizeByDefault('There are active debug sessions, are you sure you want to stop them?');
|
|
447
|
-
const safeToExit = await new browser_1.ConfirmDialog({
|
|
448
|
-
title: '',
|
|
449
|
-
msg,
|
|
450
|
-
ok: nls_1.nls.localizeByDefault('Stop Debugging'),
|
|
451
|
-
cancel: browser_1.Dialog.CANCEL,
|
|
452
|
-
}).open();
|
|
453
|
-
return safeToExit === true;
|
|
454
|
-
}
|
|
455
|
-
return true;
|
|
456
|
-
},
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
registerMenus(menus) {
|
|
461
|
-
super.registerMenus(menus);
|
|
462
|
-
const registerMenuActions = (menuPath, ...commands) => {
|
|
463
|
-
for (const [index, command] of commands.entries()) {
|
|
464
|
-
const label = command.label;
|
|
465
|
-
const debug = `${DebugCommands.DEBUG_CATEGORY}:`;
|
|
466
|
-
menus.registerMenuAction(menuPath, {
|
|
467
|
-
commandId: command.id,
|
|
468
|
-
label: label && label.startsWith(debug) && label.slice(debug.length).trimStart() || label,
|
|
469
|
-
icon: command.iconClass,
|
|
470
|
-
order: String.fromCharCode('a'.charCodeAt(0) + index)
|
|
471
|
-
});
|
|
472
|
-
}
|
|
473
|
-
};
|
|
474
|
-
menus.registerSubmenu(DebugMenus.DEBUG, nls_1.nls.localizeByDefault('Run'));
|
|
475
|
-
registerMenuActions(DebugMenus.DEBUG_CONTROLS, DebugCommands.START, DebugCommands.START_NO_DEBUG, DebugCommands.STOP, DebugCommands.RESTART);
|
|
476
|
-
registerMenuActions(DebugMenus.DEBUG_CONFIGURATION, DebugCommands.OPEN_CONFIGURATIONS, DebugCommands.ADD_CONFIGURATION);
|
|
477
|
-
registerMenuActions(DebugMenus.DEBUG_THREADS, DebugCommands.CONTINUE, DebugCommands.STEP_OVER, DebugCommands.STEP_INTO, DebugCommands.STEP_OUT, DebugCommands.PAUSE);
|
|
478
|
-
registerMenuActions(DebugMenus.DEBUG_SESSIONS, DebugCommands.CONTINUE_ALL, DebugCommands.PAUSE_ALL);
|
|
479
|
-
registerMenuActions(DebugMenus.DEBUG_BREAKPOINT, DebugCommands.TOGGLE_BREAKPOINT);
|
|
480
|
-
menus.registerSubmenu(DebugMenus.DEBUG_NEW_BREAKPOINT, nls_1.nls.localizeByDefault('New Breakpoint'));
|
|
481
|
-
registerMenuActions(DebugMenus.DEBUG_NEW_BREAKPOINT, DebugCommands.ADD_CONDITIONAL_BREAKPOINT, DebugCommands.INLINE_BREAKPOINT, DebugCommands.ADD_FUNCTION_BREAKPOINT, DebugCommands.ADD_LOGPOINT);
|
|
482
|
-
registerMenuActions(DebugMenus.DEBUG_BREAKPOINTS, DebugCommands.ENABLE_ALL_BREAKPOINTS, DebugCommands.DISABLE_ALL_BREAKPOINTS, DebugCommands.REMOVE_ALL_BREAKPOINTS);
|
|
483
|
-
registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.CONTROL_MENU, { ...DebugCommands.PAUSE, ...DebugThreadContextCommands.PAUSE }, { ...DebugCommands.CONTINUE, ...DebugThreadContextCommands.CONTINUE }, { ...DebugCommands.STEP_OVER, ...DebugThreadContextCommands.STEP_OVER }, { ...DebugCommands.STEP_INTO, ...DebugThreadContextCommands.STEP_INTO }, { ...DebugCommands.STEP_OUT, ...DebugThreadContextCommands.STEP_OUT }, { ...DebugCommands.PAUSE_ALL, ...DebugSessionContextCommands.PAUSE_ALL }, { ...DebugCommands.CONTINUE_ALL, ...DebugSessionContextCommands.CONTINUE_ALL });
|
|
484
|
-
registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.TERMINATE_MENU, { ...DebugCommands.RESTART, ...DebugSessionContextCommands.RESTART }, { ...DebugCommands.STOP, ...DebugSessionContextCommands.STOP }, { ...DebugThreadContextCommands.TERMINATE, label: nls_1.nls.localizeByDefault('Terminate Thread') });
|
|
485
|
-
registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.OPEN_MENU, { ...DebugSessionContextCommands.REVEAL, label: nls_1.nls.localize('theia/debug/reveal', 'Reveal') });
|
|
486
|
-
registerMenuActions(debug_stack_frames_widget_1.DebugStackFramesWidget.CONTEXT_MENU, DebugCommands.RESTART_FRAME, DebugCommands.COPY_CALL_STACK);
|
|
487
|
-
registerMenuActions(debug_variables_widget_1.DebugVariablesWidget.EDIT_MENU, DebugCommands.SET_VARIABLE_VALUE, DebugCommands.COPY_VARIABLE_VALUE, DebugCommands.COPY_VARIABLE_AS_EXPRESSION);
|
|
488
|
-
registerMenuActions(debug_variables_widget_1.DebugVariablesWidget.WATCH_MENU, DebugCommands.WATCH_VARIABLE);
|
|
489
|
-
registerMenuActions(debug_watch_widget_1.DebugWatchWidget.EDIT_MENU, DebugCommands.EDIT_WATCH_EXPRESSION, DebugCommands.COPY_WATCH_EXPRESSION_VALUE);
|
|
490
|
-
registerMenuActions(debug_watch_widget_1.DebugWatchWidget.REMOVE_MENU, DebugCommands.REMOVE_WATCH_EXPRESSION, DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS);
|
|
491
|
-
registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.EDIT_MENU, DebugCommands.EDIT_BREAKPOINT, DebugCommands.EDIT_LOGPOINT, DebugCommands.EDIT_BREAKPOINT_CONDITION);
|
|
492
|
-
registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.REMOVE_MENU, DebugCommands.REMOVE_BREAKPOINT, DebugCommands.REMOVE_LOGPOINT, DebugCommands.REMOVE_ALL_BREAKPOINTS);
|
|
493
|
-
registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.ENABLE_MENU, DebugCommands.ENABLE_ALL_BREAKPOINTS, DebugCommands.DISABLE_ALL_BREAKPOINTS);
|
|
494
|
-
registerMenuActions(debug_editor_model_1.DebugEditorModel.CONTEXT_MENU, { ...DebugEditorContextCommands.ADD_BREAKPOINT, label: nls_1.nls.localizeByDefault('Add Breakpoint') }, { ...DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT, label: DebugCommands.ADD_CONDITIONAL_BREAKPOINT.label }, { ...DebugEditorContextCommands.ADD_LOGPOINT, label: DebugCommands.ADD_LOGPOINT.label }, { ...DebugEditorContextCommands.REMOVE_BREAKPOINT, label: DebugCommands.REMOVE_BREAKPOINT.label }, { ...DebugEditorContextCommands.EDIT_BREAKPOINT, label: DebugCommands.EDIT_BREAKPOINT.label }, { ...DebugEditorContextCommands.ENABLE_BREAKPOINT, label: nlsEnableBreakpoint('Breakpoint') }, { ...DebugEditorContextCommands.DISABLE_BREAKPOINT, label: nlsDisableBreakpoint('Breakpoint') }, { ...DebugEditorContextCommands.REMOVE_LOGPOINT, label: DebugCommands.REMOVE_LOGPOINT.label }, { ...DebugEditorContextCommands.EDIT_LOGPOINT, label: DebugCommands.EDIT_LOGPOINT.label }, { ...DebugEditorContextCommands.ENABLE_LOGPOINT, label: nlsEnableBreakpoint('Logpoint') }, { ...DebugEditorContextCommands.DISABLE_LOGPOINT, label: nlsDisableBreakpoint('Logpoint') });
|
|
495
|
-
menus.linkSubmenu(browser_2.EDITOR_LINENUMBER_CONTEXT_MENU, debug_editor_model_1.DebugEditorModel.CONTEXT_MENU, { role: 1 /* Group */ });
|
|
496
|
-
}
|
|
497
|
-
registerCommands(registry) {
|
|
498
|
-
super.registerCommands(registry);
|
|
499
|
-
registry.registerCommand(DebugCommands.START, {
|
|
500
|
-
execute: (config) => this.start(false, config)
|
|
501
|
-
});
|
|
502
|
-
registry.registerCommand(DebugCommands.START_NO_DEBUG, {
|
|
503
|
-
execute: (config) => this.start(true, config)
|
|
504
|
-
});
|
|
505
|
-
registry.registerCommand(DebugCommands.STOP, {
|
|
506
|
-
execute: () => this.manager.terminateSession(),
|
|
507
|
-
isEnabled: () => this.manager.state !== debug_session_1.DebugState.Inactive
|
|
508
|
-
});
|
|
509
|
-
registry.registerCommand(DebugCommands.RESTART, {
|
|
510
|
-
execute: () => this.manager.restartSession(),
|
|
511
|
-
isEnabled: () => this.manager.state !== debug_session_1.DebugState.Inactive
|
|
512
|
-
});
|
|
513
|
-
registry.registerCommand(DebugCommands.OPEN_CONFIGURATIONS, {
|
|
514
|
-
execute: () => this.configurations.openConfiguration()
|
|
515
|
-
});
|
|
516
|
-
registry.registerCommand(DebugCommands.ADD_CONFIGURATION, {
|
|
517
|
-
execute: () => this.configurations.addConfiguration()
|
|
518
|
-
});
|
|
519
|
-
registry.registerCommand(DebugCommands.STEP_OVER, {
|
|
520
|
-
execute: () => this.manager.currentThread && this.manager.currentThread.stepOver(),
|
|
521
|
-
isEnabled: () => this.manager.state === debug_session_1.DebugState.Stopped
|
|
522
|
-
});
|
|
523
|
-
registry.registerCommand(DebugCommands.STEP_INTO, {
|
|
524
|
-
execute: () => this.manager.currentThread && this.manager.currentThread.stepIn(),
|
|
525
|
-
isEnabled: () => this.manager.state === debug_session_1.DebugState.Stopped
|
|
526
|
-
});
|
|
527
|
-
registry.registerCommand(DebugCommands.STEP_OUT, {
|
|
528
|
-
execute: () => this.manager.currentThread && this.manager.currentThread.stepOut(),
|
|
529
|
-
isEnabled: () => this.manager.state === debug_session_1.DebugState.Stopped
|
|
530
|
-
});
|
|
531
|
-
registry.registerCommand(DebugCommands.CONTINUE, {
|
|
532
|
-
execute: () => this.manager.currentThread && this.manager.currentThread.continue(),
|
|
533
|
-
isEnabled: () => this.manager.state === debug_session_1.DebugState.Stopped
|
|
534
|
-
});
|
|
535
|
-
registry.registerCommand(DebugCommands.PAUSE, {
|
|
536
|
-
execute: () => this.manager.currentThread && this.manager.currentThread.pause(),
|
|
537
|
-
isEnabled: () => this.manager.state === debug_session_1.DebugState.Running
|
|
538
|
-
});
|
|
539
|
-
registry.registerCommand(DebugCommands.PAUSE_ALL, {
|
|
540
|
-
execute: () => this.manager.currentSession && this.manager.currentSession.pauseAll(),
|
|
541
|
-
isEnabled: () => !!this.manager.currentSession && !!this.manager.currentSession.runningThreads.next().value
|
|
542
|
-
});
|
|
543
|
-
registry.registerCommand(DebugCommands.CONTINUE_ALL, {
|
|
544
|
-
execute: () => this.manager.currentSession && this.manager.currentSession.continueAll(),
|
|
545
|
-
isEnabled: () => !!this.manager.currentSession && !!this.manager.currentSession.stoppedThreads.next().value
|
|
546
|
-
});
|
|
547
|
-
registry.registerCommand(DebugThreadContextCommands.STEP_OVER, {
|
|
548
|
-
execute: () => this.selectedThread && this.selectedThread.stepOver(),
|
|
549
|
-
isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
|
|
550
|
-
isVisible: () => !!this.selectedThread
|
|
551
|
-
});
|
|
552
|
-
registry.registerCommand(DebugThreadContextCommands.STEP_INTO, {
|
|
553
|
-
execute: () => this.selectedThread && this.selectedThread.stepIn(),
|
|
554
|
-
isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
|
|
555
|
-
isVisible: () => !!this.selectedThread
|
|
556
|
-
});
|
|
557
|
-
registry.registerCommand(DebugThreadContextCommands.STEP_OUT, {
|
|
558
|
-
execute: () => this.selectedThread && this.selectedThread.stepOut(),
|
|
559
|
-
isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
|
|
560
|
-
isVisible: () => !!this.selectedThread
|
|
561
|
-
});
|
|
562
|
-
registry.registerCommand(DebugThreadContextCommands.CONTINUE, {
|
|
563
|
-
execute: () => this.selectedThread && this.selectedThread.continue(),
|
|
564
|
-
isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
|
|
565
|
-
isVisible: () => !!this.selectedThread && this.selectedThread.stopped,
|
|
566
|
-
});
|
|
567
|
-
registry.registerCommand(DebugThreadContextCommands.PAUSE, {
|
|
568
|
-
execute: () => this.selectedThread && this.selectedThread.pause(),
|
|
569
|
-
isEnabled: () => !!this.selectedThread && !this.selectedThread.stopped,
|
|
570
|
-
isVisible: () => !!this.selectedThread && !this.selectedThread.stopped,
|
|
571
|
-
});
|
|
572
|
-
registry.registerCommand(DebugThreadContextCommands.TERMINATE, {
|
|
573
|
-
execute: () => this.selectedThread && this.selectedThread.terminate(),
|
|
574
|
-
isEnabled: () => !!this.selectedThread && this.selectedThread.supportsTerminate,
|
|
575
|
-
isVisible: () => !!this.selectedThread && this.selectedThread.supportsTerminate
|
|
576
|
-
});
|
|
577
|
-
registry.registerCommand(DebugSessionContextCommands.STOP, {
|
|
578
|
-
execute: () => this.selectedSession && this.manager.terminateSession(this.selectedSession),
|
|
579
|
-
isEnabled: () => !!this.selectedSession && this.selectedSession.state !== debug_session_1.DebugState.Inactive,
|
|
580
|
-
isVisible: () => !this.selectedThread
|
|
581
|
-
});
|
|
582
|
-
registry.registerCommand(DebugSessionContextCommands.RESTART, {
|
|
583
|
-
execute: () => this.selectedSession && this.manager.restartSession(this.selectedSession),
|
|
584
|
-
isEnabled: () => !!this.selectedSession && this.selectedSession.state !== debug_session_1.DebugState.Inactive,
|
|
585
|
-
isVisible: () => !this.selectedThread
|
|
586
|
-
});
|
|
587
|
-
registry.registerCommand(DebugSessionContextCommands.CONTINUE_ALL, {
|
|
588
|
-
execute: () => this.selectedSession && this.selectedSession.continueAll(),
|
|
589
|
-
isEnabled: () => !!this.selectedSession && !!this.selectedSession.stoppedThreads.next().value,
|
|
590
|
-
isVisible: () => !this.selectedThread
|
|
591
|
-
});
|
|
592
|
-
registry.registerCommand(DebugSessionContextCommands.PAUSE_ALL, {
|
|
593
|
-
execute: () => this.selectedSession && this.selectedSession.pauseAll(),
|
|
594
|
-
isEnabled: () => !!this.selectedSession && !!this.selectedSession.runningThreads.next().value,
|
|
595
|
-
isVisible: () => !this.selectedThread
|
|
596
|
-
});
|
|
597
|
-
registry.registerCommand(DebugSessionContextCommands.REVEAL, {
|
|
598
|
-
execute: () => this.selectedSession && this.revealSession(this.selectedSession),
|
|
599
|
-
isEnabled: () => Boolean(this.selectedSession),
|
|
600
|
-
isVisible: () => !this.selectedThread && Boolean(this.selectedSession)
|
|
601
|
-
});
|
|
602
|
-
registry.registerCommand(DebugCommands.TOGGLE_BREAKPOINT, {
|
|
603
|
-
execute: () => this.editors.toggleBreakpoint(),
|
|
604
|
-
isEnabled: () => !!this.editors.model
|
|
605
|
-
});
|
|
606
|
-
registry.registerCommand(DebugCommands.INLINE_BREAKPOINT, {
|
|
607
|
-
execute: () => this.editors.addInlineBreakpoint(),
|
|
608
|
-
isEnabled: () => !!this.editors.model && !this.editors.getInlineBreakpoint()
|
|
609
|
-
});
|
|
610
|
-
registry.registerCommand(DebugCommands.ADD_CONDITIONAL_BREAKPOINT, {
|
|
611
|
-
execute: () => this.editors.addBreakpoint('condition'),
|
|
612
|
-
isEnabled: () => !!this.editors.model && !this.editors.anyBreakpoint()
|
|
613
|
-
});
|
|
614
|
-
registry.registerCommand(DebugCommands.ADD_LOGPOINT, {
|
|
615
|
-
execute: () => this.editors.addBreakpoint('logMessage'),
|
|
616
|
-
isEnabled: () => !!this.editors.model && !this.editors.anyBreakpoint()
|
|
617
|
-
});
|
|
618
|
-
registry.registerCommand(DebugCommands.ADD_FUNCTION_BREAKPOINT, {
|
|
619
|
-
execute: async () => {
|
|
620
|
-
const { labelProvider, breakpointManager, editorManager } = this;
|
|
621
|
-
const options = { labelProvider, breakpoints: breakpointManager, editorManager };
|
|
622
|
-
await new debug_function_breakpoint_1.DebugFunctionBreakpoint(breakpoint_marker_1.FunctionBreakpoint.create({ name: '' }), options).open();
|
|
623
|
-
},
|
|
624
|
-
isEnabled: widget => !(widget instanceof browser_1.Widget) || widget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget,
|
|
625
|
-
isVisible: widget => !(widget instanceof browser_1.Widget) || widget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget
|
|
626
|
-
});
|
|
627
|
-
registry.registerCommand(DebugCommands.ENABLE_ALL_BREAKPOINTS, {
|
|
628
|
-
execute: () => this.breakpointManager.enableAllBreakpoints(true),
|
|
629
|
-
isEnabled: () => this.breakpointManager.hasBreakpoints()
|
|
630
|
-
});
|
|
631
|
-
registry.registerCommand(DebugCommands.DISABLE_ALL_BREAKPOINTS, {
|
|
632
|
-
execute: () => this.breakpointManager.enableAllBreakpoints(false),
|
|
633
|
-
isEnabled: () => this.breakpointManager.hasBreakpoints()
|
|
634
|
-
});
|
|
635
|
-
registry.registerCommand(DebugCommands.EDIT_BREAKPOINT, {
|
|
636
|
-
execute: async () => {
|
|
637
|
-
const { selectedBreakpoint, selectedFunctionBreakpoint } = this;
|
|
638
|
-
if (selectedBreakpoint) {
|
|
639
|
-
await this.editors.editBreakpoint(selectedBreakpoint);
|
|
640
|
-
}
|
|
641
|
-
else if (selectedFunctionBreakpoint) {
|
|
642
|
-
await selectedFunctionBreakpoint.open();
|
|
643
|
-
}
|
|
644
|
-
},
|
|
645
|
-
isEnabled: () => !!this.selectedBreakpoint || !!this.selectedFunctionBreakpoint,
|
|
646
|
-
isVisible: () => !!this.selectedBreakpoint || !!this.selectedFunctionBreakpoint
|
|
647
|
-
});
|
|
648
|
-
registry.registerCommand(DebugCommands.EDIT_LOGPOINT, {
|
|
649
|
-
execute: async () => {
|
|
650
|
-
const { selectedLogpoint } = this;
|
|
651
|
-
if (selectedLogpoint) {
|
|
652
|
-
await this.editors.editBreakpoint(selectedLogpoint);
|
|
653
|
-
}
|
|
654
|
-
},
|
|
655
|
-
isEnabled: () => !!this.selectedLogpoint,
|
|
656
|
-
isVisible: () => !!this.selectedLogpoint
|
|
657
|
-
});
|
|
658
|
-
registry.registerCommand(DebugCommands.EDIT_BREAKPOINT_CONDITION, {
|
|
659
|
-
execute: async () => {
|
|
660
|
-
const { selectedExceptionBreakpoint } = this;
|
|
661
|
-
if (selectedExceptionBreakpoint) {
|
|
662
|
-
await selectedExceptionBreakpoint.editCondition();
|
|
663
|
-
}
|
|
664
|
-
},
|
|
665
|
-
isEnabled: () => { var _a; return !!((_a = this.selectedExceptionBreakpoint) === null || _a === void 0 ? void 0 : _a.data.raw.supportsCondition); },
|
|
666
|
-
isVisible: () => { var _a; return !!((_a = this.selectedExceptionBreakpoint) === null || _a === void 0 ? void 0 : _a.data.raw.supportsCondition); }
|
|
667
|
-
});
|
|
668
|
-
registry.registerCommand(DebugCommands.REMOVE_BREAKPOINT, {
|
|
669
|
-
execute: () => {
|
|
670
|
-
const selectedBreakpoint = this.selectedSettableBreakpoint;
|
|
671
|
-
if (selectedBreakpoint) {
|
|
672
|
-
selectedBreakpoint.remove();
|
|
673
|
-
}
|
|
674
|
-
},
|
|
675
|
-
isEnabled: () => Boolean(this.selectedSettableBreakpoint),
|
|
676
|
-
isVisible: () => Boolean(this.selectedSettableBreakpoint),
|
|
677
|
-
});
|
|
678
|
-
registry.registerCommand(DebugCommands.REMOVE_LOGPOINT, {
|
|
679
|
-
execute: () => {
|
|
680
|
-
const { selectedLogpoint } = this;
|
|
681
|
-
if (selectedLogpoint) {
|
|
682
|
-
selectedLogpoint.remove();
|
|
683
|
-
}
|
|
684
|
-
},
|
|
685
|
-
isEnabled: () => !!this.selectedLogpoint,
|
|
686
|
-
isVisible: () => !!this.selectedLogpoint
|
|
687
|
-
});
|
|
688
|
-
registry.registerCommand(DebugCommands.REMOVE_ALL_BREAKPOINTS, {
|
|
689
|
-
execute: () => this.breakpointManager.removeBreakpoints(),
|
|
690
|
-
isEnabled: () => this.breakpointManager.hasBreakpoints(),
|
|
691
|
-
isVisible: widget => !(widget instanceof browser_1.Widget) || (widget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget)
|
|
692
|
-
});
|
|
693
|
-
registry.registerCommand(DebugCommands.TOGGLE_BREAKPOINTS_ENABLED, {
|
|
694
|
-
execute: () => this.breakpointManager.breakpointsEnabled = !this.breakpointManager.breakpointsEnabled,
|
|
695
|
-
isVisible: arg => arg instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget
|
|
696
|
-
});
|
|
697
|
-
registry.registerCommand(DebugCommands.SHOW_HOVER, {
|
|
698
|
-
execute: () => this.editors.showHover(),
|
|
699
|
-
isEnabled: () => this.editors.canShowHover()
|
|
700
|
-
});
|
|
701
|
-
registry.registerCommand(DebugCommands.RESTART_FRAME, {
|
|
702
|
-
execute: () => this.selectedFrame && this.selectedFrame.restart(),
|
|
703
|
-
isEnabled: () => !!this.selectedFrame
|
|
704
|
-
});
|
|
705
|
-
registry.registerCommand(DebugCommands.COPY_CALL_STACK, {
|
|
706
|
-
execute: () => {
|
|
707
|
-
const { frames } = this;
|
|
708
|
-
const selection = document.getSelection();
|
|
709
|
-
if (frames && selection) {
|
|
710
|
-
selection.selectAllChildren(frames.node);
|
|
711
|
-
document.execCommand('copy');
|
|
712
|
-
}
|
|
713
|
-
},
|
|
714
|
-
isEnabled: () => document.queryCommandSupported('copy'),
|
|
715
|
-
isVisible: () => document.queryCommandSupported('copy')
|
|
716
|
-
});
|
|
717
|
-
registry.registerCommand(DebugCommands.SET_VARIABLE_VALUE, {
|
|
718
|
-
execute: () => this.selectedVariable && this.selectedVariable.open(),
|
|
719
|
-
isEnabled: () => !!this.selectedVariable && this.selectedVariable.supportSetVariable,
|
|
720
|
-
isVisible: () => !!this.selectedVariable && this.selectedVariable.supportSetVariable
|
|
721
|
-
});
|
|
722
|
-
registry.registerCommand(DebugCommands.COPY_VARIABLE_VALUE, {
|
|
723
|
-
execute: () => this.selectedVariable && this.selectedVariable.copyValue(),
|
|
724
|
-
isEnabled: () => !!this.selectedVariable && this.selectedVariable.supportCopyValue,
|
|
725
|
-
isVisible: () => !!this.selectedVariable && this.selectedVariable.supportCopyValue
|
|
726
|
-
});
|
|
727
|
-
registry.registerCommand(DebugCommands.COPY_VARIABLE_AS_EXPRESSION, {
|
|
728
|
-
execute: () => this.selectedVariable && this.selectedVariable.copyAsExpression(),
|
|
729
|
-
isEnabled: () => !!this.selectedVariable && this.selectedVariable.supportCopyAsExpression,
|
|
730
|
-
isVisible: () => !!this.selectedVariable && this.selectedVariable.supportCopyAsExpression
|
|
731
|
-
});
|
|
732
|
-
registry.registerCommand(DebugCommands.WATCH_VARIABLE, {
|
|
733
|
-
execute: () => {
|
|
734
|
-
const { selectedVariable, watch } = this;
|
|
735
|
-
if (selectedVariable && watch) {
|
|
736
|
-
watch.viewModel.addWatchExpression(selectedVariable.name);
|
|
737
|
-
}
|
|
738
|
-
},
|
|
739
|
-
isEnabled: () => !!this.selectedVariable && !!this.watch,
|
|
740
|
-
isVisible: () => !!this.selectedVariable && !!this.watch,
|
|
741
|
-
});
|
|
742
|
-
// Debug context menu commands
|
|
743
|
-
registry.registerCommand(DebugEditorContextCommands.ADD_BREAKPOINT, {
|
|
744
|
-
execute: position => this.isPosition(position) && this.editors.toggleBreakpoint(this.asPosition(position)),
|
|
745
|
-
isEnabled: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position)),
|
|
746
|
-
isVisible: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position))
|
|
747
|
-
});
|
|
748
|
-
registry.registerCommand(DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT, {
|
|
749
|
-
execute: position => this.isPosition(position) && this.editors.addBreakpoint('condition', this.asPosition(position)),
|
|
750
|
-
isEnabled: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position)),
|
|
751
|
-
isVisible: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position))
|
|
752
|
-
});
|
|
753
|
-
registry.registerCommand(DebugEditorContextCommands.ADD_LOGPOINT, {
|
|
754
|
-
execute: position => this.isPosition(position) && this.editors.addBreakpoint('logMessage', this.asPosition(position)),
|
|
755
|
-
isEnabled: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position)),
|
|
756
|
-
isVisible: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position))
|
|
757
|
-
});
|
|
758
|
-
registry.registerCommand(DebugEditorContextCommands.REMOVE_BREAKPOINT, {
|
|
759
|
-
execute: position => this.isPosition(position) && this.editors.toggleBreakpoint(this.asPosition(position)),
|
|
760
|
-
isEnabled: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position)),
|
|
761
|
-
isVisible: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position))
|
|
762
|
-
});
|
|
763
|
-
registry.registerCommand(DebugEditorContextCommands.EDIT_BREAKPOINT, {
|
|
764
|
-
execute: position => this.isPosition(position) && this.editors.editBreakpoint(this.asPosition(position)),
|
|
765
|
-
isEnabled: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position)),
|
|
766
|
-
isVisible: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position))
|
|
767
|
-
});
|
|
768
|
-
registry.registerCommand(DebugEditorContextCommands.ENABLE_BREAKPOINT, {
|
|
769
|
-
execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), true),
|
|
770
|
-
isEnabled: position => this.isPosition(position) && this.editors.getBreakpointEnabled(this.asPosition(position)) === false,
|
|
771
|
-
isVisible: position => this.isPosition(position) && this.editors.getBreakpointEnabled(this.asPosition(position)) === false
|
|
772
|
-
});
|
|
773
|
-
registry.registerCommand(DebugEditorContextCommands.DISABLE_BREAKPOINT, {
|
|
774
|
-
execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), false),
|
|
775
|
-
isEnabled: position => this.isPosition(position) && !!this.editors.getBreakpointEnabled(this.asPosition(position)),
|
|
776
|
-
isVisible: position => this.isPosition(position) && !!this.editors.getBreakpointEnabled(this.asPosition(position))
|
|
777
|
-
});
|
|
778
|
-
registry.registerCommand(DebugEditorContextCommands.REMOVE_LOGPOINT, {
|
|
779
|
-
execute: position => this.isPosition(position) && this.editors.toggleBreakpoint(this.asPosition(position)),
|
|
780
|
-
isEnabled: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position)),
|
|
781
|
-
isVisible: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position))
|
|
782
|
-
});
|
|
783
|
-
registry.registerCommand(DebugEditorContextCommands.EDIT_LOGPOINT, {
|
|
784
|
-
execute: position => this.isPosition(position) && this.editors.editBreakpoint(this.asPosition(position)),
|
|
785
|
-
isEnabled: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position)),
|
|
786
|
-
isVisible: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position))
|
|
787
|
-
});
|
|
788
|
-
registry.registerCommand(DebugEditorContextCommands.ENABLE_LOGPOINT, {
|
|
789
|
-
execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), true),
|
|
790
|
-
isEnabled: position => this.isPosition(position) && this.editors.getLogpointEnabled(this.asPosition(position)) === false,
|
|
791
|
-
isVisible: position => this.isPosition(position) && this.editors.getLogpointEnabled(this.asPosition(position)) === false
|
|
792
|
-
});
|
|
793
|
-
registry.registerCommand(DebugEditorContextCommands.DISABLE_LOGPOINT, {
|
|
794
|
-
execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), false),
|
|
795
|
-
isEnabled: position => this.isPosition(position) && !!this.editors.getLogpointEnabled(this.asPosition(position)),
|
|
796
|
-
isVisible: position => this.isPosition(position) && !!this.editors.getLogpointEnabled(this.asPosition(position))
|
|
797
|
-
});
|
|
798
|
-
registry.registerCommand(DebugBreakpointWidgetCommands.ACCEPT, {
|
|
799
|
-
execute: () => this.editors.acceptBreakpoint()
|
|
800
|
-
});
|
|
801
|
-
registry.registerCommand(DebugBreakpointWidgetCommands.CLOSE, {
|
|
802
|
-
execute: () => this.editors.closeBreakpoint()
|
|
803
|
-
});
|
|
804
|
-
registry.registerCommand(DebugCommands.ADD_WATCH_EXPRESSION, {
|
|
805
|
-
execute: widget => {
|
|
806
|
-
if (widget instanceof browser_1.Widget) {
|
|
807
|
-
if (widget instanceof debug_watch_widget_1.DebugWatchWidget) {
|
|
808
|
-
widget.viewModel.addWatchExpression();
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
else if (this.watch) {
|
|
812
|
-
this.watch.viewModel.addWatchExpression();
|
|
813
|
-
}
|
|
814
|
-
},
|
|
815
|
-
isEnabled: widget => widget instanceof browser_1.Widget ? widget instanceof debug_watch_widget_1.DebugWatchWidget : !!this.watch,
|
|
816
|
-
isVisible: widget => widget instanceof browser_1.Widget ? widget instanceof debug_watch_widget_1.DebugWatchWidget : !!this.watch
|
|
817
|
-
});
|
|
818
|
-
registry.registerCommand(DebugCommands.EDIT_WATCH_EXPRESSION, {
|
|
819
|
-
execute: () => {
|
|
820
|
-
const { watchExpression } = this;
|
|
821
|
-
if (watchExpression) {
|
|
822
|
-
watchExpression.open();
|
|
823
|
-
}
|
|
824
|
-
},
|
|
825
|
-
isEnabled: () => !!this.watchExpression,
|
|
826
|
-
isVisible: () => !!this.watchExpression
|
|
827
|
-
});
|
|
828
|
-
registry.registerCommand(DebugCommands.COPY_WATCH_EXPRESSION_VALUE, {
|
|
829
|
-
execute: () => this.watchExpression && this.watchExpression.copyValue(),
|
|
830
|
-
isEnabled: () => !!this.watchExpression && this.watchExpression.supportCopyValue,
|
|
831
|
-
isVisible: () => !!this.watchExpression && this.watchExpression.supportCopyValue
|
|
832
|
-
});
|
|
833
|
-
registry.registerCommand(DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS, {
|
|
834
|
-
execute: widget => {
|
|
835
|
-
if (widget instanceof debug_watch_widget_1.DebugWatchWidget) {
|
|
836
|
-
const root = widget.model.root;
|
|
837
|
-
widget.model.collapseAll(browser_1.CompositeTreeNode.is(root) ? root : undefined);
|
|
838
|
-
}
|
|
839
|
-
},
|
|
840
|
-
isEnabled: widget => widget instanceof debug_watch_widget_1.DebugWatchWidget,
|
|
841
|
-
isVisible: widget => widget instanceof debug_watch_widget_1.DebugWatchWidget
|
|
842
|
-
});
|
|
843
|
-
registry.registerCommand(DebugCommands.REMOVE_WATCH_EXPRESSION, {
|
|
844
|
-
execute: () => {
|
|
845
|
-
const { watch, watchExpression } = this;
|
|
846
|
-
if (watch && watchExpression) {
|
|
847
|
-
watch.viewModel.removeWatchExpression(watchExpression);
|
|
848
|
-
}
|
|
849
|
-
},
|
|
850
|
-
isEnabled: () => !!this.watchExpression,
|
|
851
|
-
isVisible: () => !!this.watchExpression
|
|
852
|
-
});
|
|
853
|
-
registry.registerCommand(DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS, {
|
|
854
|
-
execute: widget => {
|
|
855
|
-
if (widget instanceof browser_1.Widget) {
|
|
856
|
-
if (widget instanceof debug_watch_widget_1.DebugWatchWidget) {
|
|
857
|
-
widget.viewModel.removeWatchExpressions();
|
|
858
|
-
}
|
|
859
|
-
}
|
|
860
|
-
else if (this.watch) {
|
|
861
|
-
this.watch.viewModel.removeWatchExpressions();
|
|
862
|
-
}
|
|
863
|
-
},
|
|
864
|
-
isEnabled: widget => widget instanceof browser_1.Widget ? widget instanceof debug_watch_widget_1.DebugWatchWidget : !!this.watch,
|
|
865
|
-
isVisible: widget => widget instanceof browser_1.Widget ? widget instanceof debug_watch_widget_1.DebugWatchWidget : !!this.watch
|
|
866
|
-
});
|
|
867
|
-
}
|
|
868
|
-
registerKeybindings(keybindings) {
|
|
869
|
-
super.registerKeybindings(keybindings);
|
|
870
|
-
keybindings.registerKeybinding({
|
|
871
|
-
command: DebugCommands.START.id,
|
|
872
|
-
keybinding: 'f5'
|
|
873
|
-
});
|
|
874
|
-
keybindings.registerKeybinding({
|
|
875
|
-
command: DebugCommands.START_NO_DEBUG.id,
|
|
876
|
-
keybinding: 'ctrl+f5'
|
|
877
|
-
});
|
|
878
|
-
keybindings.registerKeybinding({
|
|
879
|
-
command: DebugCommands.STOP.id,
|
|
880
|
-
keybinding: 'shift+f5',
|
|
881
|
-
when: 'inDebugMode'
|
|
882
|
-
});
|
|
883
|
-
keybindings.registerKeybinding({
|
|
884
|
-
command: DebugCommands.RESTART.id,
|
|
885
|
-
keybinding: 'shift+ctrlcmd+f5',
|
|
886
|
-
when: 'inDebugMode'
|
|
887
|
-
});
|
|
888
|
-
keybindings.registerKeybinding({
|
|
889
|
-
command: DebugCommands.STEP_OVER.id,
|
|
890
|
-
keybinding: 'f10',
|
|
891
|
-
when: 'inDebugMode'
|
|
892
|
-
});
|
|
893
|
-
keybindings.registerKeybinding({
|
|
894
|
-
command: DebugCommands.STEP_INTO.id,
|
|
895
|
-
keybinding: 'f11',
|
|
896
|
-
when: 'inDebugMode'
|
|
897
|
-
});
|
|
898
|
-
keybindings.registerKeybinding({
|
|
899
|
-
command: DebugCommands.STEP_OUT.id,
|
|
900
|
-
keybinding: 'shift+f11',
|
|
901
|
-
when: 'inDebugMode'
|
|
902
|
-
});
|
|
903
|
-
keybindings.registerKeybinding({
|
|
904
|
-
command: DebugCommands.CONTINUE.id,
|
|
905
|
-
keybinding: 'f5',
|
|
906
|
-
when: 'inDebugMode'
|
|
907
|
-
});
|
|
908
|
-
keybindings.registerKeybinding({
|
|
909
|
-
command: DebugCommands.PAUSE.id,
|
|
910
|
-
keybinding: 'f6',
|
|
911
|
-
when: 'inDebugMode'
|
|
912
|
-
});
|
|
913
|
-
keybindings.registerKeybinding({
|
|
914
|
-
command: DebugCommands.TOGGLE_BREAKPOINT.id,
|
|
915
|
-
keybinding: 'f9',
|
|
916
|
-
when: 'editorTextFocus'
|
|
917
|
-
});
|
|
918
|
-
keybindings.registerKeybinding({
|
|
919
|
-
command: DebugCommands.INLINE_BREAKPOINT.id,
|
|
920
|
-
keybinding: 'shift+f9',
|
|
921
|
-
when: 'editorTextFocus'
|
|
922
|
-
});
|
|
923
|
-
keybindings.registerKeybinding({
|
|
924
|
-
command: DebugBreakpointWidgetCommands.ACCEPT.id,
|
|
925
|
-
keybinding: 'enter',
|
|
926
|
-
when: 'breakpointWidgetFocus'
|
|
927
|
-
});
|
|
928
|
-
keybindings.registerKeybinding({
|
|
929
|
-
command: DebugBreakpointWidgetCommands.CLOSE.id,
|
|
930
|
-
keybinding: 'esc',
|
|
931
|
-
when: 'isBreakpointWidgetVisible || breakpointWidgetFocus'
|
|
932
|
-
});
|
|
933
|
-
}
|
|
934
|
-
registerToolbarItems(toolbar) {
|
|
935
|
-
const onDidChangeToggleBreakpointsEnabled = new common_1.Emitter();
|
|
936
|
-
const toggleBreakpointsEnabled = {
|
|
937
|
-
id: DebugCommands.TOGGLE_BREAKPOINTS_ENABLED.id,
|
|
938
|
-
command: DebugCommands.TOGGLE_BREAKPOINTS_ENABLED.id,
|
|
939
|
-
icon: (0, browser_1.codicon)('activate-breakpoints'),
|
|
940
|
-
onDidChange: onDidChangeToggleBreakpointsEnabled.event,
|
|
941
|
-
priority: 1
|
|
942
|
-
};
|
|
943
|
-
const updateToggleBreakpointsEnabled = () => {
|
|
944
|
-
const activateBreakpoints = nls_1.nls.localizeByDefault('Enable All Breakpoints');
|
|
945
|
-
const deactivateBreakpoints = nls_1.nls.localizeByDefault('Disable All Breakpoints');
|
|
946
|
-
const tooltip = this.breakpointManager.breakpointsEnabled ? deactivateBreakpoints : activateBreakpoints;
|
|
947
|
-
if (toggleBreakpointsEnabled.tooltip !== tooltip) {
|
|
948
|
-
toggleBreakpointsEnabled.tooltip = tooltip;
|
|
949
|
-
onDidChangeToggleBreakpointsEnabled.fire(undefined);
|
|
950
|
-
}
|
|
951
|
-
};
|
|
952
|
-
toolbar.registerItem({
|
|
953
|
-
id: DebugCommands.ADD_FUNCTION_BREAKPOINT.id,
|
|
954
|
-
command: DebugCommands.ADD_FUNCTION_BREAKPOINT.id,
|
|
955
|
-
icon: (0, browser_1.codicon)('add'),
|
|
956
|
-
tooltip: DebugCommands.ADD_FUNCTION_BREAKPOINT.label
|
|
957
|
-
});
|
|
958
|
-
updateToggleBreakpointsEnabled();
|
|
959
|
-
this.breakpointManager.onDidChangeBreakpoints(updateToggleBreakpointsEnabled);
|
|
960
|
-
toolbar.registerItem(toggleBreakpointsEnabled);
|
|
961
|
-
toolbar.registerItem({
|
|
962
|
-
id: DebugCommands.REMOVE_ALL_BREAKPOINTS.id,
|
|
963
|
-
command: DebugCommands.REMOVE_ALL_BREAKPOINTS.id,
|
|
964
|
-
icon: (0, browser_1.codicon)('close-all'),
|
|
965
|
-
priority: 2
|
|
966
|
-
});
|
|
967
|
-
toolbar.registerItem({
|
|
968
|
-
id: DebugCommands.ADD_WATCH_EXPRESSION.id,
|
|
969
|
-
command: DebugCommands.ADD_WATCH_EXPRESSION.id,
|
|
970
|
-
icon: (0, browser_1.codicon)('add'),
|
|
971
|
-
tooltip: DebugCommands.ADD_WATCH_EXPRESSION.label
|
|
972
|
-
});
|
|
973
|
-
toolbar.registerItem({
|
|
974
|
-
id: DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.id,
|
|
975
|
-
command: DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.id,
|
|
976
|
-
icon: (0, browser_1.codicon)('collapse-all'),
|
|
977
|
-
tooltip: DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.label,
|
|
978
|
-
priority: 1
|
|
979
|
-
});
|
|
980
|
-
toolbar.registerItem({
|
|
981
|
-
id: DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.id,
|
|
982
|
-
command: DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.id,
|
|
983
|
-
icon: (0, browser_1.codicon)('close-all'),
|
|
984
|
-
tooltip: DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.label,
|
|
985
|
-
priority: 2
|
|
986
|
-
});
|
|
987
|
-
}
|
|
988
|
-
async openSession(session, options) {
|
|
989
|
-
const { reveal } = {
|
|
990
|
-
reveal: true,
|
|
991
|
-
...options
|
|
992
|
-
};
|
|
993
|
-
const debugWidget = await this.openView({ reveal });
|
|
994
|
-
debugWidget.sessionManager.currentSession = session;
|
|
995
|
-
return debugWidget['sessionWidget'];
|
|
996
|
-
}
|
|
997
|
-
revealSession(session) {
|
|
998
|
-
var _a;
|
|
999
|
-
const widget = (_a = this.tryGetWidget()) === null || _a === void 0 ? void 0 : _a['sessionWidget'];
|
|
1000
|
-
if (widget) {
|
|
1001
|
-
this.shell.revealWidget(widget.id);
|
|
1002
|
-
}
|
|
1003
|
-
return widget;
|
|
1004
|
-
}
|
|
1005
|
-
async start(noDebug, debugSessionOptions) {
|
|
1006
|
-
let current = debugSessionOptions ? debugSessionOptions : this.configurations.current;
|
|
1007
|
-
// If no configurations are currently present, create the `launch.json` and prompt users to select the config.
|
|
1008
|
-
if (!current) {
|
|
1009
|
-
await this.configurations.addConfiguration();
|
|
1010
|
-
return;
|
|
1011
|
-
}
|
|
1012
|
-
if (noDebug !== undefined) {
|
|
1013
|
-
if (current.configuration) {
|
|
1014
|
-
current = {
|
|
1015
|
-
...current,
|
|
1016
|
-
configuration: {
|
|
1017
|
-
...current.configuration,
|
|
1018
|
-
noDebug
|
|
1019
|
-
}
|
|
1020
|
-
};
|
|
1021
|
-
}
|
|
1022
|
-
else {
|
|
1023
|
-
current = {
|
|
1024
|
-
...current,
|
|
1025
|
-
noDebug
|
|
1026
|
-
};
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
await this.manager.start(current);
|
|
1030
|
-
}
|
|
1031
|
-
get threads() {
|
|
1032
|
-
const { currentWidget } = this.shell;
|
|
1033
|
-
return currentWidget instanceof debug_threads_widget_1.DebugThreadsWidget && currentWidget || undefined;
|
|
1034
|
-
}
|
|
1035
|
-
get selectedSession() {
|
|
1036
|
-
const { threads } = this;
|
|
1037
|
-
return threads && threads.selectedElement instanceof debug_session_1.DebugSession && threads.selectedElement || undefined;
|
|
1038
|
-
}
|
|
1039
|
-
get selectedThread() {
|
|
1040
|
-
const { threads } = this;
|
|
1041
|
-
return threads && threads.selectedElement instanceof debug_thread_1.DebugThread && threads.selectedElement || undefined;
|
|
1042
|
-
}
|
|
1043
|
-
get frames() {
|
|
1044
|
-
const { currentWidget } = this.shell;
|
|
1045
|
-
return currentWidget instanceof debug_stack_frames_widget_1.DebugStackFramesWidget && currentWidget || undefined;
|
|
1046
|
-
}
|
|
1047
|
-
get selectedFrame() {
|
|
1048
|
-
const { frames } = this;
|
|
1049
|
-
return frames && frames.selectedElement instanceof debug_stack_frame_1.DebugStackFrame && frames.selectedElement || undefined;
|
|
1050
|
-
}
|
|
1051
|
-
get breakpoints() {
|
|
1052
|
-
const { currentWidget } = this.shell;
|
|
1053
|
-
return currentWidget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget && currentWidget || undefined;
|
|
1054
|
-
}
|
|
1055
|
-
get selectedAnyBreakpoint() {
|
|
1056
|
-
const { breakpoints } = this;
|
|
1057
|
-
const selectedElement = breakpoints && breakpoints.selectedElement;
|
|
1058
|
-
return selectedElement instanceof debug_breakpoint_1.DebugBreakpoint ? selectedElement : undefined;
|
|
1059
|
-
}
|
|
1060
|
-
get selectedBreakpoint() {
|
|
1061
|
-
const breakpoint = this.selectedAnyBreakpoint;
|
|
1062
|
-
return breakpoint && breakpoint instanceof debug_source_breakpoint_1.DebugSourceBreakpoint && !breakpoint.logMessage ? breakpoint : undefined;
|
|
1063
|
-
}
|
|
1064
|
-
get selectedLogpoint() {
|
|
1065
|
-
const breakpoint = this.selectedAnyBreakpoint;
|
|
1066
|
-
return breakpoint && breakpoint instanceof debug_source_breakpoint_1.DebugSourceBreakpoint && !!breakpoint.logMessage ? breakpoint : undefined;
|
|
1067
|
-
}
|
|
1068
|
-
get selectedFunctionBreakpoint() {
|
|
1069
|
-
const breakpoint = this.selectedAnyBreakpoint;
|
|
1070
|
-
return breakpoint && breakpoint instanceof debug_function_breakpoint_1.DebugFunctionBreakpoint ? breakpoint : undefined;
|
|
1071
|
-
}
|
|
1072
|
-
get selectedInstructionBreakpoint() {
|
|
1073
|
-
if (this.selectedAnyBreakpoint instanceof debug_instruction_breakpoint_1.DebugInstructionBreakpoint) {
|
|
1074
|
-
return this.selectedAnyBreakpoint;
|
|
1075
|
-
}
|
|
1076
|
-
}
|
|
1077
|
-
get selectedExceptionBreakpoint() {
|
|
1078
|
-
const { breakpoints } = this;
|
|
1079
|
-
const selectedElement = breakpoints && breakpoints.selectedElement;
|
|
1080
|
-
return selectedElement instanceof debug_exception_breakpoint_1.DebugExceptionBreakpoint ? selectedElement : undefined;
|
|
1081
|
-
}
|
|
1082
|
-
get selectedSettableBreakpoint() {
|
|
1083
|
-
const selected = this.selectedAnyBreakpoint;
|
|
1084
|
-
if (selected instanceof debug_function_breakpoint_1.DebugFunctionBreakpoint || selected instanceof debug_instruction_breakpoint_1.DebugInstructionBreakpoint || selected instanceof debug_source_breakpoint_1.DebugSourceBreakpoint) {
|
|
1085
|
-
return selected;
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
get variables() {
|
|
1089
|
-
const { currentWidget } = this.shell;
|
|
1090
|
-
return currentWidget instanceof debug_variables_widget_1.DebugVariablesWidget && currentWidget || undefined;
|
|
1091
|
-
}
|
|
1092
|
-
get selectedVariable() {
|
|
1093
|
-
const { variables } = this;
|
|
1094
|
-
return variables && variables.selectedElement instanceof debug_console_items_1.DebugVariable && variables.selectedElement || undefined;
|
|
1095
|
-
}
|
|
1096
|
-
get watch() {
|
|
1097
|
-
const { currentWidget } = this.shell;
|
|
1098
|
-
return currentWidget instanceof debug_watch_widget_1.DebugWatchWidget && currentWidget || undefined;
|
|
1099
|
-
}
|
|
1100
|
-
get watchExpression() {
|
|
1101
|
-
const { watch } = this;
|
|
1102
|
-
return watch && watch.selectedElement instanceof debug_watch_expression_1.DebugWatchExpression && watch.selectedElement || undefined;
|
|
1103
|
-
}
|
|
1104
|
-
isPosition(position) {
|
|
1105
|
-
return monaco.Position.isIPosition(position);
|
|
1106
|
-
}
|
|
1107
|
-
asPosition(position) {
|
|
1108
|
-
return monaco.Position.lift(position);
|
|
1109
|
-
}
|
|
1110
|
-
registerColors(colors) {
|
|
1111
|
-
colors.register(
|
|
1112
|
-
// Debug colors should be aligned with https://code.visualstudio.com/api/references/theme-color#debug-colors
|
|
1113
|
-
{
|
|
1114
|
-
id: 'editor.stackFrameHighlightBackground',
|
|
1115
|
-
defaults: {
|
|
1116
|
-
dark: '#ffff0033',
|
|
1117
|
-
light: '#ffff6673',
|
|
1118
|
-
hcDark: '#fff600',
|
|
1119
|
-
hcLight: '#ffff6673'
|
|
1120
|
-
}, description: 'Background color for the highlight of line at the top stack frame position.'
|
|
1121
|
-
}, {
|
|
1122
|
-
id: 'editor.focusedStackFrameHighlightBackground',
|
|
1123
|
-
defaults: {
|
|
1124
|
-
dark: '#7abd7a4d',
|
|
1125
|
-
light: '#cee7ce73',
|
|
1126
|
-
hcDark: '#cee7ce',
|
|
1127
|
-
hcLight: '#cee7ce73'
|
|
1128
|
-
}, description: 'Background color for the highlight of line at focused stack frame position.'
|
|
1129
|
-
},
|
|
1130
|
-
// Status bar colors should be aligned with debugging colors from https://code.visualstudio.com/api/references/theme-color#status-bar-colors
|
|
1131
|
-
{
|
|
1132
|
-
id: 'statusBar.debuggingBackground', defaults: {
|
|
1133
|
-
dark: '#CC6633',
|
|
1134
|
-
light: '#CC6633',
|
|
1135
|
-
hcDark: '#CC6633',
|
|
1136
|
-
hcLight: '#B5200D'
|
|
1137
|
-
}, description: 'Status bar background color when a program is being debugged. The status bar is shown in the bottom of the window'
|
|
1138
|
-
}, {
|
|
1139
|
-
id: 'statusBar.debuggingForeground', defaults: {
|
|
1140
|
-
dark: 'statusBar.foreground',
|
|
1141
|
-
light: 'statusBar.foreground',
|
|
1142
|
-
hcDark: 'statusBar.foreground',
|
|
1143
|
-
hcLight: 'statusBar.foreground'
|
|
1144
|
-
}, description: 'Status bar foreground color when a program is being debugged. The status bar is shown in the bottom of the window'
|
|
1145
|
-
}, {
|
|
1146
|
-
id: 'statusBar.debuggingBorder', defaults: {
|
|
1147
|
-
dark: 'statusBar.border',
|
|
1148
|
-
light: 'statusBar.border',
|
|
1149
|
-
hcDark: 'statusBar.border',
|
|
1150
|
-
hcLight: 'statusBar.border'
|
|
1151
|
-
}, description: 'Status bar border color separating to the sidebar and editor when a program is being debugged. The status bar is shown in the bottom of the window'
|
|
1152
|
-
},
|
|
1153
|
-
// Debug Exception Widget colors should be aligned with
|
|
1154
|
-
// https://github.com/microsoft/vscode/blob/ff5f581425da6230b6f9216ecf19abf6c9d285a6/src/vs/workbench/contrib/debug/browser/exceptionWidget.ts#L23
|
|
1155
|
-
{
|
|
1156
|
-
id: 'debugExceptionWidget.border', defaults: {
|
|
1157
|
-
dark: '#a31515',
|
|
1158
|
-
light: '#a31515',
|
|
1159
|
-
hcDark: '#a31515',
|
|
1160
|
-
hcLight: '#a31515'
|
|
1161
|
-
}, description: 'Exception widget border color.',
|
|
1162
|
-
}, {
|
|
1163
|
-
id: 'debugExceptionWidget.background', defaults: {
|
|
1164
|
-
dark: '#420b0d',
|
|
1165
|
-
light: '#f1dfde',
|
|
1166
|
-
hcDark: '#420b0d',
|
|
1167
|
-
hcLight: '#f1dfde'
|
|
1168
|
-
}, description: 'Exception widget background color.'
|
|
1169
|
-
},
|
|
1170
|
-
// Debug Icon colors should be aligned with
|
|
1171
|
-
// https://code.visualstudio.com/api/references/theme-color#debug-icons-colors
|
|
1172
|
-
{
|
|
1173
|
-
id: 'debugIcon.breakpointForeground', defaults: {
|
|
1174
|
-
dark: '#E51400',
|
|
1175
|
-
light: '#E51400',
|
|
1176
|
-
hcDark: '#E51400',
|
|
1177
|
-
hcLight: '#E51400'
|
|
1178
|
-
},
|
|
1179
|
-
description: 'Icon color for breakpoints.'
|
|
1180
|
-
}, {
|
|
1181
|
-
id: 'debugIcon.breakpointDisabledForeground', defaults: {
|
|
1182
|
-
dark: '#848484',
|
|
1183
|
-
light: '#848484',
|
|
1184
|
-
hcDark: '#848484',
|
|
1185
|
-
hcLight: '#848484'
|
|
1186
|
-
},
|
|
1187
|
-
description: 'Icon color for disabled breakpoints.'
|
|
1188
|
-
}, {
|
|
1189
|
-
id: 'debugIcon.breakpointUnverifiedForeground', defaults: {
|
|
1190
|
-
dark: '#848484',
|
|
1191
|
-
light: '#848484',
|
|
1192
|
-
hcDark: '#848484',
|
|
1193
|
-
hcLight: '#848484'
|
|
1194
|
-
},
|
|
1195
|
-
description: 'Icon color for unverified breakpoints.'
|
|
1196
|
-
}, {
|
|
1197
|
-
id: 'debugIcon.breakpointCurrentStackframeForeground', defaults: {
|
|
1198
|
-
dark: '#FFCC00',
|
|
1199
|
-
light: '#BE8700',
|
|
1200
|
-
hcDark: '#FFCC00',
|
|
1201
|
-
hcLight: '#BE8700'
|
|
1202
|
-
},
|
|
1203
|
-
description: 'Icon color for the current breakpoint stack frame.'
|
|
1204
|
-
}, {
|
|
1205
|
-
id: 'debugIcon.breakpointStackframeForeground', defaults: {
|
|
1206
|
-
dark: '#89D185',
|
|
1207
|
-
light: '#89D185',
|
|
1208
|
-
hcDark: '#89D185',
|
|
1209
|
-
hcLight: '#89D185'
|
|
1210
|
-
},
|
|
1211
|
-
description: 'Icon color for all breakpoint stack frames.'
|
|
1212
|
-
}, {
|
|
1213
|
-
id: 'debugIcon.startForeground', defaults: {
|
|
1214
|
-
dark: '#89D185',
|
|
1215
|
-
light: '#388A34',
|
|
1216
|
-
hcDark: '#89D185',
|
|
1217
|
-
hcLight: '#388A34'
|
|
1218
|
-
}, description: 'Debug toolbar icon for start debugging.'
|
|
1219
|
-
}, {
|
|
1220
|
-
id: 'debugIcon.pauseForeground', defaults: {
|
|
1221
|
-
dark: '#75BEFF',
|
|
1222
|
-
light: '#007ACC',
|
|
1223
|
-
hcDark: '#75BEFF',
|
|
1224
|
-
hcLight: '#007ACC'
|
|
1225
|
-
}, description: 'Debug toolbar icon for pause.'
|
|
1226
|
-
}, {
|
|
1227
|
-
id: 'debugIcon.stopForeground', defaults: {
|
|
1228
|
-
dark: '#F48771',
|
|
1229
|
-
light: '#A1260D',
|
|
1230
|
-
hcDark: '#F48771',
|
|
1231
|
-
hcLight: '#A1260D'
|
|
1232
|
-
}, description: 'Debug toolbar icon for stop.'
|
|
1233
|
-
}, {
|
|
1234
|
-
id: 'debugIcon.disconnectForeground', defaults: {
|
|
1235
|
-
dark: '#F48771',
|
|
1236
|
-
light: '#A1260D',
|
|
1237
|
-
hcDark: '#F48771',
|
|
1238
|
-
hcLight: '#A1260D'
|
|
1239
|
-
}, description: 'Debug toolbar icon for disconnect.'
|
|
1240
|
-
}, {
|
|
1241
|
-
id: 'debugIcon.restartForeground', defaults: {
|
|
1242
|
-
dark: '#89D185',
|
|
1243
|
-
light: '#388A34',
|
|
1244
|
-
hcDark: '#89D185',
|
|
1245
|
-
hcLight: '#388A34'
|
|
1246
|
-
}, description: 'Debug toolbar icon for restart.'
|
|
1247
|
-
}, {
|
|
1248
|
-
id: 'debugIcon.stepOverForeground', defaults: {
|
|
1249
|
-
dark: '#75BEFF',
|
|
1250
|
-
light: '#007ACC',
|
|
1251
|
-
hcDark: '#75BEFF',
|
|
1252
|
-
hcLight: '#007ACC',
|
|
1253
|
-
}, description: 'Debug toolbar icon for step over.'
|
|
1254
|
-
}, {
|
|
1255
|
-
id: 'debugIcon.stepIntoForeground', defaults: {
|
|
1256
|
-
dark: '#75BEFF',
|
|
1257
|
-
light: '#007ACC',
|
|
1258
|
-
hcDark: '#75BEFF',
|
|
1259
|
-
hcLight: '#007ACC'
|
|
1260
|
-
}, description: 'Debug toolbar icon for step into.'
|
|
1261
|
-
}, {
|
|
1262
|
-
id: 'debugIcon.stepOutForeground', defaults: {
|
|
1263
|
-
dark: '#75BEFF',
|
|
1264
|
-
light: '#007ACC',
|
|
1265
|
-
hcDark: '#75BEFF',
|
|
1266
|
-
hcLight: '#007ACC',
|
|
1267
|
-
}, description: 'Debug toolbar icon for step over.'
|
|
1268
|
-
}, {
|
|
1269
|
-
id: 'debugIcon.continueForeground', defaults: {
|
|
1270
|
-
dark: '#75BEFF',
|
|
1271
|
-
light: '#007ACC',
|
|
1272
|
-
hcDark: '#75BEFF',
|
|
1273
|
-
hcLight: '#007ACC'
|
|
1274
|
-
}, description: 'Debug toolbar icon for continue.'
|
|
1275
|
-
}, {
|
|
1276
|
-
id: 'debugIcon.stepBackForeground', defaults: {
|
|
1277
|
-
dark: '#75BEFF',
|
|
1278
|
-
light: '#007ACC',
|
|
1279
|
-
hcDark: '#75BEFF',
|
|
1280
|
-
hcLight: '#007ACC'
|
|
1281
|
-
}, description: 'Debug toolbar icon for step back.'
|
|
1282
|
-
}, {
|
|
1283
|
-
id: 'debugConsole.infoForeground', defaults: {
|
|
1284
|
-
dark: 'editorInfo.foreground',
|
|
1285
|
-
light: 'editorInfo.foreground',
|
|
1286
|
-
hcDark: 'foreground',
|
|
1287
|
-
hcLight: 'foreground'
|
|
1288
|
-
}, description: 'Foreground color for info messages in debug REPL console.'
|
|
1289
|
-
}, {
|
|
1290
|
-
id: 'debugConsole.warningForeground', defaults: {
|
|
1291
|
-
dark: 'editorWarning.foreground',
|
|
1292
|
-
light: 'editorWarning.foreground',
|
|
1293
|
-
hcDark: '#008000',
|
|
1294
|
-
hcLight: 'editorWarning.foreground'
|
|
1295
|
-
},
|
|
1296
|
-
description: 'Foreground color for warning messages in debug REPL console.'
|
|
1297
|
-
}, {
|
|
1298
|
-
id: 'debugConsole.errorForeground', defaults: {
|
|
1299
|
-
dark: 'errorForeground',
|
|
1300
|
-
light: 'errorForeground',
|
|
1301
|
-
hcDark: 'errorForeground',
|
|
1302
|
-
hcLight: 'errorForeground'
|
|
1303
|
-
},
|
|
1304
|
-
description: 'Foreground color for error messages in debug REPL console.',
|
|
1305
|
-
}, {
|
|
1306
|
-
id: 'debugConsole.sourceForeground', defaults: {
|
|
1307
|
-
dark: 'foreground',
|
|
1308
|
-
light: 'foreground',
|
|
1309
|
-
hcDark: 'foreground',
|
|
1310
|
-
hcLight: 'foreground'
|
|
1311
|
-
},
|
|
1312
|
-
description: 'Foreground color for source filenames in debug REPL console.',
|
|
1313
|
-
}, {
|
|
1314
|
-
id: 'debugConsoleInputIcon.foreground', defaults: {
|
|
1315
|
-
dark: 'foreground',
|
|
1316
|
-
light: 'foreground',
|
|
1317
|
-
hcDark: 'foreground',
|
|
1318
|
-
hcLight: 'foreground'
|
|
1319
|
-
},
|
|
1320
|
-
description: 'Foreground color for debug console input marker icon.'
|
|
1321
|
-
});
|
|
1322
|
-
}
|
|
1323
|
-
updateStatusBar() {
|
|
1324
|
-
if (this.debuggingStatusBar === document.body.classList.contains('theia-mod-debugging')) {
|
|
1325
|
-
return;
|
|
1326
|
-
}
|
|
1327
|
-
document.body.classList.toggle('theia-mod-debugging');
|
|
1328
|
-
}
|
|
1329
|
-
get debuggingStatusBar() {
|
|
1330
|
-
if (this.manager.state < debug_session_1.DebugState.Running) {
|
|
1331
|
-
return false;
|
|
1332
|
-
}
|
|
1333
|
-
const session = this.manager.currentSession;
|
|
1334
|
-
if (session) {
|
|
1335
|
-
if (session.configuration.noDebug) {
|
|
1336
|
-
return false;
|
|
1337
|
-
}
|
|
1338
|
-
if (this.getOption(session, 'suppressDebugStatusbar')) {
|
|
1339
|
-
return false;
|
|
1340
|
-
}
|
|
1341
|
-
}
|
|
1342
|
-
return true;
|
|
1343
|
-
}
|
|
1344
|
-
getOption(session, option) {
|
|
1345
|
-
// If session is undefined there will be no option
|
|
1346
|
-
if (!session) {
|
|
1347
|
-
return false;
|
|
1348
|
-
}
|
|
1349
|
-
// If undefined take the value of the parent
|
|
1350
|
-
if (option in session.configuration && session.configuration[option] !== undefined) {
|
|
1351
|
-
return session.configuration[option];
|
|
1352
|
-
}
|
|
1353
|
-
return this.getOption(session.parentSession, option);
|
|
1354
|
-
}
|
|
1355
|
-
};
|
|
1356
|
-
__decorate([
|
|
1357
|
-
(0, inversify_1.inject)(debug_service_1.DebugService),
|
|
1358
|
-
__metadata("design:type", Object)
|
|
1359
|
-
], DebugFrontendApplicationContribution.prototype, "debug", void 0);
|
|
1360
|
-
__decorate([
|
|
1361
|
-
(0, inversify_1.inject)(debug_session_manager_1.DebugSessionManager),
|
|
1362
|
-
__metadata("design:type", debug_session_manager_1.DebugSessionManager)
|
|
1363
|
-
], DebugFrontendApplicationContribution.prototype, "manager", void 0);
|
|
1364
|
-
__decorate([
|
|
1365
|
-
(0, inversify_1.inject)(debug_configuration_manager_1.DebugConfigurationManager),
|
|
1366
|
-
__metadata("design:type", debug_configuration_manager_1.DebugConfigurationManager)
|
|
1367
|
-
], DebugFrontendApplicationContribution.prototype, "configurations", void 0);
|
|
1368
|
-
__decorate([
|
|
1369
|
-
(0, inversify_1.inject)(breakpoint_manager_1.BreakpointManager),
|
|
1370
|
-
__metadata("design:type", breakpoint_manager_1.BreakpointManager)
|
|
1371
|
-
], DebugFrontendApplicationContribution.prototype, "breakpointManager", void 0);
|
|
1372
|
-
__decorate([
|
|
1373
|
-
(0, inversify_1.inject)(debug_editor_service_1.DebugEditorService),
|
|
1374
|
-
__metadata("design:type", debug_editor_service_1.DebugEditorService)
|
|
1375
|
-
], DebugFrontendApplicationContribution.prototype, "editors", void 0);
|
|
1376
|
-
__decorate([
|
|
1377
|
-
(0, inversify_1.inject)(debug_console_contribution_1.DebugConsoleContribution),
|
|
1378
|
-
__metadata("design:type", debug_console_contribution_1.DebugConsoleContribution)
|
|
1379
|
-
], DebugFrontendApplicationContribution.prototype, "console", void 0);
|
|
1380
|
-
__decorate([
|
|
1381
|
-
(0, inversify_1.inject)(debug_schema_updater_1.DebugSchemaUpdater),
|
|
1382
|
-
__metadata("design:type", debug_schema_updater_1.DebugSchemaUpdater)
|
|
1383
|
-
], DebugFrontendApplicationContribution.prototype, "schemaUpdater", void 0);
|
|
1384
|
-
__decorate([
|
|
1385
|
-
(0, inversify_1.inject)(debug_preferences_1.DebugPreferences),
|
|
1386
|
-
__metadata("design:type", Object)
|
|
1387
|
-
], DebugFrontendApplicationContribution.prototype, "preference", void 0);
|
|
1388
|
-
__decorate([
|
|
1389
|
-
(0, inversify_1.inject)(debug_watch_manager_1.DebugWatchManager),
|
|
1390
|
-
__metadata("design:type", debug_watch_manager_1.DebugWatchManager)
|
|
1391
|
-
], DebugFrontendApplicationContribution.prototype, "watchManager", void 0);
|
|
1392
|
-
__decorate([
|
|
1393
|
-
(0, inversify_1.inject)(browser_1.LabelProvider),
|
|
1394
|
-
__metadata("design:type", browser_1.LabelProvider)
|
|
1395
|
-
], DebugFrontendApplicationContribution.prototype, "labelProvider", void 0);
|
|
1396
|
-
__decorate([
|
|
1397
|
-
(0, inversify_1.inject)(browser_2.EditorManager),
|
|
1398
|
-
__metadata("design:type", browser_2.EditorManager)
|
|
1399
|
-
], DebugFrontendApplicationContribution.prototype, "editorManager", void 0);
|
|
1400
|
-
DebugFrontendApplicationContribution = __decorate([
|
|
1401
|
-
(0, inversify_1.injectable)(),
|
|
1402
|
-
__metadata("design:paramtypes", [])
|
|
1403
|
-
], DebugFrontendApplicationContribution);
|
|
1404
|
-
exports.DebugFrontendApplicationContribution = DebugFrontendApplicationContribution;
|
|
1
|
+
"use strict";
|
|
2
|
+
// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2018 TypeFox and others.
|
|
4
|
+
//
|
|
5
|
+
// This program and the accompanying materials are made available under the
|
|
6
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
7
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
8
|
+
//
|
|
9
|
+
// This Source Code may also be made available under the following Secondary
|
|
10
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
11
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
12
|
+
// with the GNU Classpath Exception which is available at
|
|
13
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
14
|
+
//
|
|
15
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
16
|
+
// *****************************************************************************
|
|
17
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
18
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
19
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
20
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
21
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
22
|
+
};
|
|
23
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
24
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.DebugFrontendApplicationContribution = exports.DebugBreakpointWidgetCommands = exports.DebugEditorContextCommands = exports.DebugSessionContextCommands = exports.DebugThreadContextCommands = exports.DebugCommands = exports.DebugMenus = void 0;
|
|
28
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
29
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
30
|
+
const monaco = require("@theia/monaco-editor-core");
|
|
31
|
+
const common_1 = require("@theia/core/lib/common");
|
|
32
|
+
const browser_2 = require("@theia/editor/lib/browser");
|
|
33
|
+
const debug_session_manager_1 = require("./debug-session-manager");
|
|
34
|
+
const debug_widget_1 = require("./view/debug-widget");
|
|
35
|
+
const breakpoint_marker_1 = require("./breakpoint/breakpoint-marker");
|
|
36
|
+
const breakpoint_manager_1 = require("./breakpoint/breakpoint-manager");
|
|
37
|
+
const debug_configuration_manager_1 = require("./debug-configuration-manager");
|
|
38
|
+
const debug_session_1 = require("./debug-session");
|
|
39
|
+
const debug_breakpoints_widget_1 = require("./view/debug-breakpoints-widget");
|
|
40
|
+
const debug_source_breakpoint_1 = require("./model/debug-source-breakpoint");
|
|
41
|
+
const debug_threads_widget_1 = require("./view/debug-threads-widget");
|
|
42
|
+
const debug_thread_1 = require("./model/debug-thread");
|
|
43
|
+
const debug_stack_frames_widget_1 = require("./view/debug-stack-frames-widget");
|
|
44
|
+
const debug_stack_frame_1 = require("./model/debug-stack-frame");
|
|
45
|
+
const debug_variables_widget_1 = require("./view/debug-variables-widget");
|
|
46
|
+
const debug_console_items_1 = require("./console/debug-console-items");
|
|
47
|
+
const debug_editor_model_1 = require("./editor/debug-editor-model");
|
|
48
|
+
const debug_editor_service_1 = require("./editor/debug-editor-service");
|
|
49
|
+
const debug_console_contribution_1 = require("./console/debug-console-contribution");
|
|
50
|
+
const debug_service_1 = require("../common/debug-service");
|
|
51
|
+
const debug_schema_updater_1 = require("./debug-schema-updater");
|
|
52
|
+
const debug_preferences_1 = require("./debug-preferences");
|
|
53
|
+
const debug_watch_widget_1 = require("./view/debug-watch-widget");
|
|
54
|
+
const debug_watch_expression_1 = require("./view/debug-watch-expression");
|
|
55
|
+
const debug_watch_manager_1 = require("./debug-watch-manager");
|
|
56
|
+
const debug_function_breakpoint_1 = require("./model/debug-function-breakpoint");
|
|
57
|
+
const debug_breakpoint_1 = require("./model/debug-breakpoint");
|
|
58
|
+
const nls_1 = require("@theia/core/lib/common/nls");
|
|
59
|
+
const debug_instruction_breakpoint_1 = require("./model/debug-instruction-breakpoint");
|
|
60
|
+
const debug_exception_breakpoint_1 = require("./view/debug-exception-breakpoint");
|
|
61
|
+
var DebugMenus;
|
|
62
|
+
(function (DebugMenus) {
|
|
63
|
+
DebugMenus.DEBUG = [...common_1.MAIN_MENU_BAR, '6_debug'];
|
|
64
|
+
DebugMenus.DEBUG_CONTROLS = [...DebugMenus.DEBUG, 'a_controls'];
|
|
65
|
+
DebugMenus.DEBUG_CONFIGURATION = [...DebugMenus.DEBUG, 'b_configuration'];
|
|
66
|
+
DebugMenus.DEBUG_THREADS = [...DebugMenus.DEBUG, 'c_threads'];
|
|
67
|
+
DebugMenus.DEBUG_SESSIONS = [...DebugMenus.DEBUG, 'd_sessions'];
|
|
68
|
+
DebugMenus.DEBUG_BREAKPOINT = [...DebugMenus.DEBUG, 'e_breakpoint'];
|
|
69
|
+
DebugMenus.DEBUG_NEW_BREAKPOINT = [...DebugMenus.DEBUG_BREAKPOINT, 'a_new_breakpoint'];
|
|
70
|
+
DebugMenus.DEBUG_BREAKPOINTS = [...DebugMenus.DEBUG, 'f_breakpoints'];
|
|
71
|
+
})(DebugMenus = exports.DebugMenus || (exports.DebugMenus = {}));
|
|
72
|
+
function nlsEditBreakpoint(breakpoint) {
|
|
73
|
+
return nls_1.nls.localizeByDefault('Edit {0}...', nls_1.nls.localizeByDefault(breakpoint));
|
|
74
|
+
}
|
|
75
|
+
function nlsRemoveBreakpoint(breakpoint) {
|
|
76
|
+
return nls_1.nls.localizeByDefault('Remove {0}', nls_1.nls.localizeByDefault(breakpoint));
|
|
77
|
+
}
|
|
78
|
+
function nlsEnableBreakpoint(breakpoint) {
|
|
79
|
+
return nls_1.nls.localizeByDefault('Enable {0}', nls_1.nls.localizeByDefault(breakpoint));
|
|
80
|
+
}
|
|
81
|
+
function nlsDisableBreakpoint(breakpoint) {
|
|
82
|
+
return nls_1.nls.localizeByDefault('Disable {0}', nls_1.nls.localizeByDefault(breakpoint));
|
|
83
|
+
}
|
|
84
|
+
var DebugCommands;
|
|
85
|
+
(function (DebugCommands) {
|
|
86
|
+
DebugCommands.DEBUG_CATEGORY = 'Debug';
|
|
87
|
+
DebugCommands.DEBUG_CATEGORY_KEY = nls_1.nls.getDefaultKey(DebugCommands.DEBUG_CATEGORY);
|
|
88
|
+
DebugCommands.START = common_1.Command.toDefaultLocalizedCommand({
|
|
89
|
+
id: 'workbench.action.debug.start',
|
|
90
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
91
|
+
label: 'Start Debugging',
|
|
92
|
+
iconClass: (0, browser_1.codicon)('debug-alt')
|
|
93
|
+
});
|
|
94
|
+
DebugCommands.START_NO_DEBUG = common_1.Command.toDefaultLocalizedCommand({
|
|
95
|
+
id: 'workbench.action.debug.run',
|
|
96
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
97
|
+
label: 'Start Without Debugging'
|
|
98
|
+
});
|
|
99
|
+
DebugCommands.STOP = common_1.Command.toDefaultLocalizedCommand({
|
|
100
|
+
id: 'workbench.action.debug.stop',
|
|
101
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
102
|
+
label: 'Stop',
|
|
103
|
+
iconClass: (0, browser_1.codicon)('debug-stop')
|
|
104
|
+
});
|
|
105
|
+
DebugCommands.RESTART = common_1.Command.toDefaultLocalizedCommand({
|
|
106
|
+
id: 'workbench.action.debug.restart',
|
|
107
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
108
|
+
label: 'Restart',
|
|
109
|
+
});
|
|
110
|
+
DebugCommands.OPEN_CONFIGURATIONS = common_1.Command.toDefaultLocalizedCommand({
|
|
111
|
+
id: 'debug.configurations.open',
|
|
112
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
113
|
+
label: 'Open Configurations'
|
|
114
|
+
});
|
|
115
|
+
DebugCommands.ADD_CONFIGURATION = common_1.Command.toDefaultLocalizedCommand({
|
|
116
|
+
id: 'debug.configurations.add',
|
|
117
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
118
|
+
label: 'Add Configuration...'
|
|
119
|
+
});
|
|
120
|
+
DebugCommands.STEP_OVER = common_1.Command.toDefaultLocalizedCommand({
|
|
121
|
+
id: 'workbench.action.debug.stepOver',
|
|
122
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
123
|
+
label: 'Step Over',
|
|
124
|
+
iconClass: (0, browser_1.codicon)('debug-step-over')
|
|
125
|
+
});
|
|
126
|
+
DebugCommands.STEP_INTO = common_1.Command.toDefaultLocalizedCommand({
|
|
127
|
+
id: 'workbench.action.debug.stepInto',
|
|
128
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
129
|
+
label: 'Step Into',
|
|
130
|
+
iconClass: (0, browser_1.codicon)('debug-step-into')
|
|
131
|
+
});
|
|
132
|
+
DebugCommands.STEP_OUT = common_1.Command.toDefaultLocalizedCommand({
|
|
133
|
+
id: 'workbench.action.debug.stepOut',
|
|
134
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
135
|
+
label: 'Step Out',
|
|
136
|
+
iconClass: (0, browser_1.codicon)('debug-step-out')
|
|
137
|
+
});
|
|
138
|
+
DebugCommands.CONTINUE = common_1.Command.toDefaultLocalizedCommand({
|
|
139
|
+
id: 'workbench.action.debug.continue',
|
|
140
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
141
|
+
label: 'Continue',
|
|
142
|
+
iconClass: (0, browser_1.codicon)('debug-continue')
|
|
143
|
+
});
|
|
144
|
+
DebugCommands.PAUSE = common_1.Command.toDefaultLocalizedCommand({
|
|
145
|
+
id: 'workbench.action.debug.pause',
|
|
146
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
147
|
+
label: 'Pause',
|
|
148
|
+
iconClass: (0, browser_1.codicon)('debug-pause')
|
|
149
|
+
});
|
|
150
|
+
DebugCommands.CONTINUE_ALL = common_1.Command.toLocalizedCommand({
|
|
151
|
+
id: 'debug.thread.continue.all',
|
|
152
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
153
|
+
label: 'Continue All',
|
|
154
|
+
iconClass: (0, browser_1.codicon)('debug-continue')
|
|
155
|
+
}, 'theia/debug/continueAll', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
156
|
+
DebugCommands.PAUSE_ALL = common_1.Command.toLocalizedCommand({
|
|
157
|
+
id: 'debug.thread.pause.all',
|
|
158
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
159
|
+
label: 'Pause All',
|
|
160
|
+
iconClass: (0, browser_1.codicon)('debug-pause')
|
|
161
|
+
}, 'theia/debug/pauseAll', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
162
|
+
DebugCommands.TOGGLE_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
|
|
163
|
+
id: 'editor.debug.action.toggleBreakpoint',
|
|
164
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
165
|
+
label: 'Toggle Breakpoint',
|
|
166
|
+
});
|
|
167
|
+
DebugCommands.INLINE_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
|
|
168
|
+
id: 'editor.debug.action.inlineBreakpoint',
|
|
169
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
170
|
+
label: 'Inline Breakpoint',
|
|
171
|
+
});
|
|
172
|
+
DebugCommands.ADD_CONDITIONAL_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
|
|
173
|
+
id: 'debug.breakpoint.add.conditional',
|
|
174
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
175
|
+
label: 'Add Conditional Breakpoint...',
|
|
176
|
+
});
|
|
177
|
+
DebugCommands.ADD_LOGPOINT = common_1.Command.toDefaultLocalizedCommand({
|
|
178
|
+
id: 'debug.breakpoint.add.logpoint',
|
|
179
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
180
|
+
label: 'Add Logpoint...',
|
|
181
|
+
});
|
|
182
|
+
DebugCommands.ADD_FUNCTION_BREAKPOINT = common_1.Command.toDefaultLocalizedCommand({
|
|
183
|
+
id: 'debug.breakpoint.add.function',
|
|
184
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
185
|
+
label: 'Add Function Breakpoint',
|
|
186
|
+
});
|
|
187
|
+
DebugCommands.ENABLE_ALL_BREAKPOINTS = common_1.Command.toDefaultLocalizedCommand({
|
|
188
|
+
id: 'debug.breakpoint.enableAll',
|
|
189
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
190
|
+
label: 'Enable All Breakpoints',
|
|
191
|
+
});
|
|
192
|
+
DebugCommands.DISABLE_ALL_BREAKPOINTS = common_1.Command.toDefaultLocalizedCommand({
|
|
193
|
+
id: 'debug.breakpoint.disableAll',
|
|
194
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
195
|
+
label: 'Disable All Breakpoints',
|
|
196
|
+
});
|
|
197
|
+
DebugCommands.EDIT_BREAKPOINT = common_1.Command.toLocalizedCommand({
|
|
198
|
+
id: 'debug.breakpoint.edit',
|
|
199
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
200
|
+
originalLabel: 'Edit Breakpoint...',
|
|
201
|
+
label: nlsEditBreakpoint('Breakpoint')
|
|
202
|
+
}, '', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
203
|
+
DebugCommands.EDIT_LOGPOINT = common_1.Command.toLocalizedCommand({
|
|
204
|
+
id: 'debug.logpoint.edit',
|
|
205
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
206
|
+
originalLabel: 'Edit Logpoint...',
|
|
207
|
+
label: nlsEditBreakpoint('Logpoint')
|
|
208
|
+
}, '', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
209
|
+
DebugCommands.EDIT_BREAKPOINT_CONDITION = common_1.Command.toLocalizedCommand({
|
|
210
|
+
id: 'debug.breakpoint.editCondition',
|
|
211
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
212
|
+
label: 'Edit Condition...'
|
|
213
|
+
}, '', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
214
|
+
DebugCommands.REMOVE_BREAKPOINT = common_1.Command.toLocalizedCommand({
|
|
215
|
+
id: 'debug.breakpoint.remove',
|
|
216
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
217
|
+
originalLabel: 'Remove Breakpoint',
|
|
218
|
+
label: nlsRemoveBreakpoint('Breakpoint')
|
|
219
|
+
}, '', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
220
|
+
DebugCommands.REMOVE_LOGPOINT = common_1.Command.toLocalizedCommand({
|
|
221
|
+
id: 'debug.logpoint.remove',
|
|
222
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
223
|
+
originalLabel: 'Remove Logpoint',
|
|
224
|
+
label: nlsRemoveBreakpoint('Logpoint')
|
|
225
|
+
}, '', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
226
|
+
DebugCommands.REMOVE_ALL_BREAKPOINTS = common_1.Command.toDefaultLocalizedCommand({
|
|
227
|
+
id: 'debug.breakpoint.removeAll',
|
|
228
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
229
|
+
label: 'Remove All Breakpoints',
|
|
230
|
+
});
|
|
231
|
+
DebugCommands.TOGGLE_BREAKPOINTS_ENABLED = common_1.Command.toLocalizedCommand({
|
|
232
|
+
id: 'debug.breakpoint.toggleEnabled'
|
|
233
|
+
});
|
|
234
|
+
DebugCommands.SHOW_HOVER = common_1.Command.toDefaultLocalizedCommand({
|
|
235
|
+
id: 'editor.debug.action.showDebugHover',
|
|
236
|
+
label: 'Debug: Show Hover'
|
|
237
|
+
});
|
|
238
|
+
DebugCommands.RESTART_FRAME = common_1.Command.toDefaultLocalizedCommand({
|
|
239
|
+
id: 'debug.frame.restart',
|
|
240
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
241
|
+
label: 'Restart Frame',
|
|
242
|
+
});
|
|
243
|
+
DebugCommands.COPY_CALL_STACK = common_1.Command.toDefaultLocalizedCommand({
|
|
244
|
+
id: 'debug.callStack.copy',
|
|
245
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
246
|
+
label: 'Copy Call Stack',
|
|
247
|
+
});
|
|
248
|
+
DebugCommands.SET_VARIABLE_VALUE = common_1.Command.toDefaultLocalizedCommand({
|
|
249
|
+
id: 'debug.variable.setValue',
|
|
250
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
251
|
+
label: 'Set Value',
|
|
252
|
+
});
|
|
253
|
+
DebugCommands.COPY_VARIABLE_VALUE = common_1.Command.toDefaultLocalizedCommand({
|
|
254
|
+
id: 'debug.variable.copyValue',
|
|
255
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
256
|
+
label: 'Copy Value',
|
|
257
|
+
});
|
|
258
|
+
DebugCommands.COPY_VARIABLE_AS_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
|
|
259
|
+
id: 'debug.variable.copyAsExpression',
|
|
260
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
261
|
+
label: 'Copy as Expression',
|
|
262
|
+
});
|
|
263
|
+
DebugCommands.WATCH_VARIABLE = common_1.Command.toDefaultLocalizedCommand({
|
|
264
|
+
id: 'debug.variable.watch',
|
|
265
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
266
|
+
label: 'Add to Watch',
|
|
267
|
+
});
|
|
268
|
+
DebugCommands.ADD_WATCH_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
|
|
269
|
+
id: 'debug.watch.addExpression',
|
|
270
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
271
|
+
label: 'Add Expression'
|
|
272
|
+
});
|
|
273
|
+
DebugCommands.EDIT_WATCH_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
|
|
274
|
+
id: 'debug.watch.editExpression',
|
|
275
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
276
|
+
label: 'Edit Expression'
|
|
277
|
+
});
|
|
278
|
+
DebugCommands.COPY_WATCH_EXPRESSION_VALUE = common_1.Command.toLocalizedCommand({
|
|
279
|
+
id: 'debug.watch.copyExpressionValue',
|
|
280
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
281
|
+
label: 'Copy Expression Value'
|
|
282
|
+
}, 'theia/debug/copyExpressionValue', DebugCommands.DEBUG_CATEGORY_KEY);
|
|
283
|
+
DebugCommands.REMOVE_WATCH_EXPRESSION = common_1.Command.toDefaultLocalizedCommand({
|
|
284
|
+
id: 'debug.watch.removeExpression',
|
|
285
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
286
|
+
label: 'Remove Expression'
|
|
287
|
+
});
|
|
288
|
+
DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS = common_1.Command.toDefaultLocalizedCommand({
|
|
289
|
+
id: 'debug.watch.collapseAllExpressions',
|
|
290
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
291
|
+
label: 'Collapse All'
|
|
292
|
+
});
|
|
293
|
+
DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS = common_1.Command.toDefaultLocalizedCommand({
|
|
294
|
+
id: 'debug.watch.removeAllExpressions',
|
|
295
|
+
category: DebugCommands.DEBUG_CATEGORY,
|
|
296
|
+
label: 'Remove All Expressions'
|
|
297
|
+
});
|
|
298
|
+
})(DebugCommands = exports.DebugCommands || (exports.DebugCommands = {}));
|
|
299
|
+
var DebugThreadContextCommands;
|
|
300
|
+
(function (DebugThreadContextCommands) {
|
|
301
|
+
DebugThreadContextCommands.STEP_OVER = {
|
|
302
|
+
id: 'debug.thread.context.context.next'
|
|
303
|
+
};
|
|
304
|
+
DebugThreadContextCommands.STEP_INTO = {
|
|
305
|
+
id: 'debug.thread.context.stepin'
|
|
306
|
+
};
|
|
307
|
+
DebugThreadContextCommands.STEP_OUT = {
|
|
308
|
+
id: 'debug.thread.context.stepout'
|
|
309
|
+
};
|
|
310
|
+
DebugThreadContextCommands.CONTINUE = {
|
|
311
|
+
id: 'debug.thread.context.continue'
|
|
312
|
+
};
|
|
313
|
+
DebugThreadContextCommands.PAUSE = {
|
|
314
|
+
id: 'debug.thread.context.pause'
|
|
315
|
+
};
|
|
316
|
+
DebugThreadContextCommands.TERMINATE = {
|
|
317
|
+
id: 'debug.thread.context.terminate'
|
|
318
|
+
};
|
|
319
|
+
})(DebugThreadContextCommands = exports.DebugThreadContextCommands || (exports.DebugThreadContextCommands = {}));
|
|
320
|
+
var DebugSessionContextCommands;
|
|
321
|
+
(function (DebugSessionContextCommands) {
|
|
322
|
+
DebugSessionContextCommands.STOP = {
|
|
323
|
+
id: 'debug.session.context.stop'
|
|
324
|
+
};
|
|
325
|
+
DebugSessionContextCommands.RESTART = {
|
|
326
|
+
id: 'debug.session.context.restart'
|
|
327
|
+
};
|
|
328
|
+
DebugSessionContextCommands.PAUSE_ALL = {
|
|
329
|
+
id: 'debug.session.context.pauseAll'
|
|
330
|
+
};
|
|
331
|
+
DebugSessionContextCommands.CONTINUE_ALL = {
|
|
332
|
+
id: 'debug.session.context.continueAll'
|
|
333
|
+
};
|
|
334
|
+
DebugSessionContextCommands.REVEAL = {
|
|
335
|
+
id: 'debug.session.context.reveal'
|
|
336
|
+
};
|
|
337
|
+
})(DebugSessionContextCommands = exports.DebugSessionContextCommands || (exports.DebugSessionContextCommands = {}));
|
|
338
|
+
var DebugEditorContextCommands;
|
|
339
|
+
(function (DebugEditorContextCommands) {
|
|
340
|
+
DebugEditorContextCommands.ADD_BREAKPOINT = {
|
|
341
|
+
id: 'debug.editor.context.addBreakpoint'
|
|
342
|
+
};
|
|
343
|
+
DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT = {
|
|
344
|
+
id: 'debug.editor.context.addBreakpoint.conditional'
|
|
345
|
+
};
|
|
346
|
+
DebugEditorContextCommands.ADD_LOGPOINT = {
|
|
347
|
+
id: 'debug.editor.context.add.logpoint'
|
|
348
|
+
};
|
|
349
|
+
DebugEditorContextCommands.REMOVE_BREAKPOINT = {
|
|
350
|
+
id: 'debug.editor.context.removeBreakpoint'
|
|
351
|
+
};
|
|
352
|
+
DebugEditorContextCommands.EDIT_BREAKPOINT = {
|
|
353
|
+
id: 'debug.editor.context.edit.breakpoint'
|
|
354
|
+
};
|
|
355
|
+
DebugEditorContextCommands.ENABLE_BREAKPOINT = {
|
|
356
|
+
id: 'debug.editor.context.enableBreakpoint'
|
|
357
|
+
};
|
|
358
|
+
DebugEditorContextCommands.DISABLE_BREAKPOINT = {
|
|
359
|
+
id: 'debug.editor.context.disableBreakpoint'
|
|
360
|
+
};
|
|
361
|
+
DebugEditorContextCommands.REMOVE_LOGPOINT = {
|
|
362
|
+
id: 'debug.editor.context.logpoint.remove'
|
|
363
|
+
};
|
|
364
|
+
DebugEditorContextCommands.EDIT_LOGPOINT = {
|
|
365
|
+
id: 'debug.editor.context.logpoint.edit'
|
|
366
|
+
};
|
|
367
|
+
DebugEditorContextCommands.ENABLE_LOGPOINT = {
|
|
368
|
+
id: 'debug.editor.context.logpoint.enable'
|
|
369
|
+
};
|
|
370
|
+
DebugEditorContextCommands.DISABLE_LOGPOINT = {
|
|
371
|
+
id: 'debug.editor.context.logpoint.disable'
|
|
372
|
+
};
|
|
373
|
+
})(DebugEditorContextCommands = exports.DebugEditorContextCommands || (exports.DebugEditorContextCommands = {}));
|
|
374
|
+
var DebugBreakpointWidgetCommands;
|
|
375
|
+
(function (DebugBreakpointWidgetCommands) {
|
|
376
|
+
DebugBreakpointWidgetCommands.ACCEPT = {
|
|
377
|
+
id: 'debug.breakpointWidget.accept'
|
|
378
|
+
};
|
|
379
|
+
DebugBreakpointWidgetCommands.CLOSE = {
|
|
380
|
+
id: 'debug.breakpointWidget.close'
|
|
381
|
+
};
|
|
382
|
+
})(DebugBreakpointWidgetCommands = exports.DebugBreakpointWidgetCommands || (exports.DebugBreakpointWidgetCommands = {}));
|
|
383
|
+
let DebugFrontendApplicationContribution = class DebugFrontendApplicationContribution extends browser_1.AbstractViewContribution {
|
|
384
|
+
constructor() {
|
|
385
|
+
super({
|
|
386
|
+
widgetId: debug_widget_1.DebugWidget.ID,
|
|
387
|
+
widgetName: debug_widget_1.DebugWidget.LABEL,
|
|
388
|
+
defaultWidgetOptions: {
|
|
389
|
+
area: 'left',
|
|
390
|
+
rank: 400
|
|
391
|
+
},
|
|
392
|
+
toggleCommandId: 'debug:toggle',
|
|
393
|
+
toggleKeybinding: 'ctrlcmd+shift+d'
|
|
394
|
+
});
|
|
395
|
+
this.firstSessionStart = true;
|
|
396
|
+
}
|
|
397
|
+
async initializeLayout() {
|
|
398
|
+
await this.openView();
|
|
399
|
+
}
|
|
400
|
+
async onStart() {
|
|
401
|
+
this.manager.onDidCreateDebugSession(session => this.openSession(session, { reveal: false }));
|
|
402
|
+
this.manager.onDidStartDebugSession(session => {
|
|
403
|
+
const { noDebug } = session.configuration;
|
|
404
|
+
const openDebug = session.configuration.openDebug || this.preference['debug.openDebug'];
|
|
405
|
+
const internalConsoleOptions = session.configuration.internalConsoleOptions || this.preference['debug.internalConsoleOptions'];
|
|
406
|
+
if (internalConsoleOptions === 'openOnSessionStart' ||
|
|
407
|
+
(internalConsoleOptions === 'openOnFirstSessionStart' && this.firstSessionStart)) {
|
|
408
|
+
this.console.openView({
|
|
409
|
+
reveal: true,
|
|
410
|
+
activate: false,
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
const shouldOpenDebug = openDebug === 'openOnSessionStart' || (openDebug === 'openOnFirstSessionStart' && this.firstSessionStart);
|
|
414
|
+
// Do not open debug view when suppressed via configuration
|
|
415
|
+
if (!noDebug && !this.getOption(session, 'suppressDebugView') && shouldOpenDebug) {
|
|
416
|
+
this.openSession(session);
|
|
417
|
+
}
|
|
418
|
+
this.firstSessionStart = false;
|
|
419
|
+
});
|
|
420
|
+
this.manager.onDidStopDebugSession(session => {
|
|
421
|
+
const { openDebug } = session.configuration;
|
|
422
|
+
if (!this.getOption(session, 'suppressDebugView') && openDebug === 'openOnDebugBreak') {
|
|
423
|
+
this.openSession(session);
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
this.updateStatusBar();
|
|
427
|
+
this.manager.onDidChange(() => this.updateStatusBar());
|
|
428
|
+
this.schemaUpdater.update();
|
|
429
|
+
this.configurations.load();
|
|
430
|
+
this.breakpointManager.load();
|
|
431
|
+
this.watchManager.load();
|
|
432
|
+
}
|
|
433
|
+
onStop() {
|
|
434
|
+
this.configurations.save();
|
|
435
|
+
this.breakpointManager.save();
|
|
436
|
+
this.watchManager.save();
|
|
437
|
+
}
|
|
438
|
+
onWillStop() {
|
|
439
|
+
if (this.preference['debug.confirmOnExit'] === 'always' && this.manager.currentSession) {
|
|
440
|
+
return {
|
|
441
|
+
reason: 'active-debug-sessions',
|
|
442
|
+
action: async () => {
|
|
443
|
+
if (this.manager.currentSession) {
|
|
444
|
+
const msg = this.manager.sessions.length === 1
|
|
445
|
+
? nls_1.nls.localizeByDefault('There is an active debug session, are you sure you want to stop it?')
|
|
446
|
+
: nls_1.nls.localizeByDefault('There are active debug sessions, are you sure you want to stop them?');
|
|
447
|
+
const safeToExit = await new browser_1.ConfirmDialog({
|
|
448
|
+
title: '',
|
|
449
|
+
msg,
|
|
450
|
+
ok: nls_1.nls.localizeByDefault('Stop Debugging'),
|
|
451
|
+
cancel: browser_1.Dialog.CANCEL,
|
|
452
|
+
}).open();
|
|
453
|
+
return safeToExit === true;
|
|
454
|
+
}
|
|
455
|
+
return true;
|
|
456
|
+
},
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
registerMenus(menus) {
|
|
461
|
+
super.registerMenus(menus);
|
|
462
|
+
const registerMenuActions = (menuPath, ...commands) => {
|
|
463
|
+
for (const [index, command] of commands.entries()) {
|
|
464
|
+
const label = command.label;
|
|
465
|
+
const debug = `${DebugCommands.DEBUG_CATEGORY}:`;
|
|
466
|
+
menus.registerMenuAction(menuPath, {
|
|
467
|
+
commandId: command.id,
|
|
468
|
+
label: label && label.startsWith(debug) && label.slice(debug.length).trimStart() || label,
|
|
469
|
+
icon: command.iconClass,
|
|
470
|
+
order: String.fromCharCode('a'.charCodeAt(0) + index)
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
menus.registerSubmenu(DebugMenus.DEBUG, nls_1.nls.localizeByDefault('Run'));
|
|
475
|
+
registerMenuActions(DebugMenus.DEBUG_CONTROLS, DebugCommands.START, DebugCommands.START_NO_DEBUG, DebugCommands.STOP, DebugCommands.RESTART);
|
|
476
|
+
registerMenuActions(DebugMenus.DEBUG_CONFIGURATION, DebugCommands.OPEN_CONFIGURATIONS, DebugCommands.ADD_CONFIGURATION);
|
|
477
|
+
registerMenuActions(DebugMenus.DEBUG_THREADS, DebugCommands.CONTINUE, DebugCommands.STEP_OVER, DebugCommands.STEP_INTO, DebugCommands.STEP_OUT, DebugCommands.PAUSE);
|
|
478
|
+
registerMenuActions(DebugMenus.DEBUG_SESSIONS, DebugCommands.CONTINUE_ALL, DebugCommands.PAUSE_ALL);
|
|
479
|
+
registerMenuActions(DebugMenus.DEBUG_BREAKPOINT, DebugCommands.TOGGLE_BREAKPOINT);
|
|
480
|
+
menus.registerSubmenu(DebugMenus.DEBUG_NEW_BREAKPOINT, nls_1.nls.localizeByDefault('New Breakpoint'));
|
|
481
|
+
registerMenuActions(DebugMenus.DEBUG_NEW_BREAKPOINT, DebugCommands.ADD_CONDITIONAL_BREAKPOINT, DebugCommands.INLINE_BREAKPOINT, DebugCommands.ADD_FUNCTION_BREAKPOINT, DebugCommands.ADD_LOGPOINT);
|
|
482
|
+
registerMenuActions(DebugMenus.DEBUG_BREAKPOINTS, DebugCommands.ENABLE_ALL_BREAKPOINTS, DebugCommands.DISABLE_ALL_BREAKPOINTS, DebugCommands.REMOVE_ALL_BREAKPOINTS);
|
|
483
|
+
registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.CONTROL_MENU, { ...DebugCommands.PAUSE, ...DebugThreadContextCommands.PAUSE }, { ...DebugCommands.CONTINUE, ...DebugThreadContextCommands.CONTINUE }, { ...DebugCommands.STEP_OVER, ...DebugThreadContextCommands.STEP_OVER }, { ...DebugCommands.STEP_INTO, ...DebugThreadContextCommands.STEP_INTO }, { ...DebugCommands.STEP_OUT, ...DebugThreadContextCommands.STEP_OUT }, { ...DebugCommands.PAUSE_ALL, ...DebugSessionContextCommands.PAUSE_ALL }, { ...DebugCommands.CONTINUE_ALL, ...DebugSessionContextCommands.CONTINUE_ALL });
|
|
484
|
+
registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.TERMINATE_MENU, { ...DebugCommands.RESTART, ...DebugSessionContextCommands.RESTART }, { ...DebugCommands.STOP, ...DebugSessionContextCommands.STOP }, { ...DebugThreadContextCommands.TERMINATE, label: nls_1.nls.localizeByDefault('Terminate Thread') });
|
|
485
|
+
registerMenuActions(debug_threads_widget_1.DebugThreadsWidget.OPEN_MENU, { ...DebugSessionContextCommands.REVEAL, label: nls_1.nls.localize('theia/debug/reveal', 'Reveal') });
|
|
486
|
+
registerMenuActions(debug_stack_frames_widget_1.DebugStackFramesWidget.CONTEXT_MENU, DebugCommands.RESTART_FRAME, DebugCommands.COPY_CALL_STACK);
|
|
487
|
+
registerMenuActions(debug_variables_widget_1.DebugVariablesWidget.EDIT_MENU, DebugCommands.SET_VARIABLE_VALUE, DebugCommands.COPY_VARIABLE_VALUE, DebugCommands.COPY_VARIABLE_AS_EXPRESSION);
|
|
488
|
+
registerMenuActions(debug_variables_widget_1.DebugVariablesWidget.WATCH_MENU, DebugCommands.WATCH_VARIABLE);
|
|
489
|
+
registerMenuActions(debug_watch_widget_1.DebugWatchWidget.EDIT_MENU, DebugCommands.EDIT_WATCH_EXPRESSION, DebugCommands.COPY_WATCH_EXPRESSION_VALUE);
|
|
490
|
+
registerMenuActions(debug_watch_widget_1.DebugWatchWidget.REMOVE_MENU, DebugCommands.REMOVE_WATCH_EXPRESSION, DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS);
|
|
491
|
+
registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.EDIT_MENU, DebugCommands.EDIT_BREAKPOINT, DebugCommands.EDIT_LOGPOINT, DebugCommands.EDIT_BREAKPOINT_CONDITION);
|
|
492
|
+
registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.REMOVE_MENU, DebugCommands.REMOVE_BREAKPOINT, DebugCommands.REMOVE_LOGPOINT, DebugCommands.REMOVE_ALL_BREAKPOINTS);
|
|
493
|
+
registerMenuActions(debug_breakpoints_widget_1.DebugBreakpointsWidget.ENABLE_MENU, DebugCommands.ENABLE_ALL_BREAKPOINTS, DebugCommands.DISABLE_ALL_BREAKPOINTS);
|
|
494
|
+
registerMenuActions(debug_editor_model_1.DebugEditorModel.CONTEXT_MENU, { ...DebugEditorContextCommands.ADD_BREAKPOINT, label: nls_1.nls.localizeByDefault('Add Breakpoint') }, { ...DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT, label: DebugCommands.ADD_CONDITIONAL_BREAKPOINT.label }, { ...DebugEditorContextCommands.ADD_LOGPOINT, label: DebugCommands.ADD_LOGPOINT.label }, { ...DebugEditorContextCommands.REMOVE_BREAKPOINT, label: DebugCommands.REMOVE_BREAKPOINT.label }, { ...DebugEditorContextCommands.EDIT_BREAKPOINT, label: DebugCommands.EDIT_BREAKPOINT.label }, { ...DebugEditorContextCommands.ENABLE_BREAKPOINT, label: nlsEnableBreakpoint('Breakpoint') }, { ...DebugEditorContextCommands.DISABLE_BREAKPOINT, label: nlsDisableBreakpoint('Breakpoint') }, { ...DebugEditorContextCommands.REMOVE_LOGPOINT, label: DebugCommands.REMOVE_LOGPOINT.label }, { ...DebugEditorContextCommands.EDIT_LOGPOINT, label: DebugCommands.EDIT_LOGPOINT.label }, { ...DebugEditorContextCommands.ENABLE_LOGPOINT, label: nlsEnableBreakpoint('Logpoint') }, { ...DebugEditorContextCommands.DISABLE_LOGPOINT, label: nlsDisableBreakpoint('Logpoint') });
|
|
495
|
+
menus.linkSubmenu(browser_2.EDITOR_LINENUMBER_CONTEXT_MENU, debug_editor_model_1.DebugEditorModel.CONTEXT_MENU, { role: 1 /* Group */ });
|
|
496
|
+
}
|
|
497
|
+
registerCommands(registry) {
|
|
498
|
+
super.registerCommands(registry);
|
|
499
|
+
registry.registerCommand(DebugCommands.START, {
|
|
500
|
+
execute: (config) => this.start(false, config)
|
|
501
|
+
});
|
|
502
|
+
registry.registerCommand(DebugCommands.START_NO_DEBUG, {
|
|
503
|
+
execute: (config) => this.start(true, config)
|
|
504
|
+
});
|
|
505
|
+
registry.registerCommand(DebugCommands.STOP, {
|
|
506
|
+
execute: () => this.manager.terminateSession(),
|
|
507
|
+
isEnabled: () => this.manager.state !== debug_session_1.DebugState.Inactive
|
|
508
|
+
});
|
|
509
|
+
registry.registerCommand(DebugCommands.RESTART, {
|
|
510
|
+
execute: () => this.manager.restartSession(),
|
|
511
|
+
isEnabled: () => this.manager.state !== debug_session_1.DebugState.Inactive
|
|
512
|
+
});
|
|
513
|
+
registry.registerCommand(DebugCommands.OPEN_CONFIGURATIONS, {
|
|
514
|
+
execute: () => this.configurations.openConfiguration()
|
|
515
|
+
});
|
|
516
|
+
registry.registerCommand(DebugCommands.ADD_CONFIGURATION, {
|
|
517
|
+
execute: () => this.configurations.addConfiguration()
|
|
518
|
+
});
|
|
519
|
+
registry.registerCommand(DebugCommands.STEP_OVER, {
|
|
520
|
+
execute: () => this.manager.currentThread && this.manager.currentThread.stepOver(),
|
|
521
|
+
isEnabled: () => this.manager.state === debug_session_1.DebugState.Stopped
|
|
522
|
+
});
|
|
523
|
+
registry.registerCommand(DebugCommands.STEP_INTO, {
|
|
524
|
+
execute: () => this.manager.currentThread && this.manager.currentThread.stepIn(),
|
|
525
|
+
isEnabled: () => this.manager.state === debug_session_1.DebugState.Stopped
|
|
526
|
+
});
|
|
527
|
+
registry.registerCommand(DebugCommands.STEP_OUT, {
|
|
528
|
+
execute: () => this.manager.currentThread && this.manager.currentThread.stepOut(),
|
|
529
|
+
isEnabled: () => this.manager.state === debug_session_1.DebugState.Stopped
|
|
530
|
+
});
|
|
531
|
+
registry.registerCommand(DebugCommands.CONTINUE, {
|
|
532
|
+
execute: () => this.manager.currentThread && this.manager.currentThread.continue(),
|
|
533
|
+
isEnabled: () => this.manager.state === debug_session_1.DebugState.Stopped
|
|
534
|
+
});
|
|
535
|
+
registry.registerCommand(DebugCommands.PAUSE, {
|
|
536
|
+
execute: () => this.manager.currentThread && this.manager.currentThread.pause(),
|
|
537
|
+
isEnabled: () => this.manager.state === debug_session_1.DebugState.Running
|
|
538
|
+
});
|
|
539
|
+
registry.registerCommand(DebugCommands.PAUSE_ALL, {
|
|
540
|
+
execute: () => this.manager.currentSession && this.manager.currentSession.pauseAll(),
|
|
541
|
+
isEnabled: () => !!this.manager.currentSession && !!this.manager.currentSession.runningThreads.next().value
|
|
542
|
+
});
|
|
543
|
+
registry.registerCommand(DebugCommands.CONTINUE_ALL, {
|
|
544
|
+
execute: () => this.manager.currentSession && this.manager.currentSession.continueAll(),
|
|
545
|
+
isEnabled: () => !!this.manager.currentSession && !!this.manager.currentSession.stoppedThreads.next().value
|
|
546
|
+
});
|
|
547
|
+
registry.registerCommand(DebugThreadContextCommands.STEP_OVER, {
|
|
548
|
+
execute: () => this.selectedThread && this.selectedThread.stepOver(),
|
|
549
|
+
isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
|
|
550
|
+
isVisible: () => !!this.selectedThread
|
|
551
|
+
});
|
|
552
|
+
registry.registerCommand(DebugThreadContextCommands.STEP_INTO, {
|
|
553
|
+
execute: () => this.selectedThread && this.selectedThread.stepIn(),
|
|
554
|
+
isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
|
|
555
|
+
isVisible: () => !!this.selectedThread
|
|
556
|
+
});
|
|
557
|
+
registry.registerCommand(DebugThreadContextCommands.STEP_OUT, {
|
|
558
|
+
execute: () => this.selectedThread && this.selectedThread.stepOut(),
|
|
559
|
+
isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
|
|
560
|
+
isVisible: () => !!this.selectedThread
|
|
561
|
+
});
|
|
562
|
+
registry.registerCommand(DebugThreadContextCommands.CONTINUE, {
|
|
563
|
+
execute: () => this.selectedThread && this.selectedThread.continue(),
|
|
564
|
+
isEnabled: () => !!this.selectedThread && this.selectedThread.stopped,
|
|
565
|
+
isVisible: () => !!this.selectedThread && this.selectedThread.stopped,
|
|
566
|
+
});
|
|
567
|
+
registry.registerCommand(DebugThreadContextCommands.PAUSE, {
|
|
568
|
+
execute: () => this.selectedThread && this.selectedThread.pause(),
|
|
569
|
+
isEnabled: () => !!this.selectedThread && !this.selectedThread.stopped,
|
|
570
|
+
isVisible: () => !!this.selectedThread && !this.selectedThread.stopped,
|
|
571
|
+
});
|
|
572
|
+
registry.registerCommand(DebugThreadContextCommands.TERMINATE, {
|
|
573
|
+
execute: () => this.selectedThread && this.selectedThread.terminate(),
|
|
574
|
+
isEnabled: () => !!this.selectedThread && this.selectedThread.supportsTerminate,
|
|
575
|
+
isVisible: () => !!this.selectedThread && this.selectedThread.supportsTerminate
|
|
576
|
+
});
|
|
577
|
+
registry.registerCommand(DebugSessionContextCommands.STOP, {
|
|
578
|
+
execute: () => this.selectedSession && this.manager.terminateSession(this.selectedSession),
|
|
579
|
+
isEnabled: () => !!this.selectedSession && this.selectedSession.state !== debug_session_1.DebugState.Inactive,
|
|
580
|
+
isVisible: () => !this.selectedThread
|
|
581
|
+
});
|
|
582
|
+
registry.registerCommand(DebugSessionContextCommands.RESTART, {
|
|
583
|
+
execute: () => this.selectedSession && this.manager.restartSession(this.selectedSession),
|
|
584
|
+
isEnabled: () => !!this.selectedSession && this.selectedSession.state !== debug_session_1.DebugState.Inactive,
|
|
585
|
+
isVisible: () => !this.selectedThread
|
|
586
|
+
});
|
|
587
|
+
registry.registerCommand(DebugSessionContextCommands.CONTINUE_ALL, {
|
|
588
|
+
execute: () => this.selectedSession && this.selectedSession.continueAll(),
|
|
589
|
+
isEnabled: () => !!this.selectedSession && !!this.selectedSession.stoppedThreads.next().value,
|
|
590
|
+
isVisible: () => !this.selectedThread
|
|
591
|
+
});
|
|
592
|
+
registry.registerCommand(DebugSessionContextCommands.PAUSE_ALL, {
|
|
593
|
+
execute: () => this.selectedSession && this.selectedSession.pauseAll(),
|
|
594
|
+
isEnabled: () => !!this.selectedSession && !!this.selectedSession.runningThreads.next().value,
|
|
595
|
+
isVisible: () => !this.selectedThread
|
|
596
|
+
});
|
|
597
|
+
registry.registerCommand(DebugSessionContextCommands.REVEAL, {
|
|
598
|
+
execute: () => this.selectedSession && this.revealSession(this.selectedSession),
|
|
599
|
+
isEnabled: () => Boolean(this.selectedSession),
|
|
600
|
+
isVisible: () => !this.selectedThread && Boolean(this.selectedSession)
|
|
601
|
+
});
|
|
602
|
+
registry.registerCommand(DebugCommands.TOGGLE_BREAKPOINT, {
|
|
603
|
+
execute: () => this.editors.toggleBreakpoint(),
|
|
604
|
+
isEnabled: () => !!this.editors.model
|
|
605
|
+
});
|
|
606
|
+
registry.registerCommand(DebugCommands.INLINE_BREAKPOINT, {
|
|
607
|
+
execute: () => this.editors.addInlineBreakpoint(),
|
|
608
|
+
isEnabled: () => !!this.editors.model && !this.editors.getInlineBreakpoint()
|
|
609
|
+
});
|
|
610
|
+
registry.registerCommand(DebugCommands.ADD_CONDITIONAL_BREAKPOINT, {
|
|
611
|
+
execute: () => this.editors.addBreakpoint('condition'),
|
|
612
|
+
isEnabled: () => !!this.editors.model && !this.editors.anyBreakpoint()
|
|
613
|
+
});
|
|
614
|
+
registry.registerCommand(DebugCommands.ADD_LOGPOINT, {
|
|
615
|
+
execute: () => this.editors.addBreakpoint('logMessage'),
|
|
616
|
+
isEnabled: () => !!this.editors.model && !this.editors.anyBreakpoint()
|
|
617
|
+
});
|
|
618
|
+
registry.registerCommand(DebugCommands.ADD_FUNCTION_BREAKPOINT, {
|
|
619
|
+
execute: async () => {
|
|
620
|
+
const { labelProvider, breakpointManager, editorManager } = this;
|
|
621
|
+
const options = { labelProvider, breakpoints: breakpointManager, editorManager };
|
|
622
|
+
await new debug_function_breakpoint_1.DebugFunctionBreakpoint(breakpoint_marker_1.FunctionBreakpoint.create({ name: '' }), options).open();
|
|
623
|
+
},
|
|
624
|
+
isEnabled: widget => !(widget instanceof browser_1.Widget) || widget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget,
|
|
625
|
+
isVisible: widget => !(widget instanceof browser_1.Widget) || widget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget
|
|
626
|
+
});
|
|
627
|
+
registry.registerCommand(DebugCommands.ENABLE_ALL_BREAKPOINTS, {
|
|
628
|
+
execute: () => this.breakpointManager.enableAllBreakpoints(true),
|
|
629
|
+
isEnabled: () => this.breakpointManager.hasBreakpoints()
|
|
630
|
+
});
|
|
631
|
+
registry.registerCommand(DebugCommands.DISABLE_ALL_BREAKPOINTS, {
|
|
632
|
+
execute: () => this.breakpointManager.enableAllBreakpoints(false),
|
|
633
|
+
isEnabled: () => this.breakpointManager.hasBreakpoints()
|
|
634
|
+
});
|
|
635
|
+
registry.registerCommand(DebugCommands.EDIT_BREAKPOINT, {
|
|
636
|
+
execute: async () => {
|
|
637
|
+
const { selectedBreakpoint, selectedFunctionBreakpoint } = this;
|
|
638
|
+
if (selectedBreakpoint) {
|
|
639
|
+
await this.editors.editBreakpoint(selectedBreakpoint);
|
|
640
|
+
}
|
|
641
|
+
else if (selectedFunctionBreakpoint) {
|
|
642
|
+
await selectedFunctionBreakpoint.open();
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
isEnabled: () => !!this.selectedBreakpoint || !!this.selectedFunctionBreakpoint,
|
|
646
|
+
isVisible: () => !!this.selectedBreakpoint || !!this.selectedFunctionBreakpoint
|
|
647
|
+
});
|
|
648
|
+
registry.registerCommand(DebugCommands.EDIT_LOGPOINT, {
|
|
649
|
+
execute: async () => {
|
|
650
|
+
const { selectedLogpoint } = this;
|
|
651
|
+
if (selectedLogpoint) {
|
|
652
|
+
await this.editors.editBreakpoint(selectedLogpoint);
|
|
653
|
+
}
|
|
654
|
+
},
|
|
655
|
+
isEnabled: () => !!this.selectedLogpoint,
|
|
656
|
+
isVisible: () => !!this.selectedLogpoint
|
|
657
|
+
});
|
|
658
|
+
registry.registerCommand(DebugCommands.EDIT_BREAKPOINT_CONDITION, {
|
|
659
|
+
execute: async () => {
|
|
660
|
+
const { selectedExceptionBreakpoint } = this;
|
|
661
|
+
if (selectedExceptionBreakpoint) {
|
|
662
|
+
await selectedExceptionBreakpoint.editCondition();
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
isEnabled: () => { var _a; return !!((_a = this.selectedExceptionBreakpoint) === null || _a === void 0 ? void 0 : _a.data.raw.supportsCondition); },
|
|
666
|
+
isVisible: () => { var _a; return !!((_a = this.selectedExceptionBreakpoint) === null || _a === void 0 ? void 0 : _a.data.raw.supportsCondition); }
|
|
667
|
+
});
|
|
668
|
+
registry.registerCommand(DebugCommands.REMOVE_BREAKPOINT, {
|
|
669
|
+
execute: () => {
|
|
670
|
+
const selectedBreakpoint = this.selectedSettableBreakpoint;
|
|
671
|
+
if (selectedBreakpoint) {
|
|
672
|
+
selectedBreakpoint.remove();
|
|
673
|
+
}
|
|
674
|
+
},
|
|
675
|
+
isEnabled: () => Boolean(this.selectedSettableBreakpoint),
|
|
676
|
+
isVisible: () => Boolean(this.selectedSettableBreakpoint),
|
|
677
|
+
});
|
|
678
|
+
registry.registerCommand(DebugCommands.REMOVE_LOGPOINT, {
|
|
679
|
+
execute: () => {
|
|
680
|
+
const { selectedLogpoint } = this;
|
|
681
|
+
if (selectedLogpoint) {
|
|
682
|
+
selectedLogpoint.remove();
|
|
683
|
+
}
|
|
684
|
+
},
|
|
685
|
+
isEnabled: () => !!this.selectedLogpoint,
|
|
686
|
+
isVisible: () => !!this.selectedLogpoint
|
|
687
|
+
});
|
|
688
|
+
registry.registerCommand(DebugCommands.REMOVE_ALL_BREAKPOINTS, {
|
|
689
|
+
execute: () => this.breakpointManager.removeBreakpoints(),
|
|
690
|
+
isEnabled: () => this.breakpointManager.hasBreakpoints(),
|
|
691
|
+
isVisible: widget => !(widget instanceof browser_1.Widget) || (widget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget)
|
|
692
|
+
});
|
|
693
|
+
registry.registerCommand(DebugCommands.TOGGLE_BREAKPOINTS_ENABLED, {
|
|
694
|
+
execute: () => this.breakpointManager.breakpointsEnabled = !this.breakpointManager.breakpointsEnabled,
|
|
695
|
+
isVisible: arg => arg instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget
|
|
696
|
+
});
|
|
697
|
+
registry.registerCommand(DebugCommands.SHOW_HOVER, {
|
|
698
|
+
execute: () => this.editors.showHover(),
|
|
699
|
+
isEnabled: () => this.editors.canShowHover()
|
|
700
|
+
});
|
|
701
|
+
registry.registerCommand(DebugCommands.RESTART_FRAME, {
|
|
702
|
+
execute: () => this.selectedFrame && this.selectedFrame.restart(),
|
|
703
|
+
isEnabled: () => !!this.selectedFrame
|
|
704
|
+
});
|
|
705
|
+
registry.registerCommand(DebugCommands.COPY_CALL_STACK, {
|
|
706
|
+
execute: () => {
|
|
707
|
+
const { frames } = this;
|
|
708
|
+
const selection = document.getSelection();
|
|
709
|
+
if (frames && selection) {
|
|
710
|
+
selection.selectAllChildren(frames.node);
|
|
711
|
+
document.execCommand('copy');
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
isEnabled: () => document.queryCommandSupported('copy'),
|
|
715
|
+
isVisible: () => document.queryCommandSupported('copy')
|
|
716
|
+
});
|
|
717
|
+
registry.registerCommand(DebugCommands.SET_VARIABLE_VALUE, {
|
|
718
|
+
execute: () => this.selectedVariable && this.selectedVariable.open(),
|
|
719
|
+
isEnabled: () => !!this.selectedVariable && this.selectedVariable.supportSetVariable,
|
|
720
|
+
isVisible: () => !!this.selectedVariable && this.selectedVariable.supportSetVariable
|
|
721
|
+
});
|
|
722
|
+
registry.registerCommand(DebugCommands.COPY_VARIABLE_VALUE, {
|
|
723
|
+
execute: () => this.selectedVariable && this.selectedVariable.copyValue(),
|
|
724
|
+
isEnabled: () => !!this.selectedVariable && this.selectedVariable.supportCopyValue,
|
|
725
|
+
isVisible: () => !!this.selectedVariable && this.selectedVariable.supportCopyValue
|
|
726
|
+
});
|
|
727
|
+
registry.registerCommand(DebugCommands.COPY_VARIABLE_AS_EXPRESSION, {
|
|
728
|
+
execute: () => this.selectedVariable && this.selectedVariable.copyAsExpression(),
|
|
729
|
+
isEnabled: () => !!this.selectedVariable && this.selectedVariable.supportCopyAsExpression,
|
|
730
|
+
isVisible: () => !!this.selectedVariable && this.selectedVariable.supportCopyAsExpression
|
|
731
|
+
});
|
|
732
|
+
registry.registerCommand(DebugCommands.WATCH_VARIABLE, {
|
|
733
|
+
execute: () => {
|
|
734
|
+
const { selectedVariable, watch } = this;
|
|
735
|
+
if (selectedVariable && watch) {
|
|
736
|
+
watch.viewModel.addWatchExpression(selectedVariable.name);
|
|
737
|
+
}
|
|
738
|
+
},
|
|
739
|
+
isEnabled: () => !!this.selectedVariable && !!this.watch,
|
|
740
|
+
isVisible: () => !!this.selectedVariable && !!this.watch,
|
|
741
|
+
});
|
|
742
|
+
// Debug context menu commands
|
|
743
|
+
registry.registerCommand(DebugEditorContextCommands.ADD_BREAKPOINT, {
|
|
744
|
+
execute: position => this.isPosition(position) && this.editors.toggleBreakpoint(this.asPosition(position)),
|
|
745
|
+
isEnabled: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position)),
|
|
746
|
+
isVisible: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position))
|
|
747
|
+
});
|
|
748
|
+
registry.registerCommand(DebugEditorContextCommands.ADD_CONDITIONAL_BREAKPOINT, {
|
|
749
|
+
execute: position => this.isPosition(position) && this.editors.addBreakpoint('condition', this.asPosition(position)),
|
|
750
|
+
isEnabled: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position)),
|
|
751
|
+
isVisible: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position))
|
|
752
|
+
});
|
|
753
|
+
registry.registerCommand(DebugEditorContextCommands.ADD_LOGPOINT, {
|
|
754
|
+
execute: position => this.isPosition(position) && this.editors.addBreakpoint('logMessage', this.asPosition(position)),
|
|
755
|
+
isEnabled: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position)),
|
|
756
|
+
isVisible: position => this.isPosition(position) && !this.editors.anyBreakpoint(this.asPosition(position))
|
|
757
|
+
});
|
|
758
|
+
registry.registerCommand(DebugEditorContextCommands.REMOVE_BREAKPOINT, {
|
|
759
|
+
execute: position => this.isPosition(position) && this.editors.toggleBreakpoint(this.asPosition(position)),
|
|
760
|
+
isEnabled: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position)),
|
|
761
|
+
isVisible: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position))
|
|
762
|
+
});
|
|
763
|
+
registry.registerCommand(DebugEditorContextCommands.EDIT_BREAKPOINT, {
|
|
764
|
+
execute: position => this.isPosition(position) && this.editors.editBreakpoint(this.asPosition(position)),
|
|
765
|
+
isEnabled: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position)),
|
|
766
|
+
isVisible: position => this.isPosition(position) && !!this.editors.getBreakpoint(this.asPosition(position))
|
|
767
|
+
});
|
|
768
|
+
registry.registerCommand(DebugEditorContextCommands.ENABLE_BREAKPOINT, {
|
|
769
|
+
execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), true),
|
|
770
|
+
isEnabled: position => this.isPosition(position) && this.editors.getBreakpointEnabled(this.asPosition(position)) === false,
|
|
771
|
+
isVisible: position => this.isPosition(position) && this.editors.getBreakpointEnabled(this.asPosition(position)) === false
|
|
772
|
+
});
|
|
773
|
+
registry.registerCommand(DebugEditorContextCommands.DISABLE_BREAKPOINT, {
|
|
774
|
+
execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), false),
|
|
775
|
+
isEnabled: position => this.isPosition(position) && !!this.editors.getBreakpointEnabled(this.asPosition(position)),
|
|
776
|
+
isVisible: position => this.isPosition(position) && !!this.editors.getBreakpointEnabled(this.asPosition(position))
|
|
777
|
+
});
|
|
778
|
+
registry.registerCommand(DebugEditorContextCommands.REMOVE_LOGPOINT, {
|
|
779
|
+
execute: position => this.isPosition(position) && this.editors.toggleBreakpoint(this.asPosition(position)),
|
|
780
|
+
isEnabled: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position)),
|
|
781
|
+
isVisible: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position))
|
|
782
|
+
});
|
|
783
|
+
registry.registerCommand(DebugEditorContextCommands.EDIT_LOGPOINT, {
|
|
784
|
+
execute: position => this.isPosition(position) && this.editors.editBreakpoint(this.asPosition(position)),
|
|
785
|
+
isEnabled: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position)),
|
|
786
|
+
isVisible: position => this.isPosition(position) && !!this.editors.getLogpoint(this.asPosition(position))
|
|
787
|
+
});
|
|
788
|
+
registry.registerCommand(DebugEditorContextCommands.ENABLE_LOGPOINT, {
|
|
789
|
+
execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), true),
|
|
790
|
+
isEnabled: position => this.isPosition(position) && this.editors.getLogpointEnabled(this.asPosition(position)) === false,
|
|
791
|
+
isVisible: position => this.isPosition(position) && this.editors.getLogpointEnabled(this.asPosition(position)) === false
|
|
792
|
+
});
|
|
793
|
+
registry.registerCommand(DebugEditorContextCommands.DISABLE_LOGPOINT, {
|
|
794
|
+
execute: position => this.isPosition(position) && this.editors.setBreakpointEnabled(this.asPosition(position), false),
|
|
795
|
+
isEnabled: position => this.isPosition(position) && !!this.editors.getLogpointEnabled(this.asPosition(position)),
|
|
796
|
+
isVisible: position => this.isPosition(position) && !!this.editors.getLogpointEnabled(this.asPosition(position))
|
|
797
|
+
});
|
|
798
|
+
registry.registerCommand(DebugBreakpointWidgetCommands.ACCEPT, {
|
|
799
|
+
execute: () => this.editors.acceptBreakpoint()
|
|
800
|
+
});
|
|
801
|
+
registry.registerCommand(DebugBreakpointWidgetCommands.CLOSE, {
|
|
802
|
+
execute: () => this.editors.closeBreakpoint()
|
|
803
|
+
});
|
|
804
|
+
registry.registerCommand(DebugCommands.ADD_WATCH_EXPRESSION, {
|
|
805
|
+
execute: widget => {
|
|
806
|
+
if (widget instanceof browser_1.Widget) {
|
|
807
|
+
if (widget instanceof debug_watch_widget_1.DebugWatchWidget) {
|
|
808
|
+
widget.viewModel.addWatchExpression();
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
else if (this.watch) {
|
|
812
|
+
this.watch.viewModel.addWatchExpression();
|
|
813
|
+
}
|
|
814
|
+
},
|
|
815
|
+
isEnabled: widget => widget instanceof browser_1.Widget ? widget instanceof debug_watch_widget_1.DebugWatchWidget : !!this.watch,
|
|
816
|
+
isVisible: widget => widget instanceof browser_1.Widget ? widget instanceof debug_watch_widget_1.DebugWatchWidget : !!this.watch
|
|
817
|
+
});
|
|
818
|
+
registry.registerCommand(DebugCommands.EDIT_WATCH_EXPRESSION, {
|
|
819
|
+
execute: () => {
|
|
820
|
+
const { watchExpression } = this;
|
|
821
|
+
if (watchExpression) {
|
|
822
|
+
watchExpression.open();
|
|
823
|
+
}
|
|
824
|
+
},
|
|
825
|
+
isEnabled: () => !!this.watchExpression,
|
|
826
|
+
isVisible: () => !!this.watchExpression
|
|
827
|
+
});
|
|
828
|
+
registry.registerCommand(DebugCommands.COPY_WATCH_EXPRESSION_VALUE, {
|
|
829
|
+
execute: () => this.watchExpression && this.watchExpression.copyValue(),
|
|
830
|
+
isEnabled: () => !!this.watchExpression && this.watchExpression.supportCopyValue,
|
|
831
|
+
isVisible: () => !!this.watchExpression && this.watchExpression.supportCopyValue
|
|
832
|
+
});
|
|
833
|
+
registry.registerCommand(DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS, {
|
|
834
|
+
execute: widget => {
|
|
835
|
+
if (widget instanceof debug_watch_widget_1.DebugWatchWidget) {
|
|
836
|
+
const root = widget.model.root;
|
|
837
|
+
widget.model.collapseAll(browser_1.CompositeTreeNode.is(root) ? root : undefined);
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
isEnabled: widget => widget instanceof debug_watch_widget_1.DebugWatchWidget,
|
|
841
|
+
isVisible: widget => widget instanceof debug_watch_widget_1.DebugWatchWidget
|
|
842
|
+
});
|
|
843
|
+
registry.registerCommand(DebugCommands.REMOVE_WATCH_EXPRESSION, {
|
|
844
|
+
execute: () => {
|
|
845
|
+
const { watch, watchExpression } = this;
|
|
846
|
+
if (watch && watchExpression) {
|
|
847
|
+
watch.viewModel.removeWatchExpression(watchExpression);
|
|
848
|
+
}
|
|
849
|
+
},
|
|
850
|
+
isEnabled: () => !!this.watchExpression,
|
|
851
|
+
isVisible: () => !!this.watchExpression
|
|
852
|
+
});
|
|
853
|
+
registry.registerCommand(DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS, {
|
|
854
|
+
execute: widget => {
|
|
855
|
+
if (widget instanceof browser_1.Widget) {
|
|
856
|
+
if (widget instanceof debug_watch_widget_1.DebugWatchWidget) {
|
|
857
|
+
widget.viewModel.removeWatchExpressions();
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
else if (this.watch) {
|
|
861
|
+
this.watch.viewModel.removeWatchExpressions();
|
|
862
|
+
}
|
|
863
|
+
},
|
|
864
|
+
isEnabled: widget => widget instanceof browser_1.Widget ? widget instanceof debug_watch_widget_1.DebugWatchWidget : !!this.watch,
|
|
865
|
+
isVisible: widget => widget instanceof browser_1.Widget ? widget instanceof debug_watch_widget_1.DebugWatchWidget : !!this.watch
|
|
866
|
+
});
|
|
867
|
+
}
|
|
868
|
+
registerKeybindings(keybindings) {
|
|
869
|
+
super.registerKeybindings(keybindings);
|
|
870
|
+
keybindings.registerKeybinding({
|
|
871
|
+
command: DebugCommands.START.id,
|
|
872
|
+
keybinding: 'f5'
|
|
873
|
+
});
|
|
874
|
+
keybindings.registerKeybinding({
|
|
875
|
+
command: DebugCommands.START_NO_DEBUG.id,
|
|
876
|
+
keybinding: 'ctrl+f5'
|
|
877
|
+
});
|
|
878
|
+
keybindings.registerKeybinding({
|
|
879
|
+
command: DebugCommands.STOP.id,
|
|
880
|
+
keybinding: 'shift+f5',
|
|
881
|
+
when: 'inDebugMode'
|
|
882
|
+
});
|
|
883
|
+
keybindings.registerKeybinding({
|
|
884
|
+
command: DebugCommands.RESTART.id,
|
|
885
|
+
keybinding: 'shift+ctrlcmd+f5',
|
|
886
|
+
when: 'inDebugMode'
|
|
887
|
+
});
|
|
888
|
+
keybindings.registerKeybinding({
|
|
889
|
+
command: DebugCommands.STEP_OVER.id,
|
|
890
|
+
keybinding: 'f10',
|
|
891
|
+
when: 'inDebugMode'
|
|
892
|
+
});
|
|
893
|
+
keybindings.registerKeybinding({
|
|
894
|
+
command: DebugCommands.STEP_INTO.id,
|
|
895
|
+
keybinding: 'f11',
|
|
896
|
+
when: 'inDebugMode'
|
|
897
|
+
});
|
|
898
|
+
keybindings.registerKeybinding({
|
|
899
|
+
command: DebugCommands.STEP_OUT.id,
|
|
900
|
+
keybinding: 'shift+f11',
|
|
901
|
+
when: 'inDebugMode'
|
|
902
|
+
});
|
|
903
|
+
keybindings.registerKeybinding({
|
|
904
|
+
command: DebugCommands.CONTINUE.id,
|
|
905
|
+
keybinding: 'f5',
|
|
906
|
+
when: 'inDebugMode'
|
|
907
|
+
});
|
|
908
|
+
keybindings.registerKeybinding({
|
|
909
|
+
command: DebugCommands.PAUSE.id,
|
|
910
|
+
keybinding: 'f6',
|
|
911
|
+
when: 'inDebugMode'
|
|
912
|
+
});
|
|
913
|
+
keybindings.registerKeybinding({
|
|
914
|
+
command: DebugCommands.TOGGLE_BREAKPOINT.id,
|
|
915
|
+
keybinding: 'f9',
|
|
916
|
+
when: 'editorTextFocus'
|
|
917
|
+
});
|
|
918
|
+
keybindings.registerKeybinding({
|
|
919
|
+
command: DebugCommands.INLINE_BREAKPOINT.id,
|
|
920
|
+
keybinding: 'shift+f9',
|
|
921
|
+
when: 'editorTextFocus'
|
|
922
|
+
});
|
|
923
|
+
keybindings.registerKeybinding({
|
|
924
|
+
command: DebugBreakpointWidgetCommands.ACCEPT.id,
|
|
925
|
+
keybinding: 'enter',
|
|
926
|
+
when: 'breakpointWidgetFocus'
|
|
927
|
+
});
|
|
928
|
+
keybindings.registerKeybinding({
|
|
929
|
+
command: DebugBreakpointWidgetCommands.CLOSE.id,
|
|
930
|
+
keybinding: 'esc',
|
|
931
|
+
when: 'isBreakpointWidgetVisible || breakpointWidgetFocus'
|
|
932
|
+
});
|
|
933
|
+
}
|
|
934
|
+
registerToolbarItems(toolbar) {
|
|
935
|
+
const onDidChangeToggleBreakpointsEnabled = new common_1.Emitter();
|
|
936
|
+
const toggleBreakpointsEnabled = {
|
|
937
|
+
id: DebugCommands.TOGGLE_BREAKPOINTS_ENABLED.id,
|
|
938
|
+
command: DebugCommands.TOGGLE_BREAKPOINTS_ENABLED.id,
|
|
939
|
+
icon: (0, browser_1.codicon)('activate-breakpoints'),
|
|
940
|
+
onDidChange: onDidChangeToggleBreakpointsEnabled.event,
|
|
941
|
+
priority: 1
|
|
942
|
+
};
|
|
943
|
+
const updateToggleBreakpointsEnabled = () => {
|
|
944
|
+
const activateBreakpoints = nls_1.nls.localizeByDefault('Enable All Breakpoints');
|
|
945
|
+
const deactivateBreakpoints = nls_1.nls.localizeByDefault('Disable All Breakpoints');
|
|
946
|
+
const tooltip = this.breakpointManager.breakpointsEnabled ? deactivateBreakpoints : activateBreakpoints;
|
|
947
|
+
if (toggleBreakpointsEnabled.tooltip !== tooltip) {
|
|
948
|
+
toggleBreakpointsEnabled.tooltip = tooltip;
|
|
949
|
+
onDidChangeToggleBreakpointsEnabled.fire(undefined);
|
|
950
|
+
}
|
|
951
|
+
};
|
|
952
|
+
toolbar.registerItem({
|
|
953
|
+
id: DebugCommands.ADD_FUNCTION_BREAKPOINT.id,
|
|
954
|
+
command: DebugCommands.ADD_FUNCTION_BREAKPOINT.id,
|
|
955
|
+
icon: (0, browser_1.codicon)('add'),
|
|
956
|
+
tooltip: DebugCommands.ADD_FUNCTION_BREAKPOINT.label
|
|
957
|
+
});
|
|
958
|
+
updateToggleBreakpointsEnabled();
|
|
959
|
+
this.breakpointManager.onDidChangeBreakpoints(updateToggleBreakpointsEnabled);
|
|
960
|
+
toolbar.registerItem(toggleBreakpointsEnabled);
|
|
961
|
+
toolbar.registerItem({
|
|
962
|
+
id: DebugCommands.REMOVE_ALL_BREAKPOINTS.id,
|
|
963
|
+
command: DebugCommands.REMOVE_ALL_BREAKPOINTS.id,
|
|
964
|
+
icon: (0, browser_1.codicon)('close-all'),
|
|
965
|
+
priority: 2
|
|
966
|
+
});
|
|
967
|
+
toolbar.registerItem({
|
|
968
|
+
id: DebugCommands.ADD_WATCH_EXPRESSION.id,
|
|
969
|
+
command: DebugCommands.ADD_WATCH_EXPRESSION.id,
|
|
970
|
+
icon: (0, browser_1.codicon)('add'),
|
|
971
|
+
tooltip: DebugCommands.ADD_WATCH_EXPRESSION.label
|
|
972
|
+
});
|
|
973
|
+
toolbar.registerItem({
|
|
974
|
+
id: DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.id,
|
|
975
|
+
command: DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.id,
|
|
976
|
+
icon: (0, browser_1.codicon)('collapse-all'),
|
|
977
|
+
tooltip: DebugCommands.COLLAPSE_ALL_WATCH_EXPRESSIONS.label,
|
|
978
|
+
priority: 1
|
|
979
|
+
});
|
|
980
|
+
toolbar.registerItem({
|
|
981
|
+
id: DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.id,
|
|
982
|
+
command: DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.id,
|
|
983
|
+
icon: (0, browser_1.codicon)('close-all'),
|
|
984
|
+
tooltip: DebugCommands.REMOVE_ALL_WATCH_EXPRESSIONS.label,
|
|
985
|
+
priority: 2
|
|
986
|
+
});
|
|
987
|
+
}
|
|
988
|
+
async openSession(session, options) {
|
|
989
|
+
const { reveal } = {
|
|
990
|
+
reveal: true,
|
|
991
|
+
...options
|
|
992
|
+
};
|
|
993
|
+
const debugWidget = await this.openView({ reveal });
|
|
994
|
+
debugWidget.sessionManager.currentSession = session;
|
|
995
|
+
return debugWidget['sessionWidget'];
|
|
996
|
+
}
|
|
997
|
+
revealSession(session) {
|
|
998
|
+
var _a;
|
|
999
|
+
const widget = (_a = this.tryGetWidget()) === null || _a === void 0 ? void 0 : _a['sessionWidget'];
|
|
1000
|
+
if (widget) {
|
|
1001
|
+
this.shell.revealWidget(widget.id);
|
|
1002
|
+
}
|
|
1003
|
+
return widget;
|
|
1004
|
+
}
|
|
1005
|
+
async start(noDebug, debugSessionOptions) {
|
|
1006
|
+
let current = debugSessionOptions ? debugSessionOptions : this.configurations.current;
|
|
1007
|
+
// If no configurations are currently present, create the `launch.json` and prompt users to select the config.
|
|
1008
|
+
if (!current) {
|
|
1009
|
+
await this.configurations.addConfiguration();
|
|
1010
|
+
return;
|
|
1011
|
+
}
|
|
1012
|
+
if (noDebug !== undefined) {
|
|
1013
|
+
if (current.configuration) {
|
|
1014
|
+
current = {
|
|
1015
|
+
...current,
|
|
1016
|
+
configuration: {
|
|
1017
|
+
...current.configuration,
|
|
1018
|
+
noDebug
|
|
1019
|
+
}
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
else {
|
|
1023
|
+
current = {
|
|
1024
|
+
...current,
|
|
1025
|
+
noDebug
|
|
1026
|
+
};
|
|
1027
|
+
}
|
|
1028
|
+
}
|
|
1029
|
+
await this.manager.start(current);
|
|
1030
|
+
}
|
|
1031
|
+
get threads() {
|
|
1032
|
+
const { currentWidget } = this.shell;
|
|
1033
|
+
return currentWidget instanceof debug_threads_widget_1.DebugThreadsWidget && currentWidget || undefined;
|
|
1034
|
+
}
|
|
1035
|
+
get selectedSession() {
|
|
1036
|
+
const { threads } = this;
|
|
1037
|
+
return threads && threads.selectedElement instanceof debug_session_1.DebugSession && threads.selectedElement || undefined;
|
|
1038
|
+
}
|
|
1039
|
+
get selectedThread() {
|
|
1040
|
+
const { threads } = this;
|
|
1041
|
+
return threads && threads.selectedElement instanceof debug_thread_1.DebugThread && threads.selectedElement || undefined;
|
|
1042
|
+
}
|
|
1043
|
+
get frames() {
|
|
1044
|
+
const { currentWidget } = this.shell;
|
|
1045
|
+
return currentWidget instanceof debug_stack_frames_widget_1.DebugStackFramesWidget && currentWidget || undefined;
|
|
1046
|
+
}
|
|
1047
|
+
get selectedFrame() {
|
|
1048
|
+
const { frames } = this;
|
|
1049
|
+
return frames && frames.selectedElement instanceof debug_stack_frame_1.DebugStackFrame && frames.selectedElement || undefined;
|
|
1050
|
+
}
|
|
1051
|
+
get breakpoints() {
|
|
1052
|
+
const { currentWidget } = this.shell;
|
|
1053
|
+
return currentWidget instanceof debug_breakpoints_widget_1.DebugBreakpointsWidget && currentWidget || undefined;
|
|
1054
|
+
}
|
|
1055
|
+
get selectedAnyBreakpoint() {
|
|
1056
|
+
const { breakpoints } = this;
|
|
1057
|
+
const selectedElement = breakpoints && breakpoints.selectedElement;
|
|
1058
|
+
return selectedElement instanceof debug_breakpoint_1.DebugBreakpoint ? selectedElement : undefined;
|
|
1059
|
+
}
|
|
1060
|
+
get selectedBreakpoint() {
|
|
1061
|
+
const breakpoint = this.selectedAnyBreakpoint;
|
|
1062
|
+
return breakpoint && breakpoint instanceof debug_source_breakpoint_1.DebugSourceBreakpoint && !breakpoint.logMessage ? breakpoint : undefined;
|
|
1063
|
+
}
|
|
1064
|
+
get selectedLogpoint() {
|
|
1065
|
+
const breakpoint = this.selectedAnyBreakpoint;
|
|
1066
|
+
return breakpoint && breakpoint instanceof debug_source_breakpoint_1.DebugSourceBreakpoint && !!breakpoint.logMessage ? breakpoint : undefined;
|
|
1067
|
+
}
|
|
1068
|
+
get selectedFunctionBreakpoint() {
|
|
1069
|
+
const breakpoint = this.selectedAnyBreakpoint;
|
|
1070
|
+
return breakpoint && breakpoint instanceof debug_function_breakpoint_1.DebugFunctionBreakpoint ? breakpoint : undefined;
|
|
1071
|
+
}
|
|
1072
|
+
get selectedInstructionBreakpoint() {
|
|
1073
|
+
if (this.selectedAnyBreakpoint instanceof debug_instruction_breakpoint_1.DebugInstructionBreakpoint) {
|
|
1074
|
+
return this.selectedAnyBreakpoint;
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
get selectedExceptionBreakpoint() {
|
|
1078
|
+
const { breakpoints } = this;
|
|
1079
|
+
const selectedElement = breakpoints && breakpoints.selectedElement;
|
|
1080
|
+
return selectedElement instanceof debug_exception_breakpoint_1.DebugExceptionBreakpoint ? selectedElement : undefined;
|
|
1081
|
+
}
|
|
1082
|
+
get selectedSettableBreakpoint() {
|
|
1083
|
+
const selected = this.selectedAnyBreakpoint;
|
|
1084
|
+
if (selected instanceof debug_function_breakpoint_1.DebugFunctionBreakpoint || selected instanceof debug_instruction_breakpoint_1.DebugInstructionBreakpoint || selected instanceof debug_source_breakpoint_1.DebugSourceBreakpoint) {
|
|
1085
|
+
return selected;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
get variables() {
|
|
1089
|
+
const { currentWidget } = this.shell;
|
|
1090
|
+
return currentWidget instanceof debug_variables_widget_1.DebugVariablesWidget && currentWidget || undefined;
|
|
1091
|
+
}
|
|
1092
|
+
get selectedVariable() {
|
|
1093
|
+
const { variables } = this;
|
|
1094
|
+
return variables && variables.selectedElement instanceof debug_console_items_1.DebugVariable && variables.selectedElement || undefined;
|
|
1095
|
+
}
|
|
1096
|
+
get watch() {
|
|
1097
|
+
const { currentWidget } = this.shell;
|
|
1098
|
+
return currentWidget instanceof debug_watch_widget_1.DebugWatchWidget && currentWidget || undefined;
|
|
1099
|
+
}
|
|
1100
|
+
get watchExpression() {
|
|
1101
|
+
const { watch } = this;
|
|
1102
|
+
return watch && watch.selectedElement instanceof debug_watch_expression_1.DebugWatchExpression && watch.selectedElement || undefined;
|
|
1103
|
+
}
|
|
1104
|
+
isPosition(position) {
|
|
1105
|
+
return monaco.Position.isIPosition(position);
|
|
1106
|
+
}
|
|
1107
|
+
asPosition(position) {
|
|
1108
|
+
return monaco.Position.lift(position);
|
|
1109
|
+
}
|
|
1110
|
+
registerColors(colors) {
|
|
1111
|
+
colors.register(
|
|
1112
|
+
// Debug colors should be aligned with https://code.visualstudio.com/api/references/theme-color#debug-colors
|
|
1113
|
+
{
|
|
1114
|
+
id: 'editor.stackFrameHighlightBackground',
|
|
1115
|
+
defaults: {
|
|
1116
|
+
dark: '#ffff0033',
|
|
1117
|
+
light: '#ffff6673',
|
|
1118
|
+
hcDark: '#fff600',
|
|
1119
|
+
hcLight: '#ffff6673'
|
|
1120
|
+
}, description: 'Background color for the highlight of line at the top stack frame position.'
|
|
1121
|
+
}, {
|
|
1122
|
+
id: 'editor.focusedStackFrameHighlightBackground',
|
|
1123
|
+
defaults: {
|
|
1124
|
+
dark: '#7abd7a4d',
|
|
1125
|
+
light: '#cee7ce73',
|
|
1126
|
+
hcDark: '#cee7ce',
|
|
1127
|
+
hcLight: '#cee7ce73'
|
|
1128
|
+
}, description: 'Background color for the highlight of line at focused stack frame position.'
|
|
1129
|
+
},
|
|
1130
|
+
// Status bar colors should be aligned with debugging colors from https://code.visualstudio.com/api/references/theme-color#status-bar-colors
|
|
1131
|
+
{
|
|
1132
|
+
id: 'statusBar.debuggingBackground', defaults: {
|
|
1133
|
+
dark: '#CC6633',
|
|
1134
|
+
light: '#CC6633',
|
|
1135
|
+
hcDark: '#CC6633',
|
|
1136
|
+
hcLight: '#B5200D'
|
|
1137
|
+
}, description: 'Status bar background color when a program is being debugged. The status bar is shown in the bottom of the window'
|
|
1138
|
+
}, {
|
|
1139
|
+
id: 'statusBar.debuggingForeground', defaults: {
|
|
1140
|
+
dark: 'statusBar.foreground',
|
|
1141
|
+
light: 'statusBar.foreground',
|
|
1142
|
+
hcDark: 'statusBar.foreground',
|
|
1143
|
+
hcLight: 'statusBar.foreground'
|
|
1144
|
+
}, description: 'Status bar foreground color when a program is being debugged. The status bar is shown in the bottom of the window'
|
|
1145
|
+
}, {
|
|
1146
|
+
id: 'statusBar.debuggingBorder', defaults: {
|
|
1147
|
+
dark: 'statusBar.border',
|
|
1148
|
+
light: 'statusBar.border',
|
|
1149
|
+
hcDark: 'statusBar.border',
|
|
1150
|
+
hcLight: 'statusBar.border'
|
|
1151
|
+
}, description: 'Status bar border color separating to the sidebar and editor when a program is being debugged. The status bar is shown in the bottom of the window'
|
|
1152
|
+
},
|
|
1153
|
+
// Debug Exception Widget colors should be aligned with
|
|
1154
|
+
// https://github.com/microsoft/vscode/blob/ff5f581425da6230b6f9216ecf19abf6c9d285a6/src/vs/workbench/contrib/debug/browser/exceptionWidget.ts#L23
|
|
1155
|
+
{
|
|
1156
|
+
id: 'debugExceptionWidget.border', defaults: {
|
|
1157
|
+
dark: '#a31515',
|
|
1158
|
+
light: '#a31515',
|
|
1159
|
+
hcDark: '#a31515',
|
|
1160
|
+
hcLight: '#a31515'
|
|
1161
|
+
}, description: 'Exception widget border color.',
|
|
1162
|
+
}, {
|
|
1163
|
+
id: 'debugExceptionWidget.background', defaults: {
|
|
1164
|
+
dark: '#420b0d',
|
|
1165
|
+
light: '#f1dfde',
|
|
1166
|
+
hcDark: '#420b0d',
|
|
1167
|
+
hcLight: '#f1dfde'
|
|
1168
|
+
}, description: 'Exception widget background color.'
|
|
1169
|
+
},
|
|
1170
|
+
// Debug Icon colors should be aligned with
|
|
1171
|
+
// https://code.visualstudio.com/api/references/theme-color#debug-icons-colors
|
|
1172
|
+
{
|
|
1173
|
+
id: 'debugIcon.breakpointForeground', defaults: {
|
|
1174
|
+
dark: '#E51400',
|
|
1175
|
+
light: '#E51400',
|
|
1176
|
+
hcDark: '#E51400',
|
|
1177
|
+
hcLight: '#E51400'
|
|
1178
|
+
},
|
|
1179
|
+
description: 'Icon color for breakpoints.'
|
|
1180
|
+
}, {
|
|
1181
|
+
id: 'debugIcon.breakpointDisabledForeground', defaults: {
|
|
1182
|
+
dark: '#848484',
|
|
1183
|
+
light: '#848484',
|
|
1184
|
+
hcDark: '#848484',
|
|
1185
|
+
hcLight: '#848484'
|
|
1186
|
+
},
|
|
1187
|
+
description: 'Icon color for disabled breakpoints.'
|
|
1188
|
+
}, {
|
|
1189
|
+
id: 'debugIcon.breakpointUnverifiedForeground', defaults: {
|
|
1190
|
+
dark: '#848484',
|
|
1191
|
+
light: '#848484',
|
|
1192
|
+
hcDark: '#848484',
|
|
1193
|
+
hcLight: '#848484'
|
|
1194
|
+
},
|
|
1195
|
+
description: 'Icon color for unverified breakpoints.'
|
|
1196
|
+
}, {
|
|
1197
|
+
id: 'debugIcon.breakpointCurrentStackframeForeground', defaults: {
|
|
1198
|
+
dark: '#FFCC00',
|
|
1199
|
+
light: '#BE8700',
|
|
1200
|
+
hcDark: '#FFCC00',
|
|
1201
|
+
hcLight: '#BE8700'
|
|
1202
|
+
},
|
|
1203
|
+
description: 'Icon color for the current breakpoint stack frame.'
|
|
1204
|
+
}, {
|
|
1205
|
+
id: 'debugIcon.breakpointStackframeForeground', defaults: {
|
|
1206
|
+
dark: '#89D185',
|
|
1207
|
+
light: '#89D185',
|
|
1208
|
+
hcDark: '#89D185',
|
|
1209
|
+
hcLight: '#89D185'
|
|
1210
|
+
},
|
|
1211
|
+
description: 'Icon color for all breakpoint stack frames.'
|
|
1212
|
+
}, {
|
|
1213
|
+
id: 'debugIcon.startForeground', defaults: {
|
|
1214
|
+
dark: '#89D185',
|
|
1215
|
+
light: '#388A34',
|
|
1216
|
+
hcDark: '#89D185',
|
|
1217
|
+
hcLight: '#388A34'
|
|
1218
|
+
}, description: 'Debug toolbar icon for start debugging.'
|
|
1219
|
+
}, {
|
|
1220
|
+
id: 'debugIcon.pauseForeground', defaults: {
|
|
1221
|
+
dark: '#75BEFF',
|
|
1222
|
+
light: '#007ACC',
|
|
1223
|
+
hcDark: '#75BEFF',
|
|
1224
|
+
hcLight: '#007ACC'
|
|
1225
|
+
}, description: 'Debug toolbar icon for pause.'
|
|
1226
|
+
}, {
|
|
1227
|
+
id: 'debugIcon.stopForeground', defaults: {
|
|
1228
|
+
dark: '#F48771',
|
|
1229
|
+
light: '#A1260D',
|
|
1230
|
+
hcDark: '#F48771',
|
|
1231
|
+
hcLight: '#A1260D'
|
|
1232
|
+
}, description: 'Debug toolbar icon for stop.'
|
|
1233
|
+
}, {
|
|
1234
|
+
id: 'debugIcon.disconnectForeground', defaults: {
|
|
1235
|
+
dark: '#F48771',
|
|
1236
|
+
light: '#A1260D',
|
|
1237
|
+
hcDark: '#F48771',
|
|
1238
|
+
hcLight: '#A1260D'
|
|
1239
|
+
}, description: 'Debug toolbar icon for disconnect.'
|
|
1240
|
+
}, {
|
|
1241
|
+
id: 'debugIcon.restartForeground', defaults: {
|
|
1242
|
+
dark: '#89D185',
|
|
1243
|
+
light: '#388A34',
|
|
1244
|
+
hcDark: '#89D185',
|
|
1245
|
+
hcLight: '#388A34'
|
|
1246
|
+
}, description: 'Debug toolbar icon for restart.'
|
|
1247
|
+
}, {
|
|
1248
|
+
id: 'debugIcon.stepOverForeground', defaults: {
|
|
1249
|
+
dark: '#75BEFF',
|
|
1250
|
+
light: '#007ACC',
|
|
1251
|
+
hcDark: '#75BEFF',
|
|
1252
|
+
hcLight: '#007ACC',
|
|
1253
|
+
}, description: 'Debug toolbar icon for step over.'
|
|
1254
|
+
}, {
|
|
1255
|
+
id: 'debugIcon.stepIntoForeground', defaults: {
|
|
1256
|
+
dark: '#75BEFF',
|
|
1257
|
+
light: '#007ACC',
|
|
1258
|
+
hcDark: '#75BEFF',
|
|
1259
|
+
hcLight: '#007ACC'
|
|
1260
|
+
}, description: 'Debug toolbar icon for step into.'
|
|
1261
|
+
}, {
|
|
1262
|
+
id: 'debugIcon.stepOutForeground', defaults: {
|
|
1263
|
+
dark: '#75BEFF',
|
|
1264
|
+
light: '#007ACC',
|
|
1265
|
+
hcDark: '#75BEFF',
|
|
1266
|
+
hcLight: '#007ACC',
|
|
1267
|
+
}, description: 'Debug toolbar icon for step over.'
|
|
1268
|
+
}, {
|
|
1269
|
+
id: 'debugIcon.continueForeground', defaults: {
|
|
1270
|
+
dark: '#75BEFF',
|
|
1271
|
+
light: '#007ACC',
|
|
1272
|
+
hcDark: '#75BEFF',
|
|
1273
|
+
hcLight: '#007ACC'
|
|
1274
|
+
}, description: 'Debug toolbar icon for continue.'
|
|
1275
|
+
}, {
|
|
1276
|
+
id: 'debugIcon.stepBackForeground', defaults: {
|
|
1277
|
+
dark: '#75BEFF',
|
|
1278
|
+
light: '#007ACC',
|
|
1279
|
+
hcDark: '#75BEFF',
|
|
1280
|
+
hcLight: '#007ACC'
|
|
1281
|
+
}, description: 'Debug toolbar icon for step back.'
|
|
1282
|
+
}, {
|
|
1283
|
+
id: 'debugConsole.infoForeground', defaults: {
|
|
1284
|
+
dark: 'editorInfo.foreground',
|
|
1285
|
+
light: 'editorInfo.foreground',
|
|
1286
|
+
hcDark: 'foreground',
|
|
1287
|
+
hcLight: 'foreground'
|
|
1288
|
+
}, description: 'Foreground color for info messages in debug REPL console.'
|
|
1289
|
+
}, {
|
|
1290
|
+
id: 'debugConsole.warningForeground', defaults: {
|
|
1291
|
+
dark: 'editorWarning.foreground',
|
|
1292
|
+
light: 'editorWarning.foreground',
|
|
1293
|
+
hcDark: '#008000',
|
|
1294
|
+
hcLight: 'editorWarning.foreground'
|
|
1295
|
+
},
|
|
1296
|
+
description: 'Foreground color for warning messages in debug REPL console.'
|
|
1297
|
+
}, {
|
|
1298
|
+
id: 'debugConsole.errorForeground', defaults: {
|
|
1299
|
+
dark: 'errorForeground',
|
|
1300
|
+
light: 'errorForeground',
|
|
1301
|
+
hcDark: 'errorForeground',
|
|
1302
|
+
hcLight: 'errorForeground'
|
|
1303
|
+
},
|
|
1304
|
+
description: 'Foreground color for error messages in debug REPL console.',
|
|
1305
|
+
}, {
|
|
1306
|
+
id: 'debugConsole.sourceForeground', defaults: {
|
|
1307
|
+
dark: 'foreground',
|
|
1308
|
+
light: 'foreground',
|
|
1309
|
+
hcDark: 'foreground',
|
|
1310
|
+
hcLight: 'foreground'
|
|
1311
|
+
},
|
|
1312
|
+
description: 'Foreground color for source filenames in debug REPL console.',
|
|
1313
|
+
}, {
|
|
1314
|
+
id: 'debugConsoleInputIcon.foreground', defaults: {
|
|
1315
|
+
dark: 'foreground',
|
|
1316
|
+
light: 'foreground',
|
|
1317
|
+
hcDark: 'foreground',
|
|
1318
|
+
hcLight: 'foreground'
|
|
1319
|
+
},
|
|
1320
|
+
description: 'Foreground color for debug console input marker icon.'
|
|
1321
|
+
});
|
|
1322
|
+
}
|
|
1323
|
+
updateStatusBar() {
|
|
1324
|
+
if (this.debuggingStatusBar === document.body.classList.contains('theia-mod-debugging')) {
|
|
1325
|
+
return;
|
|
1326
|
+
}
|
|
1327
|
+
document.body.classList.toggle('theia-mod-debugging');
|
|
1328
|
+
}
|
|
1329
|
+
get debuggingStatusBar() {
|
|
1330
|
+
if (this.manager.state < debug_session_1.DebugState.Running) {
|
|
1331
|
+
return false;
|
|
1332
|
+
}
|
|
1333
|
+
const session = this.manager.currentSession;
|
|
1334
|
+
if (session) {
|
|
1335
|
+
if (session.configuration.noDebug) {
|
|
1336
|
+
return false;
|
|
1337
|
+
}
|
|
1338
|
+
if (this.getOption(session, 'suppressDebugStatusbar')) {
|
|
1339
|
+
return false;
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
return true;
|
|
1343
|
+
}
|
|
1344
|
+
getOption(session, option) {
|
|
1345
|
+
// If session is undefined there will be no option
|
|
1346
|
+
if (!session) {
|
|
1347
|
+
return false;
|
|
1348
|
+
}
|
|
1349
|
+
// If undefined take the value of the parent
|
|
1350
|
+
if (option in session.configuration && session.configuration[option] !== undefined) {
|
|
1351
|
+
return session.configuration[option];
|
|
1352
|
+
}
|
|
1353
|
+
return this.getOption(session.parentSession, option);
|
|
1354
|
+
}
|
|
1355
|
+
};
|
|
1356
|
+
__decorate([
|
|
1357
|
+
(0, inversify_1.inject)(debug_service_1.DebugService),
|
|
1358
|
+
__metadata("design:type", Object)
|
|
1359
|
+
], DebugFrontendApplicationContribution.prototype, "debug", void 0);
|
|
1360
|
+
__decorate([
|
|
1361
|
+
(0, inversify_1.inject)(debug_session_manager_1.DebugSessionManager),
|
|
1362
|
+
__metadata("design:type", debug_session_manager_1.DebugSessionManager)
|
|
1363
|
+
], DebugFrontendApplicationContribution.prototype, "manager", void 0);
|
|
1364
|
+
__decorate([
|
|
1365
|
+
(0, inversify_1.inject)(debug_configuration_manager_1.DebugConfigurationManager),
|
|
1366
|
+
__metadata("design:type", debug_configuration_manager_1.DebugConfigurationManager)
|
|
1367
|
+
], DebugFrontendApplicationContribution.prototype, "configurations", void 0);
|
|
1368
|
+
__decorate([
|
|
1369
|
+
(0, inversify_1.inject)(breakpoint_manager_1.BreakpointManager),
|
|
1370
|
+
__metadata("design:type", breakpoint_manager_1.BreakpointManager)
|
|
1371
|
+
], DebugFrontendApplicationContribution.prototype, "breakpointManager", void 0);
|
|
1372
|
+
__decorate([
|
|
1373
|
+
(0, inversify_1.inject)(debug_editor_service_1.DebugEditorService),
|
|
1374
|
+
__metadata("design:type", debug_editor_service_1.DebugEditorService)
|
|
1375
|
+
], DebugFrontendApplicationContribution.prototype, "editors", void 0);
|
|
1376
|
+
__decorate([
|
|
1377
|
+
(0, inversify_1.inject)(debug_console_contribution_1.DebugConsoleContribution),
|
|
1378
|
+
__metadata("design:type", debug_console_contribution_1.DebugConsoleContribution)
|
|
1379
|
+
], DebugFrontendApplicationContribution.prototype, "console", void 0);
|
|
1380
|
+
__decorate([
|
|
1381
|
+
(0, inversify_1.inject)(debug_schema_updater_1.DebugSchemaUpdater),
|
|
1382
|
+
__metadata("design:type", debug_schema_updater_1.DebugSchemaUpdater)
|
|
1383
|
+
], DebugFrontendApplicationContribution.prototype, "schemaUpdater", void 0);
|
|
1384
|
+
__decorate([
|
|
1385
|
+
(0, inversify_1.inject)(debug_preferences_1.DebugPreferences),
|
|
1386
|
+
__metadata("design:type", Object)
|
|
1387
|
+
], DebugFrontendApplicationContribution.prototype, "preference", void 0);
|
|
1388
|
+
__decorate([
|
|
1389
|
+
(0, inversify_1.inject)(debug_watch_manager_1.DebugWatchManager),
|
|
1390
|
+
__metadata("design:type", debug_watch_manager_1.DebugWatchManager)
|
|
1391
|
+
], DebugFrontendApplicationContribution.prototype, "watchManager", void 0);
|
|
1392
|
+
__decorate([
|
|
1393
|
+
(0, inversify_1.inject)(browser_1.LabelProvider),
|
|
1394
|
+
__metadata("design:type", browser_1.LabelProvider)
|
|
1395
|
+
], DebugFrontendApplicationContribution.prototype, "labelProvider", void 0);
|
|
1396
|
+
__decorate([
|
|
1397
|
+
(0, inversify_1.inject)(browser_2.EditorManager),
|
|
1398
|
+
__metadata("design:type", browser_2.EditorManager)
|
|
1399
|
+
], DebugFrontendApplicationContribution.prototype, "editorManager", void 0);
|
|
1400
|
+
DebugFrontendApplicationContribution = __decorate([
|
|
1401
|
+
(0, inversify_1.injectable)(),
|
|
1402
|
+
__metadata("design:paramtypes", [])
|
|
1403
|
+
], DebugFrontendApplicationContribution);
|
|
1404
|
+
exports.DebugFrontendApplicationContribution = DebugFrontendApplicationContribution;
|
|
1405
1405
|
//# sourceMappingURL=debug-frontend-application-contribution.js.map
|