@opensumi/ide-debug 2.21.13 → 2.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/breakpoint/breakpoint-manager.js.map +1 -1
- package/lib/browser/breakpoint/breakpoint-marker.d.ts +1 -1
- package/lib/browser/breakpoint/breakpoint-marker.d.ts.map +1 -1
- package/lib/browser/breakpoint/breakpoint-marker.js +3 -2
- package/lib/browser/breakpoint/breakpoint-marker.js.map +1 -1
- package/lib/browser/contextkeys/debug-call-stack-item-type-key.d.ts +1 -1
- package/lib/browser/contextkeys/debug-call-stack-item-type-key.d.ts.map +1 -1
- package/lib/browser/contextkeys/debug-contextkey.service.js.map +1 -1
- package/lib/browser/debug-configuration-manager.d.ts +2 -2
- package/lib/browser/debug-configuration-manager.d.ts.map +1 -1
- package/lib/browser/debug-configuration-manager.js +2 -2
- package/lib/browser/debug-configuration-manager.js.map +1 -1
- package/lib/browser/debug-contribution.d.ts +2 -147
- package/lib/browser/debug-contribution.d.ts.map +1 -1
- package/lib/browser/debug-contribution.js +50 -200
- package/lib/browser/debug-contribution.js.map +1 -1
- package/lib/browser/debug-exception-widget.js.map +1 -1
- package/lib/browser/debug-link-detector.js.map +1 -1
- package/lib/browser/debug-memory.js +4 -4
- package/lib/browser/debug-memory.js.map +1 -1
- package/lib/browser/debug-preferences.d.ts +1 -1
- package/lib/browser/debug-preferences.d.ts.map +1 -1
- package/lib/browser/debug-progress.service.js.map +1 -1
- package/lib/browser/debug-schema-updater.js.map +1 -1
- package/lib/browser/debug-service.js.map +1 -1
- package/lib/browser/debug-session-connection.d.ts +2 -3
- package/lib/browser/debug-session-connection.d.ts.map +1 -1
- package/lib/browser/debug-session-connection.js.map +1 -1
- package/lib/browser/debug-session-contribution.js.map +1 -1
- package/lib/browser/debug-session-manager.d.ts +3 -4
- package/lib/browser/debug-session-manager.d.ts.map +1 -1
- package/lib/browser/debug-session-manager.js +7 -8
- package/lib/browser/debug-session-manager.js.map +1 -1
- package/lib/browser/debug-session.d.ts +3 -4
- package/lib/browser/debug-session.d.ts.map +1 -1
- package/lib/browser/debug-session.js +15 -11
- package/lib/browser/debug-session.js.map +1 -1
- package/lib/browser/debugUtils.js +4 -4
- package/lib/browser/debugUtils.js.map +1 -1
- package/lib/browser/editor/debug-breakpoint-widget.js.map +1 -1
- package/lib/browser/editor/debug-breakpoint-zone-widget.js +7 -7
- package/lib/browser/editor/debug-breakpoint-zone-widget.js.map +1 -1
- package/lib/browser/editor/debug-breakpoint.module.less +3 -4
- package/lib/browser/editor/debug-editor-contribution.d.ts +2 -2
- package/lib/browser/editor/debug-editor-contribution.d.ts.map +1 -1
- package/lib/browser/editor/debug-editor-contribution.js +3 -4
- package/lib/browser/editor/debug-editor-contribution.js.map +1 -1
- package/lib/browser/editor/debug-expression-provider.js.map +1 -1
- package/lib/browser/editor/debug-hover-model.js.map +1 -1
- package/lib/browser/editor/debug-hover-source.d.ts +1 -1
- package/lib/browser/editor/debug-hover-source.d.ts.map +1 -1
- package/lib/browser/editor/debug-hover-source.js.map +1 -1
- package/lib/browser/editor/debug-hover-tree.model.service.js.map +1 -1
- package/lib/browser/editor/debug-hover-widget.js.map +1 -1
- package/lib/browser/editor/debug-model-manager.d.ts +2 -9
- package/lib/browser/editor/debug-model-manager.d.ts.map +1 -1
- package/lib/browser/editor/debug-model-manager.js +8 -15
- package/lib/browser/editor/debug-model-manager.js.map +1 -1
- package/lib/browser/editor/debug-model.d.ts +2 -2
- package/lib/browser/editor/debug-model.d.ts.map +1 -1
- package/lib/browser/editor/debug-model.js +27 -27
- package/lib/browser/editor/debug-model.js.map +1 -1
- package/lib/browser/editor/debug-run-to-cursor.service.js +7 -7
- package/lib/browser/editor/debug-run-to-cursor.service.js.map +1 -1
- package/lib/browser/editor/evaluatable-expression.js.map +1 -1
- package/lib/browser/index.d.ts +0 -14
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +8 -24
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/markers/marker-manager.js.map +1 -1
- package/lib/browser/model/debug-source.d.ts +3 -3
- package/lib/browser/model/debug-source.d.ts.map +1 -1
- package/lib/browser/model/debug-source.js.map +1 -1
- package/lib/browser/model/debug-thread.d.ts +1 -1
- package/lib/browser/model/debug-thread.d.ts.map +1 -1
- package/lib/browser/model/debug-watch.d.ts.map +1 -1
- package/lib/browser/model/debug-watch.js +1 -2
- package/lib/browser/model/debug-watch.js.map +1 -1
- package/lib/browser/preferences/launch-folder-preference-provider.d.ts +2 -2
- package/lib/browser/preferences/launch-folder-preference-provider.d.ts.map +1 -1
- package/lib/browser/preferences/launch-folder-preference-provider.js +2 -2
- package/lib/browser/preferences/launch-folder-preference-provider.js.map +1 -1
- package/lib/browser/preferences/launch-preferences-contribution.js.map +1 -1
- package/lib/browser/tree/debug-console-tree-node.define.js +6 -6
- package/lib/browser/tree/debug-console-tree-node.define.js.map +1 -1
- package/lib/browser/tree/debug-tree-node.define.js +18 -18
- package/lib/browser/tree/debug-tree-node.define.js.map +1 -1
- package/lib/browser/view/breakpoints/debug-breakpoints.service.js +3 -3
- package/lib/browser/view/breakpoints/debug-breakpoints.service.js.map +1 -1
- package/lib/browser/view/configuration/debug-configuration.module.less +5 -5
- package/lib/browser/view/configuration/debug-configuration.service.d.ts +1 -2
- package/lib/browser/view/configuration/debug-configuration.service.d.ts.map +1 -1
- package/lib/browser/view/configuration/debug-configuration.service.js.map +1 -1
- package/lib/browser/view/configuration/debug-configuration.view.d.ts.map +1 -1
- package/lib/browser/view/configuration/debug-configuration.view.js +1 -1
- package/lib/browser/view/configuration/debug-configuration.view.js.map +1 -1
- package/lib/browser/view/configuration/debug-toolbar.service.js.map +1 -1
- package/lib/browser/view/configuration/debug-toolbar.view.js +2 -2
- package/lib/browser/view/configuration/debug-toolbar.view.js.map +1 -1
- package/lib/browser/view/console/debug-console-filter.model.js.map +1 -1
- package/lib/browser/view/console/debug-console-filter.service.js.map +1 -1
- package/lib/browser/view/console/debug-console-model.js.map +1 -1
- package/lib/browser/view/console/debug-console-session.d.ts +3 -2
- package/lib/browser/view/console/debug-console-session.d.ts.map +1 -1
- package/lib/browser/view/console/debug-console-session.js.map +1 -1
- package/lib/browser/view/console/debug-console-tree.model.service.d.ts +1 -1
- package/lib/browser/view/console/debug-console-tree.model.service.d.ts.map +1 -1
- package/lib/browser/view/console/debug-console-tree.model.service.js +5 -3
- package/lib/browser/view/console/debug-console-tree.model.service.js.map +1 -1
- package/lib/browser/view/console/debug-console.contribution.d.ts.map +1 -1
- package/lib/browser/view/console/debug-console.contribution.js +21 -23
- package/lib/browser/view/console/debug-console.contribution.js.map +1 -1
- package/lib/browser/view/console/debug-console.module.less +2 -3
- package/lib/browser/view/console/debug-console.service.js +7 -7
- package/lib/browser/view/console/debug-console.service.js.map +1 -1
- package/lib/browser/view/console/debug-console.view.d.ts +1 -1
- package/lib/browser/view/console/debug-console.view.d.ts.map +1 -1
- package/lib/browser/view/console/debug-console.view.js +15 -3
- package/lib/browser/view/console/debug-console.view.js.map +1 -1
- package/lib/browser/view/debug-view-model.js.map +1 -1
- package/lib/browser/view/frames/debug-call-stack-frame.view.d.ts.map +1 -1
- package/lib/browser/view/frames/debug-call-stack-frame.view.js +25 -24
- package/lib/browser/view/frames/debug-call-stack-frame.view.js.map +1 -1
- package/lib/browser/view/frames/debug-call-stack-session.view.d.ts.map +1 -1
- package/lib/browser/view/frames/debug-call-stack-session.view.js +8 -5
- package/lib/browser/view/frames/debug-call-stack-session.view.js.map +1 -1
- package/lib/browser/view/frames/debug-call-stack-thread.view.d.ts.map +1 -1
- package/lib/browser/view/frames/debug-call-stack-thread.view.js +12 -7
- package/lib/browser/view/frames/debug-call-stack-thread.view.js.map +1 -1
- package/lib/browser/view/frames/debug-call-stack.contribution.js +5 -5
- package/lib/browser/view/frames/debug-call-stack.contribution.js.map +1 -1
- package/lib/browser/view/frames/debug-call-stack.service.js.map +1 -1
- package/lib/browser/view/variables/debug-variables-model.js.map +1 -1
- package/lib/browser/view/variables/debug-variables-tree.model.service.d.ts +1 -1
- package/lib/browser/view/variables/debug-variables-tree.model.service.d.ts.map +1 -1
- package/lib/browser/view/variables/debug-variables-tree.model.service.js +5 -3
- package/lib/browser/view/variables/debug-variables-tree.model.service.js.map +1 -1
- package/lib/browser/view/variables/debug-variables.contribution.d.ts.map +1 -1
- package/lib/browser/view/variables/debug-variables.contribution.js +13 -14
- package/lib/browser/view/variables/debug-variables.contribution.js.map +1 -1
- package/lib/browser/view/variables/debug-variables.module.less +2 -11
- package/lib/browser/view/variables/debug-variables.view.d.ts +1 -1
- package/lib/browser/view/variables/debug-variables.view.d.ts.map +1 -1
- package/lib/browser/view/variables/debug-variables.view.js +1 -1
- package/lib/browser/view/variables/debug-variables.view.js.map +1 -1
- package/lib/browser/view/watch/debug-watch-model.js.map +1 -1
- package/lib/browser/view/watch/debug-watch-tree.model.service.d.ts +2 -2
- package/lib/browser/view/watch/debug-watch-tree.model.service.d.ts.map +1 -1
- package/lib/browser/view/watch/debug-watch-tree.model.service.js +5 -3
- package/lib/browser/view/watch/debug-watch-tree.model.service.js.map +1 -1
- package/lib/browser/view/watch/debug-watch.contribution.d.ts.map +1 -1
- package/lib/browser/view/watch/debug-watch.contribution.js +21 -19
- package/lib/browser/view/watch/debug-watch.contribution.js.map +1 -1
- package/lib/browser/view/watch/debug-watch.module.less +2 -12
- package/lib/browser/view/watch/debug-watch.view.d.ts +1 -1
- package/lib/browser/view/watch/debug-watch.view.d.ts.map +1 -1
- package/lib/browser/view/watch/debug-watch.view.js +1 -1
- package/lib/browser/view/watch/debug-watch.view.js.map +1 -1
- package/lib/common/commands.d.ts +46 -0
- package/lib/common/commands.d.ts.map +1 -0
- package/lib/common/commands.js +149 -0
- package/lib/common/commands.js.map +1 -0
- package/lib/common/debug-breakpoint.d.ts +3 -3
- package/lib/common/debug-breakpoint.d.ts.map +1 -1
- package/lib/common/debug-configuration.d.ts +1 -1
- package/lib/common/debug-configuration.d.ts.map +1 -1
- package/lib/common/debug-console.d.ts +18 -0
- package/lib/common/debug-console.d.ts.map +1 -0
- package/lib/common/debug-console.js +5 -0
- package/lib/common/debug-console.js.map +1 -0
- package/lib/common/debug-editor.d.ts +1 -1
- package/lib/common/debug-editor.d.ts.map +1 -1
- package/lib/common/debug-model.d.ts +19 -4
- package/lib/common/debug-model.d.ts.map +1 -1
- package/lib/common/debug-model.js +14 -6
- package/lib/common/debug-model.js.map +1 -1
- package/lib/common/debug-schema-updater.d.ts +2 -1
- package/lib/common/debug-schema-updater.d.ts.map +1 -1
- package/lib/common/debug-schema-updater.js +1 -1
- package/lib/common/debug-schema-updater.js.map +1 -1
- package/lib/common/debug-service.d.ts +1 -1
- package/lib/common/debug-service.d.ts.map +1 -1
- package/lib/common/debug-session.d.ts +1 -1
- package/lib/common/debug-session.d.ts.map +1 -1
- package/lib/common/index.d.ts +2 -0
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +2 -0
- package/lib/common/index.js.map +1 -1
- package/lib/common/inline-values.d.ts +1 -1
- package/lib/common/inline-values.d.ts.map +1 -1
- package/lib/common/terminal.js +10 -10
- package/lib/common/terminal.js.map +1 -1
- package/package.json +27 -26
- package/src/browser/assets/breakpoint-conditional-disabled.svg +4 -0
- package/src/browser/assets/breakpoint-conditional-unverified.svg +4 -0
- package/src/browser/assets/breakpoint-conditional.svg +4 -0
- package/src/browser/assets/breakpoint-disabled.svg +4 -0
- package/src/browser/assets/breakpoint-hint.svg +4 -0
- package/src/browser/assets/breakpoint-log-disabled.svg +4 -0
- package/src/browser/assets/breakpoint-log-unverified.svg +4 -0
- package/src/browser/assets/breakpoint-log.svg +4 -0
- package/src/browser/assets/breakpoint-unsupported.svg +4 -0
- package/src/browser/assets/breakpoint-unverified.svg +4 -0
- package/src/browser/assets/breakpoint.svg +4 -0
- package/src/browser/assets/breakpoints-activate-inverse.svg +4 -0
- package/src/browser/assets/breakpoints-activate.svg +4 -0
- package/src/browser/assets/configure-inverse.svg +4 -0
- package/src/browser/assets/configure.svg +4 -0
- package/src/browser/assets/continue-inverse.svg +4 -0
- package/src/browser/assets/current-and-breakpoint.svg +4 -0
- package/src/browser/assets/current-arrow.svg +4 -0
- package/src/browser/assets/remove-all-inverse.svg +4 -0
- package/src/browser/assets/remove-all.svg +4 -0
- package/src/browser/assets/repl-inverse.svg +4 -0
- package/src/browser/assets/repl.svg +4 -0
- package/src/browser/assets/restart-inverse.svg +4 -0
- package/src/browser/assets/stackframe-and-breakpoint.svg +4 -0
- package/src/browser/assets/stackframe-arrow.svg +4 -0
- package/src/browser/assets/start-inverse.svg +4 -0
- package/src/browser/breakpoint/breakpoint-decoration.ts +57 -0
- package/src/browser/breakpoint/breakpoint-manager.ts +348 -0
- package/src/browser/breakpoint/breakpoint-marker.ts +70 -0
- package/src/browser/breakpoint/index.ts +3 -0
- package/src/browser/components/debug-action/index.module.less +73 -0
- package/src/browser/components/debug-action/index.tsx +40 -0
- package/src/browser/components/debug-exception-widget.less +42 -0
- package/src/browser/components/floating-click-widget/index.module.less +5 -0
- package/src/browser/components/floating-click-widget/index.tsx +21 -0
- package/src/browser/components/index.ts +1 -0
- package/src/browser/contextkeys/debug-call-stack-item-type-key.ts +4 -0
- package/src/browser/contextkeys/debug-contextkey.service.ts +54 -0
- package/src/browser/contextkeys/index.ts +1 -0
- package/src/browser/debug-ansi-handle.ts +521 -0
- package/src/browser/debug-configuration-manager.ts +514 -0
- package/src/browser/debug-configuration-model.ts +66 -0
- package/src/browser/debug-contribution.ts +756 -0
- package/src/browser/debug-exception-widget.tsx +89 -0
- package/src/browser/debug-link-detector.ts +234 -0
- package/src/browser/debug-memory.ts +220 -0
- package/src/browser/debug-preferences.ts +70 -0
- package/src/browser/debug-progress.service.ts +122 -0
- package/src/browser/debug-schema-updater.ts +67 -0
- package/src/browser/debug-service.ts +42 -0
- package/src/browser/debug-session-connection.ts +331 -0
- package/src/browser/debug-session-contribution.ts +57 -0
- package/src/browser/debug-session-manager.ts +622 -0
- package/src/browser/debug-session.ts +1181 -0
- package/src/browser/debug-style.less +128 -0
- package/src/browser/debugUtils.ts +110 -0
- package/src/browser/editor/debug-breakpoint-widget.ts +99 -0
- package/src/browser/editor/debug-breakpoint-zone-widget.tsx +262 -0
- package/src/browser/editor/debug-breakpoint.module.less +30 -0
- package/src/browser/editor/debug-editor-contribution.ts +589 -0
- package/src/browser/editor/debug-expression-provider.ts +101 -0
- package/src/browser/editor/debug-hover-model.ts +38 -0
- package/src/browser/editor/debug-hover-source.ts +107 -0
- package/src/browser/editor/debug-hover-tree.model.service.ts +332 -0
- package/src/browser/editor/debug-hover-widget.tsx +200 -0
- package/src/browser/editor/debug-hover.module.less +29 -0
- package/src/browser/editor/debug-hover.view.tsx +147 -0
- package/src/browser/editor/debug-model-manager.ts +219 -0
- package/src/browser/editor/debug-model.ts +853 -0
- package/src/browser/editor/debug-run-to-cursor.service.ts +180 -0
- package/src/browser/editor/debug-styles.ts +66 -0
- package/src/browser/editor/evaluatable-expression.ts +47 -0
- package/src/browser/editor/index.ts +6 -0
- package/src/browser/index.ts +119 -0
- package/src/browser/markers/index.ts +2 -0
- package/src/browser/markers/marker-manager.ts +201 -0
- package/src/browser/markers/marker.ts +20 -0
- package/src/browser/model/debug-source.ts +144 -0
- package/src/browser/model/debug-stack-frame.ts +111 -0
- package/src/browser/model/debug-thread.ts +186 -0
- package/src/browser/model/debug-watch.ts +129 -0
- package/src/browser/model/index.ts +4 -0
- package/src/browser/preferences/launch-folder-preference-provider.ts +23 -0
- package/src/browser/preferences/launch-preferences-contribution.ts +9 -0
- package/src/browser/preferences/launch-preferences.ts +16 -0
- package/src/browser/tree/debug-console-tree-node.define.tsx +76 -0
- package/src/browser/tree/debug-tree-node.define.ts +768 -0
- package/src/browser/tree/index.ts +2 -0
- package/src/browser/view/breakpoints/debug-breakpoints.module.less +72 -0
- package/src/browser/view/breakpoints/debug-breakpoints.service.ts +217 -0
- package/src/browser/view/breakpoints/debug-breakpoints.view.tsx +174 -0
- package/src/browser/view/configuration/debug-configuration.module.less +110 -0
- package/src/browser/view/configuration/debug-configuration.service.ts +170 -0
- package/src/browser/view/configuration/debug-configuration.view.tsx +252 -0
- package/src/browser/view/configuration/debug-toolbar.service.ts +167 -0
- package/src/browser/view/configuration/debug-toolbar.view.tsx +335 -0
- package/src/browser/view/console/debug-console-filter.model.ts +49 -0
- package/src/browser/view/console/debug-console-filter.service.ts +81 -0
- package/src/browser/view/console/debug-console-filter.view.tsx +78 -0
- package/src/browser/view/console/debug-console-model.ts +48 -0
- package/src/browser/view/console/debug-console-session.ts +165 -0
- package/src/browser/view/console/debug-console-toolbar.view.tsx +28 -0
- package/src/browser/view/console/debug-console-tree.model.service.ts +553 -0
- package/src/browser/view/console/debug-console.contribution.ts +179 -0
- package/src/browser/view/console/debug-console.module.less +371 -0
- package/src/browser/view/console/debug-console.service.ts +433 -0
- package/src/browser/view/console/debug-console.view.tsx +511 -0
- package/src/browser/view/debug-view-model.ts +182 -0
- package/src/browser/view/frames/debug-call-stack-frame.view.tsx +230 -0
- package/src/browser/view/frames/debug-call-stack-session.view.tsx +253 -0
- package/src/browser/view/frames/debug-call-stack-thread.view.tsx +103 -0
- package/src/browser/view/frames/debug-call-stack.contribution.ts +88 -0
- package/src/browser/view/frames/debug-call-stack.module.less +193 -0
- package/src/browser/view/frames/debug-call-stack.operation.tsx +97 -0
- package/src/browser/view/frames/debug-call-stack.service.ts +105 -0
- package/src/browser/view/frames/debug-call-stack.view.tsx +43 -0
- package/src/browser/view/variables/debug-variables-model.ts +38 -0
- package/src/browser/view/variables/debug-variables-tree.model.service.ts +470 -0
- package/src/browser/view/variables/debug-variables.contribution.ts +244 -0
- package/src/browser/view/variables/debug-variables.module.less +139 -0
- package/src/browser/view/variables/debug-variables.view.tsx +303 -0
- package/src/browser/view/watch/debug-watch-model.ts +38 -0
- package/src/browser/view/watch/debug-watch-tree.model.service.ts +570 -0
- package/src/browser/view/watch/debug-watch.contribution.ts +170 -0
- package/src/browser/view/watch/debug-watch.module.less +178 -0
- package/src/browser/view/watch/debug-watch.view.tsx +337 -0
- package/src/common/commands.ts +146 -0
- package/src/common/constants.ts +81 -0
- package/src/common/debug-breakpoint.ts +43 -0
- package/src/common/debug-configuration.ts +68 -0
- package/src/common/debug-console.ts +20 -0
- package/src/common/debug-editor.ts +4 -0
- package/src/common/debug-hover.ts +31 -0
- package/src/common/debug-model.ts +272 -0
- package/src/common/debug-progress.ts +8 -0
- package/src/common/debug-schema-updater.ts +3 -0
- package/src/common/debug-service.ts +176 -0
- package/src/common/debug-session-options.ts +19 -0
- package/src/common/debug-session.ts +200 -0
- package/src/common/evaluatable-expression.ts +43 -0
- package/src/common/index.ts +16 -0
- package/src/common/inline-values.ts +77 -0
- package/src/common/terminal.ts +163 -0
- package/src/common/types.ts +86 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
.sumi-breakpoint-icon-size {
|
|
2
|
+
background-size: 16px 16px;
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
}
|
|
5
|
+
// 全局调试样式
|
|
6
|
+
.sumi-debug-breakpoint {
|
|
7
|
+
background: url('./assets/breakpoint.svg') center center no-repeat;
|
|
8
|
+
.sumi-breakpoint-icon-size;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.sumi-debug-breakpoint-disabled {
|
|
12
|
+
background: url('./assets/breakpoint-disabled.svg') center center no-repeat;
|
|
13
|
+
.sumi-breakpoint-icon-size;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.sumi-debug-breakpoint-unverified {
|
|
17
|
+
background: url('./assets/breakpoint-unverified.svg') center center no-repeat;
|
|
18
|
+
.sumi-breakpoint-icon-size;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.sumi-debug-breakpoint-unsupported {
|
|
22
|
+
background: url('./assets/breakpoint-unsupported.svg') center center no-repeat;
|
|
23
|
+
.sumi-breakpoint-icon-size;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.sumi-debug-conditional-breakpoint {
|
|
27
|
+
background: url('./assets/breakpoint-conditional.svg') center center no-repeat;
|
|
28
|
+
.sumi-breakpoint-icon-size;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.sumi-debug-conditional-breakpoint-disabled {
|
|
32
|
+
background: url('./assets/breakpoint-conditional-disabled.svg') center center no-repeat;
|
|
33
|
+
.sumi-breakpoint-icon-size;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.sumi-debug-conditional-breakpoint-unverified {
|
|
37
|
+
background: url('./assets/breakpoint-conditional-unverified.svg') center center no-repeat;
|
|
38
|
+
.sumi-breakpoint-icon-size;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.sumi-debug-logpoint {
|
|
42
|
+
background: url('./assets/breakpoint-log.svg') center center no-repeat;
|
|
43
|
+
.sumi-breakpoint-icon-size;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.sumi-debug-logpoint-disabled {
|
|
47
|
+
background: url('./assets/breakpoint-log-disabled.svg') center center no-repeat;
|
|
48
|
+
.sumi-breakpoint-icon-size;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.sumi-debug-logpoint-unverified {
|
|
52
|
+
background: url('./assets/breakpoint-log-unverified.svg') center center no-repeat;
|
|
53
|
+
.sumi-breakpoint-icon-size;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.monaco-editor .sumi-debug-breakpoint-hint {
|
|
57
|
+
background: url('./assets/breakpoint-hint.svg') center center no-repeat;
|
|
58
|
+
.sumi-breakpoint-icon-size;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.monaco-editor .sumi-debug-top-stack-frame {
|
|
62
|
+
background: url('./assets/current-arrow.svg') center center no-repeat;
|
|
63
|
+
.sumi-breakpoint-icon-size;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.monaco-editor .sumi-debug-top-stack-frame {
|
|
67
|
+
&.sumi-debug-breakpoint,
|
|
68
|
+
&.sumi-debug-conditional-breakpoint,
|
|
69
|
+
&.logpoint {
|
|
70
|
+
background: url('./assets/current-and-breakpoint.svg') center center no-repeat;
|
|
71
|
+
.sumi-breakpoint-icon-size;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.monaco-editor .view-overlays .sumi-debug-top-stack-frame-line {
|
|
76
|
+
background: #ffff6673;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.monaco-editor.vs-dark .view-overlays .sumi-debug-top-stack-frame-line {
|
|
80
|
+
background: #ffff0033;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.monaco-editor .sumi-debug-focused-stack-frame {
|
|
84
|
+
background: url('./assets/stackframe-arrow.svg') center center no-repeat;
|
|
85
|
+
.sumi-breakpoint-icon-size;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.monaco-editor .sumi-debug-focused-stack-frame.sumi-debug-breakpoint {
|
|
89
|
+
background: url('./assets/stackframe-and-breakpoint.svg') center center no-repeat;
|
|
90
|
+
.sumi-breakpoint-icon-size;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.monaco-editor .view-overlays .sumi-debug-focused-stack-frame-line {
|
|
94
|
+
background: #cee7ce73;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.monaco-editor.vs-dark .view-overlays .sumi-debug-focused-stack-frame-line {
|
|
98
|
+
background: #7abd7a4d;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.monaco-editor.vs-dark .view-overlays .sumi-debug-top-stack-frame-exception-line {
|
|
102
|
+
background-color: #6c2022;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.inline-breakpoint-widget.codicon {
|
|
106
|
+
display: flex !important;
|
|
107
|
+
align-items: center;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.inline-breakpoint-widget.codicon-debug-breakpoint-disabled {
|
|
111
|
+
opacity: 0.7;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.monaco-editor .inline-breakpoint-widget.line-start {
|
|
115
|
+
left: -8px !important;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.monaco-editor .inline-breakpoint-widget {
|
|
119
|
+
cursor: pointer;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.monaco-editor .debug-breakpoint-placeholder::before {
|
|
123
|
+
content: ' ';
|
|
124
|
+
width: 0.9em;
|
|
125
|
+
display: inline-flex;
|
|
126
|
+
vertical-align: middle;
|
|
127
|
+
margin-top: -1px;
|
|
128
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { strings } from '@opensumi/ide-core-browser';
|
|
2
|
+
|
|
3
|
+
import { DebugConfiguration } from '../common';
|
|
4
|
+
|
|
5
|
+
const { equalsIgnoreCase } = strings;
|
|
6
|
+
|
|
7
|
+
export function isExtensionHostDebugging(config: DebugConfiguration) {
|
|
8
|
+
return (
|
|
9
|
+
config.type &&
|
|
10
|
+
equalsIgnoreCase(
|
|
11
|
+
config.type === 'vslsShare' ? (config as any).adapterProxy.configuration.type : config.type,
|
|
12
|
+
'extensionhost',
|
|
13
|
+
)
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function matchAll(str: string, regexp: RegExp) {
|
|
18
|
+
let match: RegExpExecArray | null;
|
|
19
|
+
const res: RegExpExecArray[] = [];
|
|
20
|
+
while ((match = regexp.exec(str)) !== null) {
|
|
21
|
+
res.push(match);
|
|
22
|
+
}
|
|
23
|
+
return res;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* request 为 attach 时,排除连接非远程机器 ip 的情况
|
|
28
|
+
*/
|
|
29
|
+
export function isRemoteAttach(config: DebugConfiguration): boolean {
|
|
30
|
+
if (config.request === 'attach') {
|
|
31
|
+
/**
|
|
32
|
+
* key: 调试语言 type
|
|
33
|
+
* value: 不同语言的调试插件在 attach 模式下. 要 attach 上的 TCP/IP 地址所对应的 launch 属性
|
|
34
|
+
*/
|
|
35
|
+
const map = {
|
|
36
|
+
node: 'address',
|
|
37
|
+
java: 'hostName',
|
|
38
|
+
go: 'host',
|
|
39
|
+
cppdbg: 'miDebuggerServerAddress',
|
|
40
|
+
python: 'host',
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const { type } = config;
|
|
44
|
+
const host = config[map[type]];
|
|
45
|
+
|
|
46
|
+
if (host) {
|
|
47
|
+
return !['localhost', '0.0.0.0', '127.0.0.1', '::1'].includes(host);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export const USUAL_WORD_SEPARATORS = '`~!@#$%^&*()-=+[{]}\\|;:\'",.<>/?';
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Create a word definition regular expression based on default word separators.
|
|
59
|
+
* Optionally provide allowed separators that should be included in words.
|
|
60
|
+
*
|
|
61
|
+
* The default would look like this:
|
|
62
|
+
* /(-?\d*\.\d\w*)|([^\`\~\!\@\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g
|
|
63
|
+
*/
|
|
64
|
+
function createWordRegExp(allowInWords = ''): RegExp {
|
|
65
|
+
let source = '(-?\\d*\\.\\d\\w*)|([^';
|
|
66
|
+
for (const sep of USUAL_WORD_SEPARATORS) {
|
|
67
|
+
if (allowInWords.indexOf(sep) >= 0) {
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
source += '\\' + sep;
|
|
71
|
+
}
|
|
72
|
+
source += '\\s]+)';
|
|
73
|
+
return new RegExp(source, 'g');
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// catches numbers (including floating numbers) in the first group, and alphanum in the second
|
|
77
|
+
export const DEFAULT_WORD_REGEXP = createWordRegExp();
|
|
78
|
+
|
|
79
|
+
export class CharWidthReader {
|
|
80
|
+
private static _INSTANCE: CharWidthReader | null = null;
|
|
81
|
+
|
|
82
|
+
public static getInstance(): CharWidthReader {
|
|
83
|
+
if (!CharWidthReader._INSTANCE) {
|
|
84
|
+
CharWidthReader._INSTANCE = new CharWidthReader();
|
|
85
|
+
}
|
|
86
|
+
return CharWidthReader._INSTANCE;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
private readonly _cache: Map<string, number>;
|
|
90
|
+
private readonly _canvas: HTMLCanvasElement;
|
|
91
|
+
|
|
92
|
+
private constructor() {
|
|
93
|
+
this._cache = new Map();
|
|
94
|
+
this._canvas = document.createElement('canvas');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
public getCharWidth(char: string, font: string): number {
|
|
98
|
+
const cacheKey = char + font;
|
|
99
|
+
if (this._cache.has(cacheKey)) {
|
|
100
|
+
return this._cache.get(cacheKey)!;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const context = this._canvas.getContext('2d')!;
|
|
104
|
+
context.font = font;
|
|
105
|
+
const metrics = context.measureText(char);
|
|
106
|
+
const width = metrics.width;
|
|
107
|
+
this._cache.set(cacheKey, width);
|
|
108
|
+
return width;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { Injectable, Autowired, INJECTOR_TOKEN, Injector } from '@opensumi/di';
|
|
2
|
+
import { IContextKey, IContextKeyService } from '@opensumi/ide-core-browser';
|
|
3
|
+
import { Disposable, positionToRange } from '@opensumi/ide-core-common';
|
|
4
|
+
import * as monaco from '@opensumi/monaco-editor-core/esm/vs/editor/editor.api';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
DebugBreakpointWidgetContext,
|
|
8
|
+
DebugEditor,
|
|
9
|
+
IDebugBreakpointWidget,
|
|
10
|
+
TSourceBrekpointProperties,
|
|
11
|
+
} from '../../common';
|
|
12
|
+
import { DebugBreakpointsService } from '../view/breakpoints/debug-breakpoints.service';
|
|
13
|
+
|
|
14
|
+
import { CONTEXT_BREAKPOINT_INPUT_FOCUSED } from './../../common/constants';
|
|
15
|
+
import { DebugBreakpointZoneWidget } from './debug-breakpoint-zone-widget';
|
|
16
|
+
|
|
17
|
+
export enum TopStackType {
|
|
18
|
+
exception,
|
|
19
|
+
debugger,
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@Injectable()
|
|
23
|
+
export class DebugBreakpointWidget extends Disposable implements IDebugBreakpointWidget {
|
|
24
|
+
@Autowired(DebugEditor)
|
|
25
|
+
private readonly editor: DebugEditor;
|
|
26
|
+
|
|
27
|
+
@Autowired(DebugBreakpointsService)
|
|
28
|
+
protected debugBreakpointsService: DebugBreakpointsService;
|
|
29
|
+
|
|
30
|
+
@Autowired(IContextKeyService)
|
|
31
|
+
private readonly contextKeyService: IContextKeyService;
|
|
32
|
+
|
|
33
|
+
@Autowired(INJECTOR_TOKEN)
|
|
34
|
+
private readonly injector: Injector;
|
|
35
|
+
|
|
36
|
+
static LINE_HEIGHT_NUMBER = 2;
|
|
37
|
+
|
|
38
|
+
protected zone: DebugBreakpointZoneWidget;
|
|
39
|
+
|
|
40
|
+
private _position: monaco.Position | undefined;
|
|
41
|
+
private breakpointWidgetInputFocus: IContextKey<boolean>;
|
|
42
|
+
|
|
43
|
+
constructor() {
|
|
44
|
+
super();
|
|
45
|
+
this.breakpointWidgetInputFocus = CONTEXT_BREAKPOINT_INPUT_FOCUSED.bind(this.contextKeyService);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
get position() {
|
|
49
|
+
return this._position;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
get values() {
|
|
53
|
+
return this.zone?.values;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
get breakpointType(): TSourceBrekpointProperties {
|
|
57
|
+
return this.zone?.breakpointType;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
show(
|
|
61
|
+
position: monaco.Position,
|
|
62
|
+
contexts?: DebugBreakpointWidgetContext,
|
|
63
|
+
defaultContext: TSourceBrekpointProperties = 'condition',
|
|
64
|
+
) {
|
|
65
|
+
this.dispose();
|
|
66
|
+
this._position = position;
|
|
67
|
+
this.addDispose(
|
|
68
|
+
(this.zone = this.injector.get(DebugBreakpointZoneWidget, [this.editor, { ...contexts }, defaultContext])),
|
|
69
|
+
);
|
|
70
|
+
this.addDispose(
|
|
71
|
+
this.zone.onDidChangeBreakpoint(({ context, value }) => {
|
|
72
|
+
if (contexts) {
|
|
73
|
+
contexts[context] = value;
|
|
74
|
+
}
|
|
75
|
+
}),
|
|
76
|
+
);
|
|
77
|
+
this.addDispose(
|
|
78
|
+
this.zone.onFocus(() => {
|
|
79
|
+
this.breakpointWidgetInputFocus.set(true);
|
|
80
|
+
}),
|
|
81
|
+
);
|
|
82
|
+
this.addDispose(
|
|
83
|
+
this.zone.onBlur(() => {
|
|
84
|
+
this.breakpointWidgetInputFocus.set(false);
|
|
85
|
+
}),
|
|
86
|
+
);
|
|
87
|
+
this.addDispose(
|
|
88
|
+
this.zone.onDispose(() => {
|
|
89
|
+
this._position = undefined;
|
|
90
|
+
this.breakpointWidgetInputFocus.set(false);
|
|
91
|
+
}),
|
|
92
|
+
);
|
|
93
|
+
this.zone.show(positionToRange(position), DebugBreakpointWidget.LINE_HEIGHT_NUMBER);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
hide() {
|
|
97
|
+
this.zone?.hide();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
|
|
4
|
+
import { Injectable, Autowired } from '@opensumi/di';
|
|
5
|
+
import { Select, Option } from '@opensumi/ide-components';
|
|
6
|
+
import { localize, Emitter, Event } from '@opensumi/ide-core-common';
|
|
7
|
+
import { ICodeEditor } from '@opensumi/ide-editor';
|
|
8
|
+
import { ZoneWidget } from '@opensumi/ide-monaco-enhance';
|
|
9
|
+
import { ICSSStyleService } from '@opensumi/ide-theme';
|
|
10
|
+
import * as monacoLanguages from '@opensumi/monaco-editor-core/esm/vs/editor/common/languages';
|
|
11
|
+
import * as monaco from '@opensumi/monaco-editor-core/esm/vs/editor/editor.api';
|
|
12
|
+
|
|
13
|
+
import {
|
|
14
|
+
BreakpointChangeData,
|
|
15
|
+
DebugBreakpointWidgetContext,
|
|
16
|
+
DebugEditor,
|
|
17
|
+
TSourceBrekpointProperties,
|
|
18
|
+
} from '../../common';
|
|
19
|
+
import { DebugBreakpointsService } from '../view/breakpoints/debug-breakpoints.service';
|
|
20
|
+
|
|
21
|
+
import styles from './debug-breakpoint.module.less';
|
|
22
|
+
|
|
23
|
+
@Injectable({ multiple: true })
|
|
24
|
+
export class DebugBreakpointZoneWidget extends ZoneWidget {
|
|
25
|
+
protected _fillContainer(container: HTMLElement): void {}
|
|
26
|
+
|
|
27
|
+
static INPUT_PLACEHOLDER_AFTER = styles.input_placeholder + '::after';
|
|
28
|
+
|
|
29
|
+
@Autowired(DebugBreakpointsService)
|
|
30
|
+
protected debugBreakpointsService: DebugBreakpointsService;
|
|
31
|
+
|
|
32
|
+
@Autowired(ICSSStyleService)
|
|
33
|
+
protected readonly cssManager: ICSSStyleService;
|
|
34
|
+
|
|
35
|
+
private _wrapper: HTMLDivElement;
|
|
36
|
+
private _selection: HTMLDivElement;
|
|
37
|
+
private _input: HTMLDivElement;
|
|
38
|
+
|
|
39
|
+
protected readonly _onDidChangeBreakpoint = new Emitter<BreakpointChangeData>();
|
|
40
|
+
readonly onDidChangeBreakpoint: Event<BreakpointChangeData> = this._onDidChangeBreakpoint.event;
|
|
41
|
+
|
|
42
|
+
protected readonly _onFocus = new Emitter<void>();
|
|
43
|
+
readonly onFocus: Event<void> = this._onFocus.event;
|
|
44
|
+
|
|
45
|
+
protected readonly _onBlur = new Emitter<void>();
|
|
46
|
+
readonly onBlur: Event<void> = this._onBlur.event;
|
|
47
|
+
|
|
48
|
+
private input: ICodeEditor | undefined;
|
|
49
|
+
|
|
50
|
+
get values() {
|
|
51
|
+
return {
|
|
52
|
+
...this.contexts,
|
|
53
|
+
[this.context]: this.input ? this.input.monacoEditor.getValue() || undefined : undefined,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
get breakpointType(): TSourceBrekpointProperties {
|
|
58
|
+
return this.context;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
constructor(
|
|
62
|
+
public editor: DebugEditor,
|
|
63
|
+
private readonly contexts: DebugBreakpointWidgetContext = {},
|
|
64
|
+
private context: TSourceBrekpointProperties = 'condition',
|
|
65
|
+
) {
|
|
66
|
+
super(editor);
|
|
67
|
+
|
|
68
|
+
this._wrapper = document.createElement('div');
|
|
69
|
+
this._selection = document.createElement('div');
|
|
70
|
+
this._input = document.createElement('div');
|
|
71
|
+
|
|
72
|
+
this._container.appendChild(this._wrapper);
|
|
73
|
+
this._wrapper.appendChild(this._selection);
|
|
74
|
+
this._wrapper.appendChild(this._input);
|
|
75
|
+
|
|
76
|
+
ReactDOM.render(<></>, this._input);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
public hide(): void {
|
|
80
|
+
if (this.input) {
|
|
81
|
+
this.input.dispose();
|
|
82
|
+
this.input = undefined;
|
|
83
|
+
}
|
|
84
|
+
super.dispose();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
public show(where: monaco.IRange, heightInLines: number): void {
|
|
88
|
+
super.show(where, heightInLines);
|
|
89
|
+
|
|
90
|
+
this.debugBreakpointsService.createBreakpointInput(this._input).then((inputEditor: ICodeEditor) => {
|
|
91
|
+
this.input = inputEditor;
|
|
92
|
+
|
|
93
|
+
const { monacoEditor } = this.input;
|
|
94
|
+
this.setInputMode();
|
|
95
|
+
|
|
96
|
+
this.addDispose(
|
|
97
|
+
monacoEditor.onDidBlurEditorWidget(() => {
|
|
98
|
+
this.inputBlurHandler();
|
|
99
|
+
}),
|
|
100
|
+
);
|
|
101
|
+
this.addDispose(
|
|
102
|
+
monacoEditor.onDidFocusEditorWidget(() => {
|
|
103
|
+
this.inputFocusHandler();
|
|
104
|
+
}),
|
|
105
|
+
);
|
|
106
|
+
this.addDispose(
|
|
107
|
+
monacoEditor.onDidChangeModelContent((textModel: monaco.editor.IModelContentChangedEvent) => {
|
|
108
|
+
if (!this.input) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
const value = monacoEditor.getValue();
|
|
113
|
+
if (value.length === 0) {
|
|
114
|
+
this.ensureRenderPlaceholder();
|
|
115
|
+
} else {
|
|
116
|
+
this.clearPlaceholder();
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const lineNum = monacoEditor.getModel()!.getLineCount();
|
|
120
|
+
this._relayout(lineNum + 1);
|
|
121
|
+
}),
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
this.syncPreContent();
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
protected createDecorations(): void {
|
|
129
|
+
if (!this.input) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (this.input.monacoEditor.getValue().length !== 0) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
this.input.monacoEditor.deltaDecorations(
|
|
138
|
+
[],
|
|
139
|
+
[
|
|
140
|
+
{
|
|
141
|
+
range: {
|
|
142
|
+
startLineNumber: 1,
|
|
143
|
+
endLineNumber: 0,
|
|
144
|
+
startColumn: 0,
|
|
145
|
+
endColumn: 1,
|
|
146
|
+
},
|
|
147
|
+
options: {
|
|
148
|
+
description: 'debug-breakpoint-zone-widget',
|
|
149
|
+
afterContentClassName: styles.input_placeholder,
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
],
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
protected renderOption(context: TSourceBrekpointProperties, label: string): JSX.Element {
|
|
157
|
+
return <Option value={context}>{label}</Option>;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
protected readonly inputFocusHandler = () => {
|
|
161
|
+
this._onFocus.fire();
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
protected readonly inputBlurHandler = () => {
|
|
165
|
+
this._onBlur.fire();
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
protected readonly selectContextHandler = (value: TSourceBrekpointProperties) => {
|
|
169
|
+
if (this.input) {
|
|
170
|
+
this.contexts[this.context] = this.input.monacoEditor.getValue() || undefined;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
this.context = value;
|
|
174
|
+
this.setInputMode();
|
|
175
|
+
this.render();
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
private setInputMode(): void {
|
|
179
|
+
const languageIdentifier = this.editor.getModel()?.getLanguageId();
|
|
180
|
+
const model = this.input?.monacoEditor.getModel();
|
|
181
|
+
if (model && languageIdentifier) {
|
|
182
|
+
model.setMode(this.context === 'logMessage' ? 'plaintext' : languageIdentifier);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
private renderPlaceholder() {
|
|
187
|
+
if (!this.input) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
this.clearPlaceholder();
|
|
192
|
+
|
|
193
|
+
const content = `'${this.placeholder}' !important`;
|
|
194
|
+
this.cssManager.addClass(DebugBreakpointZoneWidget.INPUT_PLACEHOLDER_AFTER, { content });
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
private ensureRenderPlaceholder() {
|
|
198
|
+
if (!this.input) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
this.createDecorations();
|
|
203
|
+
this.renderPlaceholder();
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
private syncPreContent(): void {
|
|
207
|
+
if (this.input) {
|
|
208
|
+
this.input.focus();
|
|
209
|
+
const preContent = this.contexts[this.context] || '';
|
|
210
|
+
this.input.monacoEditor.setValue(preContent);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
private clearPlaceholder() {
|
|
215
|
+
this.cssManager.removeClass(DebugBreakpointZoneWidget.INPUT_PLACEHOLDER_AFTER);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
applyClass() {
|
|
219
|
+
this._wrapper.className = styles.debug_breakpoint_wrapper;
|
|
220
|
+
this._selection.className = styles.debug_breakpoint_selected;
|
|
221
|
+
this._input.className = styles.debug_breakpoint_input;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
applyStyle() {
|
|
225
|
+
this.syncPreContent();
|
|
226
|
+
|
|
227
|
+
ReactDOM.render(
|
|
228
|
+
<Select
|
|
229
|
+
value={this.context}
|
|
230
|
+
selectedRenderer={() => <span className='kt-select-option'>{this.getContextToLocalize(this.context)}</span>}
|
|
231
|
+
onChange={this.selectContextHandler}
|
|
232
|
+
>
|
|
233
|
+
{this.renderOption('condition', this.getContextToLocalize('condition'))}
|
|
234
|
+
{this.renderOption('hitCondition', this.getContextToLocalize('hitCondition'))}
|
|
235
|
+
{this.renderOption('logMessage', this.getContextToLocalize('logMessage'))}
|
|
236
|
+
</Select>,
|
|
237
|
+
this._selection,
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
getContextToLocalize(ctx: TSourceBrekpointProperties) {
|
|
242
|
+
switch (ctx) {
|
|
243
|
+
case 'logMessage':
|
|
244
|
+
return localize('debug.expression.logMessage');
|
|
245
|
+
case 'hitCondition':
|
|
246
|
+
return localize('debug.expression.hitCondition');
|
|
247
|
+
default:
|
|
248
|
+
return localize('debug.expression.condition');
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
get placeholder() {
|
|
253
|
+
switch (this.context) {
|
|
254
|
+
case 'logMessage':
|
|
255
|
+
return localize('debug.expression.log.placeholder');
|
|
256
|
+
case 'hitCondition':
|
|
257
|
+
return localize('debug.expression.hit.placeholder');
|
|
258
|
+
default:
|
|
259
|
+
return localize('debug.expression.condition.placeholder');
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
.debug_breakpoint_wrapper {
|
|
2
|
+
height: 100%;
|
|
3
|
+
width: 100%;
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
border-top-color: rgb(0, 122, 204);
|
|
7
|
+
border-bottom-color: rgb(0, 122, 204);
|
|
8
|
+
border-top-style: solid;
|
|
9
|
+
border-bottom-style: solid;
|
|
10
|
+
border-top-width: 1px;
|
|
11
|
+
border-bottom-width: 1px;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
background: var(--editor-background);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.debug_breakpoint_selected {
|
|
17
|
+
padding: 0 10px;
|
|
18
|
+
flex: 1;
|
|
19
|
+
min-width: 120px;
|
|
20
|
+
margin: auto;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.debug_breakpoint_input {
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: inherit;
|
|
26
|
+
margin-top: 7px;
|
|
27
|
+
.input_placeholder {
|
|
28
|
+
position: relative;
|
|
29
|
+
}
|
|
30
|
+
}
|