@theia/debug 1.67.0-next.56 → 1.67.0-next.86
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.d.ts +91 -0
- package/lib/browser/breakpoint/breakpoint-manager.d.ts.map +1 -0
- package/lib/browser/breakpoint/breakpoint-manager.js +367 -0
- package/lib/browser/breakpoint/breakpoint-manager.js.map +1 -0
- package/lib/browser/breakpoint/breakpoint-marker.d.ts +65 -0
- package/lib/browser/breakpoint/breakpoint-marker.d.ts.map +1 -0
- package/lib/browser/breakpoint/breakpoint-marker.js +102 -0
- package/lib/browser/breakpoint/breakpoint-marker.js.map +1 -0
- package/lib/browser/breakpoint/debug-data-breakpoint-actions.d.ts +17 -0
- package/lib/browser/breakpoint/debug-data-breakpoint-actions.d.ts.map +1 -0
- package/lib/browser/breakpoint/debug-data-breakpoint-actions.js +166 -0
- package/lib/browser/breakpoint/debug-data-breakpoint-actions.js.map +1 -0
- package/lib/browser/console/debug-console-contribution.d.ts +45 -0
- package/lib/browser/console/debug-console-contribution.d.ts.map +1 -0
- package/lib/browser/console/debug-console-contribution.js +233 -0
- package/lib/browser/console/debug-console-contribution.js.map +1 -0
- package/lib/browser/console/debug-console-items.d.ts +108 -0
- package/lib/browser/console/debug-console-items.d.ts.map +1 -0
- package/lib/browser/console/debug-console-items.js +407 -0
- package/lib/browser/console/debug-console-items.js.map +1 -0
- package/lib/browser/console/debug-console-session.d.ts +32 -0
- package/lib/browser/console/debug-console-session.d.ts.map +1 -0
- package/lib/browser/console/debug-console-session.js +193 -0
- package/lib/browser/console/debug-console-session.js.map +1 -0
- package/lib/browser/debug-call-stack-item-type-key.d.ts +4 -0
- package/lib/browser/debug-call-stack-item-type-key.d.ts.map +1 -0
- package/lib/browser/debug-call-stack-item-type-key.js +20 -0
- package/lib/browser/debug-call-stack-item-type-key.js.map +1 -0
- package/lib/browser/debug-configuration-manager.d.ts +103 -0
- package/lib/browser/debug-configuration-manager.d.ts.map +1 -0
- package/lib/browser/debug-configuration-manager.js +545 -0
- package/lib/browser/debug-configuration-manager.js.map +1 -0
- package/lib/browser/debug-configuration-model.d.ts +30 -0
- package/lib/browser/debug-configuration-model.d.ts.map +1 -0
- package/lib/browser/debug-configuration-model.js +80 -0
- package/lib/browser/debug-configuration-model.js.map +1 -0
- package/lib/browser/debug-contribution.d.ts +23 -0
- package/lib/browser/debug-contribution.d.ts.map +1 -0
- package/lib/browser/debug-contribution.js +20 -0
- package/lib/browser/debug-contribution.js.map +1 -0
- package/lib/browser/debug-frontend-application-contribution.d.ts +252 -0
- package/lib/browser/debug-frontend-application-contribution.d.ts.map +1 -0
- package/lib/browser/debug-frontend-application-contribution.js +1696 -0
- package/lib/browser/debug-frontend-application-contribution.js.map +1 -0
- package/lib/browser/debug-frontend-module.d.ts +5 -0
- package/lib/browser/debug-frontend-module.d.ts.map +1 -0
- package/lib/browser/debug-frontend-module.js +112 -0
- package/lib/browser/debug-frontend-module.js.map +1 -0
- package/lib/browser/debug-package.spec.d.ts +1 -0
- package/lib/browser/debug-package.spec.d.ts.map +1 -0
- package/lib/browser/debug-package.spec.js +19 -0
- package/lib/browser/debug-package.spec.js.map +1 -0
- package/lib/browser/debug-prefix-configuration.d.ts +52 -0
- package/lib/browser/debug-prefix-configuration.d.ts.map +1 -0
- package/lib/browser/debug-prefix-configuration.js +202 -0
- package/lib/browser/debug-prefix-configuration.js.map +1 -0
- package/lib/browser/debug-resource.d.ts +15 -0
- package/lib/browser/debug-resource.d.ts.map +1 -0
- package/lib/browser/debug-resource.js +58 -0
- package/lib/browser/debug-resource.js.map +1 -0
- package/lib/browser/debug-schema-updater.d.ts +14 -0
- package/lib/browser/debug-schema-updater.d.ts.map +1 -0
- package/lib/browser/debug-schema-updater.js +161 -0
- package/lib/browser/debug-schema-updater.js.map +1 -0
- package/lib/browser/debug-session-configuration-label-provider.d.ts +11 -0
- package/lib/browser/debug-session-configuration-label-provider.d.ts.map +1 -0
- package/lib/browser/debug-session-configuration-label-provider.js +48 -0
- package/lib/browser/debug-session-configuration-label-provider.js.map +1 -0
- package/lib/browser/debug-session-configuration-label-provider.spec.d.ts +2 -0
- package/lib/browser/debug-session-configuration-label-provider.spec.d.ts.map +1 -0
- package/lib/browser/debug-session-configuration-label-provider.spec.js +84 -0
- package/lib/browser/debug-session-configuration-label-provider.spec.js.map +1 -0
- package/lib/browser/debug-session-connection.d.ts +111 -0
- package/lib/browser/debug-session-connection.d.ts.map +1 -0
- package/lib/browser/debug-session-connection.js +259 -0
- package/lib/browser/debug-session-connection.js.map +1 -0
- package/lib/browser/debug-session-contribution.d.ts +77 -0
- package/lib/browser/debug-session-contribution.d.ts.map +1 -0
- package/lib/browser/debug-session-contribution.js +143 -0
- package/lib/browser/debug-session-contribution.js.map +1 -0
- package/lib/browser/debug-session-manager.d.ts +147 -0
- package/lib/browser/debug-session-manager.d.ts.map +1 -0
- package/lib/browser/debug-session-manager.js +640 -0
- package/lib/browser/debug-session-manager.js.map +1 -0
- package/lib/browser/debug-session-options.d.ts +56 -0
- package/lib/browser/debug-session-options.d.ts.map +1 -0
- package/lib/browser/debug-session-options.js +92 -0
- package/lib/browser/debug-session-options.js.map +1 -0
- package/lib/browser/debug-session.d.ts +200 -0
- package/lib/browser/debug-session.d.ts.map +1 -0
- package/lib/browser/debug-session.js +955 -0
- package/lib/browser/debug-session.js.map +1 -0
- package/lib/browser/debug-tab-bar-decorator.d.ts +17 -0
- package/lib/browser/debug-tab-bar-decorator.d.ts.map +1 -0
- package/lib/browser/debug-tab-bar-decorator.js +63 -0
- package/lib/browser/debug-tab-bar-decorator.js.map +1 -0
- package/lib/browser/debug-watch-manager.d.ts +22 -0
- package/lib/browser/debug-watch-manager.d.ts.map +1 -0
- package/lib/browser/debug-watch-manager.js +86 -0
- package/lib/browser/debug-watch-manager.js.map +1 -0
- package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.d.ts +7 -0
- package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.d.ts.map +1 -0
- package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.js +39 -0
- package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.js.map +1 -0
- package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.d.ts +20 -0
- package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.d.ts.map +1 -0
- package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.js +111 -0
- package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.js.map +1 -0
- package/lib/browser/disassembly-view/disassembly-view-contribution.d.ts +25 -0
- package/lib/browser/disassembly-view/disassembly-view-contribution.d.ts.map +1 -0
- package/lib/browser/disassembly-view/disassembly-view-contribution.js +124 -0
- package/lib/browser/disassembly-view/disassembly-view-contribution.js.map +1 -0
- package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.d.ts +39 -0
- package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.d.ts.map +1 -0
- package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.js +213 -0
- package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.js.map +1 -0
- package/lib/browser/disassembly-view/disassembly-view-table-delegate.d.ts +16 -0
- package/lib/browser/disassembly-view/disassembly-view-table-delegate.d.ts.map +1 -0
- package/lib/browser/disassembly-view/disassembly-view-table-delegate.js +39 -0
- package/lib/browser/disassembly-view/disassembly-view-table-delegate.js.map +1 -0
- package/lib/browser/disassembly-view/disassembly-view-utilities.d.ts +38 -0
- package/lib/browser/disassembly-view/disassembly-view-utilities.d.ts.map +1 -0
- package/lib/browser/disassembly-view/disassembly-view-utilities.js +18 -0
- package/lib/browser/disassembly-view/disassembly-view-utilities.js.map +1 -0
- package/lib/browser/disassembly-view/disassembly-view-widget.d.ts +61 -0
- package/lib/browser/disassembly-view/disassembly-view-widget.d.ts.map +1 -0
- package/lib/browser/disassembly-view/disassembly-view-widget.js +446 -0
- package/lib/browser/disassembly-view/disassembly-view-widget.js.map +1 -0
- package/lib/browser/editor/debug-breakpoint-widget.d.ts +58 -0
- package/lib/browser/editor/debug-breakpoint-widget.d.ts.map +1 -0
- package/lib/browser/editor/debug-breakpoint-widget.js +270 -0
- package/lib/browser/editor/debug-breakpoint-widget.js.map +1 -0
- package/lib/browser/editor/debug-editor-model.d.ts +87 -0
- package/lib/browser/editor/debug-editor-model.d.ts.map +1 -0
- package/lib/browser/editor/debug-editor-model.js +499 -0
- package/lib/browser/editor/debug-editor-model.js.map +1 -0
- package/lib/browser/editor/debug-editor-service.d.ts +38 -0
- package/lib/browser/editor/debug-editor-service.d.ts.map +1 -0
- package/lib/browser/editor/debug-editor-service.js +183 -0
- package/lib/browser/editor/debug-editor-service.js.map +1 -0
- package/lib/browser/editor/debug-editor.d.ts +4 -0
- package/lib/browser/editor/debug-editor.d.ts.map +1 -0
- package/lib/browser/editor/debug-editor.js +20 -0
- package/lib/browser/editor/debug-editor.js.map +1 -0
- package/lib/browser/editor/debug-exception-widget.d.ts +30 -0
- package/lib/browser/editor/debug-exception-widget.d.ts.map +1 -0
- package/lib/browser/editor/debug-exception-widget.js +107 -0
- package/lib/browser/editor/debug-exception-widget.js.map +1 -0
- package/lib/browser/editor/debug-expression-provider.d.ts +17 -0
- package/lib/browser/editor/debug-expression-provider.d.ts.map +1 -0
- package/lib/browser/editor/debug-expression-provider.js +107 -0
- package/lib/browser/editor/debug-expression-provider.js.map +1 -0
- package/lib/browser/editor/debug-hover-source.d.ts +20 -0
- package/lib/browser/editor/debug-hover-source.d.ts.map +1 -0
- package/lib/browser/editor/debug-hover-source.js +119 -0
- package/lib/browser/editor/debug-hover-source.js.map +1 -0
- package/lib/browser/editor/debug-hover-widget.d.ts +61 -0
- package/lib/browser/editor/debug-hover-widget.d.ts.map +1 -0
- package/lib/browser/editor/debug-hover-widget.js +271 -0
- package/lib/browser/editor/debug-hover-widget.js.map +1 -0
- package/lib/browser/editor/debug-inline-value-decorator.d.ts +20 -0
- package/lib/browser/editor/debug-inline-value-decorator.d.ts.map +1 -0
- package/lib/browser/editor/debug-inline-value-decorator.js +326 -0
- package/lib/browser/editor/debug-inline-value-decorator.js.map +1 -0
- package/lib/browser/model/debug-breakpoint.d.ts +48 -0
- package/lib/browser/model/debug-breakpoint.d.ts.map +1 -0
- package/lib/browser/model/debug-breakpoint.js +111 -0
- package/lib/browser/model/debug-breakpoint.js.map +1 -0
- package/lib/browser/model/debug-data-breakpoint.d.ts +16 -0
- package/lib/browser/model/debug-data-breakpoint.d.ts.map +1 -0
- package/lib/browser/model/debug-data-breakpoint.js +75 -0
- package/lib/browser/model/debug-data-breakpoint.js.map +1 -0
- package/lib/browser/model/debug-function-breakpoint.d.ts +19 -0
- package/lib/browser/model/debug-function-breakpoint.d.ts.map +1 -0
- package/lib/browser/model/debug-function-breakpoint.js +93 -0
- package/lib/browser/model/debug-function-breakpoint.js.map +1 -0
- package/lib/browser/model/debug-instruction-breakpoint.d.ts +15 -0
- package/lib/browser/model/debug-instruction-breakpoint.d.ts.map +1 -0
- package/lib/browser/model/debug-instruction-breakpoint.js +66 -0
- package/lib/browser/model/debug-instruction-breakpoint.js.map +1 -0
- package/lib/browser/model/debug-source-breakpoint.d.ts +39 -0
- package/lib/browser/model/debug-source-breakpoint.d.ts.map +1 -0
- package/lib/browser/model/debug-source-breakpoint.js +219 -0
- package/lib/browser/model/debug-source-breakpoint.js.map +1 -0
- package/lib/browser/model/debug-source.d.ts +25 -0
- package/lib/browser/model/debug-source.d.ts.map +1 -0
- package/lib/browser/model/debug-source.js +81 -0
- package/lib/browser/model/debug-source.js.map +1 -0
- package/lib/browser/model/debug-stack-frame.d.ts +45 -0
- package/lib/browser/model/debug-stack-frame.d.ts.map +1 -0
- package/lib/browser/model/debug-stack-frame.js +165 -0
- package/lib/browser/model/debug-stack-frame.js.map +1 -0
- package/lib/browser/model/debug-thread.d.ts +68 -0
- package/lib/browser/model/debug-thread.d.ts.map +1 -0
- package/lib/browser/model/debug-thread.js +266 -0
- package/lib/browser/model/debug-thread.js.map +1 -0
- package/lib/browser/view/debug-action.d.ts +18 -0
- package/lib/browser/view/debug-action.d.ts.map +1 -0
- package/lib/browser/view/debug-action.js +44 -0
- package/lib/browser/view/debug-action.js.map +1 -0
- package/lib/browser/view/debug-breakpoints-source.d.ts +10 -0
- package/lib/browser/view/debug-breakpoints-source.d.ts.map +1 -0
- package/lib/browser/view/debug-breakpoints-source.js +58 -0
- package/lib/browser/view/debug-breakpoints-source.js.map +1 -0
- package/lib/browser/view/debug-breakpoints-widget.d.ts +23 -0
- package/lib/browser/view/debug-breakpoints-widget.d.ts.map +1 -0
- package/lib/browser/view/debug-breakpoints-widget.js +81 -0
- package/lib/browser/view/debug-breakpoints-widget.js.map +1 -0
- package/lib/browser/view/debug-configuration-select.d.ts +67 -0
- package/lib/browser/view/debug-configuration-select.d.ts.map +1 -0
- package/lib/browser/view/debug-configuration-select.js +212 -0
- package/lib/browser/view/debug-configuration-select.js.map +1 -0
- package/lib/browser/view/debug-configuration-widget.d.ts +33 -0
- package/lib/browser/view/debug-configuration-widget.d.ts.map +1 -0
- package/lib/browser/view/debug-configuration-widget.js +137 -0
- package/lib/browser/view/debug-configuration-widget.js.map +1 -0
- package/lib/browser/view/debug-exception-breakpoint.d.ts +15 -0
- package/lib/browser/view/debug-exception-breakpoint.d.ts.map +1 -0
- package/lib/browser/view/debug-exception-breakpoint.js +62 -0
- package/lib/browser/view/debug-exception-breakpoint.js.map +1 -0
- package/lib/browser/view/debug-session-widget.d.ts +29 -0
- package/lib/browser/view/debug-session-widget.d.ts.map +1 -0
- package/lib/browser/view/debug-session-widget.js +127 -0
- package/lib/browser/view/debug-session-widget.js.map +1 -0
- package/lib/browser/view/debug-stack-frames-source.d.ts +18 -0
- package/lib/browser/view/debug-stack-frames-source.d.ts.map +1 -0
- package/lib/browser/view/debug-stack-frames-source.js +83 -0
- package/lib/browser/view/debug-stack-frames-source.js.map +1 -0
- package/lib/browser/view/debug-stack-frames-widget.d.ts +25 -0
- package/lib/browser/view/debug-stack-frames-widget.d.ts.map +1 -0
- package/lib/browser/view/debug-stack-frames-widget.js +152 -0
- package/lib/browser/view/debug-stack-frames-widget.js.map +1 -0
- package/lib/browser/view/debug-threads-source.d.ts +9 -0
- package/lib/browser/view/debug-threads-source.d.ts.map +1 -0
- package/lib/browser/view/debug-threads-source.js +56 -0
- package/lib/browser/view/debug-threads-source.js.map +1 -0
- package/lib/browser/view/debug-threads-widget.d.ts +27 -0
- package/lib/browser/view/debug-threads-widget.d.ts.map +1 -0
- package/lib/browser/view/debug-threads-widget.js +139 -0
- package/lib/browser/view/debug-threads-widget.js.map +1 -0
- package/lib/browser/view/debug-toolbar-widget.d.ts +34 -0
- package/lib/browser/view/debug-toolbar-widget.d.ts.map +1 -0
- package/lib/browser/view/debug-toolbar-widget.js +139 -0
- package/lib/browser/view/debug-toolbar-widget.js.map +1 -0
- package/lib/browser/view/debug-variables-source.d.ts +10 -0
- package/lib/browser/view/debug-variables-source.d.ts.map +1 -0
- package/lib/browser/view/debug-variables-source.js +54 -0
- package/lib/browser/view/debug-variables-source.js.map +1 -0
- package/lib/browser/view/debug-variables-widget.d.ts +43 -0
- package/lib/browser/view/debug-variables-widget.d.ts.map +1 -0
- package/lib/browser/view/debug-variables-widget.js +207 -0
- package/lib/browser/view/debug-variables-widget.js.map +1 -0
- package/lib/browser/view/debug-view-model.d.ts +59 -0
- package/lib/browser/view/debug-view-model.d.ts.map +1 -0
- package/lib/browser/view/debug-view-model.js +225 -0
- package/lib/browser/view/debug-view-model.js.map +1 -0
- package/lib/browser/view/debug-watch-expression.d.ts +33 -0
- package/lib/browser/view/debug-watch-expression.d.ts.map +1 -0
- package/lib/browser/view/debug-watch-expression.js +92 -0
- package/lib/browser/view/debug-watch-expression.js.map +1 -0
- package/lib/browser/view/debug-watch-source.d.ts +10 -0
- package/lib/browser/view/debug-watch-source.d.ts.map +1 -0
- package/lib/browser/view/debug-watch-source.js +52 -0
- package/lib/browser/view/debug-watch-source.js.map +1 -0
- package/lib/browser/view/debug-watch-widget.d.ts +17 -0
- package/lib/browser/view/debug-watch-widget.d.ts.map +1 -0
- package/lib/browser/view/debug-watch-widget.js +71 -0
- package/lib/browser/view/debug-watch-widget.js.map +1 -0
- package/lib/browser/view/debug-widget.d.ts +24 -0
- package/lib/browser/view/debug-widget.d.ts.map +1 -0
- package/lib/browser/view/debug-widget.js +101 -0
- package/lib/browser/view/debug-widget.js.map +1 -0
- package/lib/common/debug-adapter-contribution-registry.d.ts +60 -0
- package/lib/common/debug-adapter-contribution-registry.d.ts.map +1 -0
- package/lib/common/debug-adapter-contribution-registry.js +205 -0
- package/lib/common/debug-adapter-contribution-registry.js.map +1 -0
- package/lib/common/debug-adapter-session.d.ts +19 -0
- package/lib/common/debug-adapter-session.d.ts.map +1 -0
- package/lib/common/debug-adapter-session.js +79 -0
- package/lib/common/debug-adapter-session.js.map +1 -0
- package/lib/common/debug-common.d.ts +2 -0
- package/lib/common/debug-common.d.ts.map +1 -0
- package/lib/common/debug-common.js +21 -0
- package/lib/common/debug-common.js.map +1 -0
- package/lib/common/debug-compound.d.ts +15 -0
- package/lib/common/debug-compound.d.ts.map +1 -0
- package/lib/common/debug-compound.js +28 -0
- package/lib/common/debug-compound.js.map +1 -0
- package/lib/common/debug-configuration.d.ts +77 -0
- package/lib/common/debug-configuration.d.ts.map +1 -0
- package/lib/common/debug-configuration.js +32 -0
- package/lib/common/debug-configuration.js.map +1 -0
- package/lib/common/debug-model.d.ts +153 -0
- package/lib/common/debug-model.d.ts.map +1 -0
- package/lib/common/debug-model.js +36 -0
- package/lib/common/debug-model.js.map +1 -0
- package/lib/common/debug-preferences.d.ts +19 -0
- package/lib/common/debug-preferences.d.ts.map +1 -0
- package/lib/common/debug-preferences.js +99 -0
- package/lib/common/debug-preferences.js.map +1 -0
- package/lib/common/debug-service.d.ts +124 -0
- package/lib/common/debug-service.d.ts.map +1 -0
- package/lib/common/debug-service.js +67 -0
- package/lib/common/debug-service.js.map +1 -0
- package/lib/common/debug-uri-utils.d.ts +24 -0
- package/lib/common/debug-uri-utils.d.ts.map +1 -0
- package/lib/common/debug-uri-utils.js +27 -0
- package/lib/common/debug-uri-utils.js.map +1 -0
- package/lib/common/inline-debug-adapter.d.ts +19 -0
- package/lib/common/inline-debug-adapter.d.ts.map +1 -0
- package/lib/common/inline-debug-adapter.js +45 -0
- package/lib/common/inline-debug-adapter.js.map +1 -0
- package/lib/common/launch-preferences.d.ts +6 -0
- package/lib/common/launch-preferences.d.ts.map +1 -0
- package/lib/common/launch-preferences.js +37 -0
- package/lib/common/launch-preferences.js.map +1 -0
- package/lib/node/debug-adapter-factory.d.ts +20 -0
- package/lib/node/debug-adapter-factory.d.ts.map +1 -0
- package/lib/node/debug-adapter-factory.js +89 -0
- package/lib/node/debug-adapter-factory.js.map +1 -0
- package/lib/node/debug-adapter-session-manager.d.ts +38 -0
- package/lib/node/debug-adapter-session-manager.d.ts.map +1 -0
- package/lib/node/debug-adapter-session-manager.js +104 -0
- package/lib/node/debug-adapter-session-manager.js.map +1 -0
- package/lib/node/debug-backend-module.d.ts +4 -0
- package/lib/node/debug-backend-module.d.ts.map +1 -0
- package/lib/node/debug-backend-module.js +45 -0
- package/lib/node/debug-backend-module.js.map +1 -0
- package/lib/node/debug-service-impl.d.ts +31 -0
- package/lib/node/debug-service-impl.d.ts.map +1 -0
- package/lib/node/debug-service-impl.js +117 -0
- package/lib/node/debug-service-impl.js.map +1 -0
- package/lib/node/stream-debug-adapter.d.ts +41 -0
- package/lib/node/stream-debug-adapter.d.ts.map +1 -0
- package/lib/node/stream-debug-adapter.js +113 -0
- package/lib/node/stream-debug-adapter.js.map +1 -0
- package/package.json +15 -15
- package/src/browser/console/debug-console-items.tsx +90 -21
- package/src/browser/console/debug-console-session.ts +1 -0
- package/src/browser/debug-session-contribution.ts +3 -1
- package/src/browser/debug-session-manager.ts +10 -0
- package/src/browser/debug-session.tsx +13 -1
- package/src/browser/editor/debug-hover-source.tsx +6 -2
- package/src/browser/editor/debug-inline-value-decorator.ts +1 -1
- package/src/browser/model/debug-stack-frame.tsx +13 -6
- package/src/browser/model/debug-thread.tsx +14 -10
- package/src/browser/style/index.css +17 -0
- package/src/browser/view/debug-variables-source.ts +1 -0
- package/src/browser/view/debug-variables-widget.ts +59 -0
- package/src/browser/view/debug-view-model.ts +13 -0
- package/src/browser/view/debug-watch-expression.tsx +5 -6
- package/src/browser/view/debug-watch-source.ts +1 -0
- package/src/common/debug-preferences.ts +12 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"debug-session-manager.d.ts","sourceRoot":"","sources":["../../src/browser/debug-session-manager.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAO,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACzH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAiB,MAAM,yBAAyB,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAC5F,OAAO,GAAG,MAAM,4BAA4B,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,WAAW,EAAiC,MAAM,sCAAsC,CAAC;AAClG,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAc,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,UAAU,EAA0B,MAAM,iBAAiB,CAAC;AACnF,OAAO,EAAE,gCAAgC,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACrG,OAAO,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// *****************************************************************************
|
|
3
|
+
// Copyright (C) 2018 Red Hat, Inc. 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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.DebugSessionManager = void 0;
|
|
19
|
+
const tslib_1 = require("tslib");
|
|
20
|
+
const core_1 = require("@theia/core");
|
|
21
|
+
const browser_1 = require("@theia/core/lib/browser");
|
|
22
|
+
const context_key_service_1 = require("@theia/core/lib/browser/context-key-service");
|
|
23
|
+
const uri_1 = require("@theia/core/lib/common/uri");
|
|
24
|
+
const browser_2 = require("@theia/editor/lib/browser");
|
|
25
|
+
const quick_open_task_1 = require("@theia/task/lib/browser/quick-open-task");
|
|
26
|
+
const task_service_1 = require("@theia/task/lib/browser/task-service");
|
|
27
|
+
const browser_3 = require("@theia/variable-resolver/lib/browser");
|
|
28
|
+
const inversify_1 = require("@theia/core/shared/inversify");
|
|
29
|
+
const debug_service_1 = require("../common/debug-service");
|
|
30
|
+
const breakpoint_manager_1 = require("./breakpoint/breakpoint-manager");
|
|
31
|
+
const debug_configuration_manager_1 = require("./debug-configuration-manager");
|
|
32
|
+
const debug_session_1 = require("./debug-session");
|
|
33
|
+
const debug_session_contribution_1 = require("./debug-session-contribution");
|
|
34
|
+
const debug_session_options_1 = require("./debug-session-options");
|
|
35
|
+
const debug_source_breakpoint_1 = require("./model/debug-source-breakpoint");
|
|
36
|
+
const debug_function_breakpoint_1 = require("./model/debug-function-breakpoint");
|
|
37
|
+
const debug_instruction_breakpoint_1 = require("./model/debug-instruction-breakpoint");
|
|
38
|
+
const debug_session_configuration_label_provider_1 = require("./debug-session-configuration-label-provider");
|
|
39
|
+
const debug_data_breakpoint_1 = require("./model/debug-data-breakpoint");
|
|
40
|
+
let DebugSessionManager = class DebugSessionManager {
|
|
41
|
+
constructor() {
|
|
42
|
+
this._sessions = new Map();
|
|
43
|
+
this.onWillStartDebugSessionEmitter = new core_1.Emitter();
|
|
44
|
+
this.onWillStartDebugSession = this.onWillStartDebugSessionEmitter.event;
|
|
45
|
+
this.onWillResolveDebugConfigurationEmitter = new core_1.Emitter();
|
|
46
|
+
this.onWillResolveDebugConfiguration = this.onWillResolveDebugConfigurationEmitter.event;
|
|
47
|
+
this.onDidCreateDebugSessionEmitter = new core_1.Emitter();
|
|
48
|
+
this.onDidCreateDebugSession = this.onDidCreateDebugSessionEmitter.event;
|
|
49
|
+
this.onDidStartDebugSessionEmitter = new core_1.Emitter();
|
|
50
|
+
this.onDidStartDebugSession = this.onDidStartDebugSessionEmitter.event;
|
|
51
|
+
this.onDidStopDebugSessionEmitter = new core_1.Emitter();
|
|
52
|
+
this.onDidStopDebugSession = this.onDidStopDebugSessionEmitter.event;
|
|
53
|
+
this.onDidChangeActiveDebugSessionEmitter = new core_1.Emitter();
|
|
54
|
+
this.onDidChangeActiveDebugSession = this.onDidChangeActiveDebugSessionEmitter.event;
|
|
55
|
+
this.onDidDestroyDebugSessionEmitter = new core_1.Emitter();
|
|
56
|
+
this.onDidDestroyDebugSession = this.onDidDestroyDebugSessionEmitter.event;
|
|
57
|
+
this.onDidReceiveDebugSessionCustomEventEmitter = new core_1.Emitter();
|
|
58
|
+
this.onDidReceiveDebugSessionCustomEvent = this.onDidReceiveDebugSessionCustomEventEmitter.event;
|
|
59
|
+
this.onDidFocusStackFrameEmitter = new core_1.Emitter();
|
|
60
|
+
this.onDidFocusStackFrame = this.onDidFocusStackFrameEmitter.event;
|
|
61
|
+
this.onDidFocusThreadEmitter = new core_1.Emitter();
|
|
62
|
+
this.onDidFocusThread = this.onDidFocusThreadEmitter.event;
|
|
63
|
+
this.onDidChangeBreakpointsEmitter = new core_1.Emitter();
|
|
64
|
+
this.onDidChangeBreakpoints = this.onDidChangeBreakpointsEmitter.event;
|
|
65
|
+
this.onDidChangeEmitter = new core_1.Emitter();
|
|
66
|
+
this.onDidChange = this.onDidChangeEmitter.event;
|
|
67
|
+
this.onDidResolveLazyVariableEmitter = new core_1.Emitter();
|
|
68
|
+
this.onDidResolveLazyVariable = this.onDidResolveLazyVariableEmitter.event;
|
|
69
|
+
this.configurationIds = new Map();
|
|
70
|
+
this.disposeOnCurrentSessionChanged = new core_1.DisposableCollection();
|
|
71
|
+
}
|
|
72
|
+
fireDidChangeBreakpoints(event) {
|
|
73
|
+
this.onDidChangeBreakpointsEmitter.fire(event);
|
|
74
|
+
}
|
|
75
|
+
fireDidChange(current) {
|
|
76
|
+
this.debugTypeKey.set(current === null || current === void 0 ? void 0 : current.configuration.type);
|
|
77
|
+
this.inDebugModeKey.set(this.inDebugMode);
|
|
78
|
+
this.debugStateKey.set((0, debug_session_1.debugStateContextValue)(this.state));
|
|
79
|
+
this.onDidChangeEmitter.fire(current);
|
|
80
|
+
}
|
|
81
|
+
init() {
|
|
82
|
+
this.debugTypeKey = this.contextKeyService.createKey('debugType', undefined);
|
|
83
|
+
this.inDebugModeKey = this.contextKeyService.createKey('inDebugMode', this.inDebugMode);
|
|
84
|
+
this.debugStateKey = this.contextKeyService.createKey('debugState', (0, debug_session_1.debugStateContextValue)(this.state));
|
|
85
|
+
this.breakpoints.onDidChangeMarkers(uri => this.fireDidChangeBreakpoints({ uri }));
|
|
86
|
+
this.labelProvider.onDidChange(event => {
|
|
87
|
+
for (const uriString of this.breakpoints.getUris()) {
|
|
88
|
+
const uri = new uri_1.default(uriString);
|
|
89
|
+
if (event.affects(uri)) {
|
|
90
|
+
this.fireDidChangeBreakpoints({ uri });
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
get inDebugMode() {
|
|
96
|
+
return this.state > debug_session_1.DebugState.Inactive;
|
|
97
|
+
}
|
|
98
|
+
isCurrentEditorFrame(uri) {
|
|
99
|
+
var _a, _b;
|
|
100
|
+
return ((_b = (_a = this.currentFrame) === null || _a === void 0 ? void 0 : _a.source) === null || _b === void 0 ? void 0 : _b.uri.toString()) === (uri instanceof uri_1.default ? uri : new uri_1.default(uri.toString())).toString();
|
|
101
|
+
}
|
|
102
|
+
async saveAll() {
|
|
103
|
+
if (!this.shell.canSaveAll()) {
|
|
104
|
+
return true; // Nothing to save.
|
|
105
|
+
}
|
|
106
|
+
try {
|
|
107
|
+
await this.shell.saveAll();
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
console.error('saveAll failed:', error);
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
async start(optionsOrName) {
|
|
116
|
+
if (typeof optionsOrName === 'string') {
|
|
117
|
+
const options = this.debugConfigurationManager.find(optionsOrName);
|
|
118
|
+
return !!options && this.start(options);
|
|
119
|
+
}
|
|
120
|
+
return optionsOrName.configuration ? this.startConfiguration(optionsOrName) : this.startCompound(optionsOrName);
|
|
121
|
+
}
|
|
122
|
+
async startConfiguration(options) {
|
|
123
|
+
return this.progressService.withProgress(core_1.nls.localizeByDefault('Starting...'), 'debug', async () => {
|
|
124
|
+
try {
|
|
125
|
+
// If a parent session is available saving should be handled by the parent
|
|
126
|
+
if (!options.configuration.parentSessionId && !options.configuration.suppressSaveBeforeStart && !await this.saveAll()) {
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
await this.fireWillStartDebugSession();
|
|
130
|
+
const resolved = await this.resolveConfiguration(options);
|
|
131
|
+
if (!resolved || !resolved.configuration) {
|
|
132
|
+
// As per vscode API: https://code.visualstudio.com/api/references/vscode-api#DebugConfigurationProvider
|
|
133
|
+
// "Returning the value 'undefined' prevents the debug session from starting.
|
|
134
|
+
// Returning the value 'null' prevents the debug session from starting and opens the
|
|
135
|
+
// underlying debug configuration instead."
|
|
136
|
+
// eslint-disable-next-line no-null/no-null
|
|
137
|
+
if (resolved === null) {
|
|
138
|
+
this.debugConfigurationManager.openConfiguration();
|
|
139
|
+
}
|
|
140
|
+
return undefined;
|
|
141
|
+
}
|
|
142
|
+
const sessionConfigurationLabel = this.sessionConfigurationLabelProvider.getLabel(resolved);
|
|
143
|
+
if ((options === null || options === void 0 ? void 0 : options.startedByUser)
|
|
144
|
+
&& options.configuration.suppressMultipleSessionWarning !== true
|
|
145
|
+
&& this.sessions.some(s => this.sessionConfigurationLabelProvider.getLabel(s.options) === sessionConfigurationLabel)) {
|
|
146
|
+
const yes = await new browser_1.ConfirmDialog({
|
|
147
|
+
title: core_1.nls.localizeByDefault('Debug'),
|
|
148
|
+
msg: core_1.nls.localizeByDefault("'{0}' is already running. Do you want to start another instance?", sessionConfigurationLabel)
|
|
149
|
+
}).open();
|
|
150
|
+
if (!yes) {
|
|
151
|
+
return undefined;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
// preLaunchTask isn't run in case of auto restart as well as postDebugTask
|
|
155
|
+
if (!options.configuration.__restart) {
|
|
156
|
+
const taskRun = await this.runTask(options.workspaceFolderUri, resolved.configuration.preLaunchTask, true);
|
|
157
|
+
if (!taskRun) {
|
|
158
|
+
return undefined;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
const sessionId = await this.debug.createDebugSession(resolved.configuration, options.workspaceFolderUri);
|
|
162
|
+
return this.doStart(sessionId, resolved);
|
|
163
|
+
}
|
|
164
|
+
catch (e) {
|
|
165
|
+
if (debug_service_1.DebugError.NotFound.is(e)) {
|
|
166
|
+
this.messageService.error(core_1.nls.localize('theia/debug/debugSessionTypeNotSupported', 'The debug session type "{0}" is not supported.', e.data.type));
|
|
167
|
+
return undefined;
|
|
168
|
+
}
|
|
169
|
+
this.messageService.error(core_1.nls.localize('theia/debug/errorStartingDebugSession', 'There was an error starting the debug session, check the logs for more details.'));
|
|
170
|
+
console.error('Error starting the debug session', e);
|
|
171
|
+
throw e;
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
async startCompound(options) {
|
|
176
|
+
let configurations = [];
|
|
177
|
+
const compoundRoot = options.compound.stopAll ? new debug_session_options_1.DebugCompoundRoot() : undefined;
|
|
178
|
+
try {
|
|
179
|
+
configurations = this.getCompoundConfigurations(options, compoundRoot);
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
this.messageService.error(error.message);
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
if (options.compound.preLaunchTask) {
|
|
186
|
+
const taskRun = await this.runTask(options.workspaceFolderUri, options.compound.preLaunchTask, true);
|
|
187
|
+
if (!taskRun) {
|
|
188
|
+
return undefined;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
// Compound launch is a success only if each configuration launched successfully
|
|
192
|
+
const values = await Promise.all(configurations.map(async (configuration) => {
|
|
193
|
+
const newSession = await this.startConfiguration(configuration);
|
|
194
|
+
if (newSession) {
|
|
195
|
+
compoundRoot === null || compoundRoot === void 0 ? void 0 : compoundRoot.onDidSessionStop(() => newSession.stop(false, () => this.debug.terminateDebugSession(newSession.id)));
|
|
196
|
+
}
|
|
197
|
+
return newSession;
|
|
198
|
+
}));
|
|
199
|
+
const result = values.every(success => !!success);
|
|
200
|
+
return result;
|
|
201
|
+
}
|
|
202
|
+
getCompoundConfigurations(options, compoundRoot) {
|
|
203
|
+
const compound = options.compound;
|
|
204
|
+
if (!compound.configurations) {
|
|
205
|
+
throw new Error(core_1.nls.localizeByDefault('Compound must have "configurations" attribute set in order to start multiple configurations.'));
|
|
206
|
+
}
|
|
207
|
+
const configurations = [];
|
|
208
|
+
for (const configData of compound.configurations) {
|
|
209
|
+
const name = typeof configData === 'string' ? configData : configData.name;
|
|
210
|
+
if (name === compound.name) {
|
|
211
|
+
throw new Error(core_1.nls.localize('theia/debug/compound-cycle', "Launch configuration '{0}' contains a cycle with itself", name));
|
|
212
|
+
}
|
|
213
|
+
const workspaceFolderUri = typeof configData === 'string' ? options.workspaceFolderUri : configData.folder;
|
|
214
|
+
const matchingOptions = [...this.debugConfigurationManager.all]
|
|
215
|
+
.filter(option => option.name === name && !!option.configuration && option.workspaceFolderUri === workspaceFolderUri);
|
|
216
|
+
if (matchingOptions.length === 1) {
|
|
217
|
+
const match = matchingOptions[0];
|
|
218
|
+
if (debug_session_options_1.DebugSessionOptions.isConfiguration(match)) {
|
|
219
|
+
configurations.push({ ...match, compoundRoot, configuration: { ...match.configuration, noDebug: options.noDebug } });
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
throw new Error(core_1.nls.localizeByDefault("Could not find launch configuration '{0}' in the workspace.", name));
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
else {
|
|
226
|
+
throw new Error(matchingOptions.length === 0
|
|
227
|
+
? workspaceFolderUri
|
|
228
|
+
? core_1.nls.localizeByDefault("Can not find folder with name '{0}' for configuration '{1}' in compound '{2}'.", workspaceFolderUri, name, compound.name)
|
|
229
|
+
: core_1.nls.localizeByDefault("Could not find launch configuration '{0}' in the workspace.", name)
|
|
230
|
+
: core_1.nls.localizeByDefault("There are multiple launch configurations '{0}' in the workspace. Use folder name to qualify the configuration.", name));
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return configurations;
|
|
234
|
+
}
|
|
235
|
+
async fireWillStartDebugSession() {
|
|
236
|
+
await core_1.WaitUntilEvent.fire(this.onWillStartDebugSessionEmitter, {});
|
|
237
|
+
}
|
|
238
|
+
async resolveConfiguration(options) {
|
|
239
|
+
if (debug_session_options_1.InternalDebugSessionOptions.is(options)) {
|
|
240
|
+
return options;
|
|
241
|
+
}
|
|
242
|
+
const { workspaceFolderUri } = options;
|
|
243
|
+
let configuration = await this.resolveDebugConfiguration(options.configuration, workspaceFolderUri);
|
|
244
|
+
if (configuration) {
|
|
245
|
+
// Resolve command variables provided by the debugger
|
|
246
|
+
const commandIdVariables = await this.debug.provideDebuggerVariables(configuration.type);
|
|
247
|
+
configuration = await this.variableResolver.resolve(configuration, {
|
|
248
|
+
context: options.workspaceFolderUri ? new uri_1.default(options.workspaceFolderUri) : undefined,
|
|
249
|
+
configurationSection: 'launch',
|
|
250
|
+
commandIdVariables,
|
|
251
|
+
configuration
|
|
252
|
+
});
|
|
253
|
+
if (configuration) {
|
|
254
|
+
configuration = await this.resolveDebugConfigurationWithSubstitutedVariables(configuration, workspaceFolderUri);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
if (!configuration) {
|
|
258
|
+
return configuration;
|
|
259
|
+
}
|
|
260
|
+
const key = configuration.name + workspaceFolderUri;
|
|
261
|
+
const id = this.configurationIds.has(key) ? this.configurationIds.get(key) + 1 : 0;
|
|
262
|
+
this.configurationIds.set(key, id);
|
|
263
|
+
return {
|
|
264
|
+
id,
|
|
265
|
+
...options,
|
|
266
|
+
name: configuration.name,
|
|
267
|
+
configuration
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
async resolveDebugConfiguration(configuration, workspaceFolderUri) {
|
|
271
|
+
await this.fireWillResolveDebugConfiguration(configuration.type);
|
|
272
|
+
return this.debug.resolveDebugConfiguration(configuration, workspaceFolderUri);
|
|
273
|
+
}
|
|
274
|
+
async fireWillResolveDebugConfiguration(debugType) {
|
|
275
|
+
await core_1.WaitUntilEvent.fire(this.onWillResolveDebugConfigurationEmitter, { debugType });
|
|
276
|
+
}
|
|
277
|
+
async resolveDebugConfigurationWithSubstitutedVariables(configuration, workspaceFolderUri) {
|
|
278
|
+
return this.debug.resolveDebugConfigurationWithSubstitutedVariables(configuration, workspaceFolderUri);
|
|
279
|
+
}
|
|
280
|
+
async doStart(sessionId, options) {
|
|
281
|
+
const parentSession = options.configuration.parentSessionId ? this._sessions.get(options.configuration.parentSessionId) : undefined;
|
|
282
|
+
const contrib = this.sessionContributionRegistry.get(options.configuration.type);
|
|
283
|
+
const sessionFactory = contrib ? contrib.debugSessionFactory() : this.debugSessionFactory;
|
|
284
|
+
const session = sessionFactory.get(this, sessionId, options, parentSession);
|
|
285
|
+
this._sessions.set(sessionId, session);
|
|
286
|
+
this.debugTypeKey.set(session.configuration.type);
|
|
287
|
+
this.onDidCreateDebugSessionEmitter.fire(session);
|
|
288
|
+
let state = debug_session_1.DebugState.Inactive;
|
|
289
|
+
session.onDidChange(() => {
|
|
290
|
+
if (state !== session.state) {
|
|
291
|
+
state = session.state;
|
|
292
|
+
if (state === debug_session_1.DebugState.Stopped) {
|
|
293
|
+
this.onDidStopDebugSessionEmitter.fire(session);
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
this.updateCurrentSession(session);
|
|
297
|
+
});
|
|
298
|
+
session.onDidChangeBreakpoints(uri => this.fireDidChangeBreakpoints({ session, uri }));
|
|
299
|
+
session.on('terminated', async (event) => {
|
|
300
|
+
const restart = event.body && event.body.restart;
|
|
301
|
+
if (restart) {
|
|
302
|
+
// postDebugTask isn't run in case of auto restart as well as preLaunchTask
|
|
303
|
+
this.doRestart(session, !!restart);
|
|
304
|
+
}
|
|
305
|
+
else {
|
|
306
|
+
await session.disconnect(false, () => this.debug.terminateDebugSession(session.id));
|
|
307
|
+
await this.runTask(session.options.workspaceFolderUri, session.configuration.postDebugTask);
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
session.on('exited', async (event) => {
|
|
311
|
+
await session.disconnect(false, () => this.debug.terminateDebugSession(session.id));
|
|
312
|
+
});
|
|
313
|
+
session.onDispose(() => this.cleanup(session));
|
|
314
|
+
session.start().then(() => this.onDidStartDebugSessionEmitter.fire(session)).catch(e => {
|
|
315
|
+
session.stop(false, () => {
|
|
316
|
+
this.debug.terminateDebugSession(session.id);
|
|
317
|
+
});
|
|
318
|
+
});
|
|
319
|
+
session.onDidCustomEvent(({ event, body }) => this.onDidReceiveDebugSessionCustomEventEmitter.fire({ event, body, session }));
|
|
320
|
+
return session;
|
|
321
|
+
}
|
|
322
|
+
cleanup(session) {
|
|
323
|
+
// Data breakpoints belonging to this session that can't persist and aren't verified by some other session should be removed.
|
|
324
|
+
const currentDataBreakpoints = this.breakpoints.getDataBreakpoints();
|
|
325
|
+
const toRemove = currentDataBreakpoints.filter(candidate => !candidate.info.canPersist && this.sessions.every(otherSession => otherSession !== session
|
|
326
|
+
&& otherSession.getDataBreakpoints().every(otherSessionBp => otherSessionBp.id !== candidate.id || !otherSessionBp.verified)))
|
|
327
|
+
.map(bp => bp.id);
|
|
328
|
+
const toRetain = this.breakpoints.getDataBreakpoints().filter(candidate => !toRemove.includes(candidate.id));
|
|
329
|
+
if (currentDataBreakpoints.length !== toRetain.length) {
|
|
330
|
+
this.breakpoints.setDataBreakpoints(toRetain);
|
|
331
|
+
}
|
|
332
|
+
if (this.remove(session.id)) {
|
|
333
|
+
this.onDidDestroyDebugSessionEmitter.fire(session);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
async doRestart(session, isRestart) {
|
|
337
|
+
if (session.canRestart()) {
|
|
338
|
+
await session.restart();
|
|
339
|
+
return session;
|
|
340
|
+
}
|
|
341
|
+
const { options, configuration } = session;
|
|
342
|
+
session.stop(isRestart, () => this.debug.terminateDebugSession(session.id));
|
|
343
|
+
configuration.__restart = isRestart;
|
|
344
|
+
return this.start(options);
|
|
345
|
+
}
|
|
346
|
+
async terminateSession(session) {
|
|
347
|
+
if (!session) {
|
|
348
|
+
this.updateCurrentSession(this._currentSession);
|
|
349
|
+
session = this._currentSession;
|
|
350
|
+
}
|
|
351
|
+
if (session) {
|
|
352
|
+
if (session.options.compoundRoot) {
|
|
353
|
+
session.options.compoundRoot.stopSession();
|
|
354
|
+
}
|
|
355
|
+
else if (session.parentSession && session.configuration.lifecycleManagedByParent) {
|
|
356
|
+
this.terminateSession(session.parentSession);
|
|
357
|
+
}
|
|
358
|
+
else {
|
|
359
|
+
session.stop(false, () => this.debug.terminateDebugSession(session.id));
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
async restartSession(session) {
|
|
364
|
+
if (!session) {
|
|
365
|
+
this.updateCurrentSession(this._currentSession);
|
|
366
|
+
session = this._currentSession;
|
|
367
|
+
}
|
|
368
|
+
if (session) {
|
|
369
|
+
if (session.parentSession && session.configuration.lifecycleManagedByParent) {
|
|
370
|
+
return this.restartSession(session.parentSession);
|
|
371
|
+
}
|
|
372
|
+
else {
|
|
373
|
+
return this.doRestart(session, true);
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
remove(sessionId) {
|
|
378
|
+
const existed = this._sessions.delete(sessionId);
|
|
379
|
+
const { currentSession } = this;
|
|
380
|
+
if (currentSession && currentSession.id === sessionId) {
|
|
381
|
+
this.updateCurrentSession(undefined);
|
|
382
|
+
}
|
|
383
|
+
return existed;
|
|
384
|
+
}
|
|
385
|
+
getSession(sessionId) {
|
|
386
|
+
return this._sessions.get(sessionId);
|
|
387
|
+
}
|
|
388
|
+
get sessions() {
|
|
389
|
+
return Array.from(this._sessions.values()).filter(session => session.state > debug_session_1.DebugState.Inactive);
|
|
390
|
+
}
|
|
391
|
+
get currentSession() {
|
|
392
|
+
return this._currentSession;
|
|
393
|
+
}
|
|
394
|
+
set currentSession(current) {
|
|
395
|
+
if (this._currentSession === current) {
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
this.disposeOnCurrentSessionChanged.dispose();
|
|
399
|
+
const previous = this.currentSession;
|
|
400
|
+
this._currentSession = current;
|
|
401
|
+
this.onDidChangeActiveDebugSessionEmitter.fire({ previous, current });
|
|
402
|
+
if (current) {
|
|
403
|
+
this.disposeOnCurrentSessionChanged.push(current.onDidChange(() => {
|
|
404
|
+
if (this.currentFrame === this.topFrame) {
|
|
405
|
+
this.open('auto');
|
|
406
|
+
}
|
|
407
|
+
this.fireDidChange(current);
|
|
408
|
+
}));
|
|
409
|
+
this.disposeOnCurrentSessionChanged.push(current.onDidResolveLazyVariable(variable => this.onDidResolveLazyVariableEmitter.fire({ session: current, variable })));
|
|
410
|
+
this.disposeOnCurrentSessionChanged.push(current.onDidFocusStackFrame(frame => this.onDidFocusStackFrameEmitter.fire(frame)));
|
|
411
|
+
this.disposeOnCurrentSessionChanged.push(current.onDidFocusThread(thread => this.onDidFocusThreadEmitter.fire(thread)));
|
|
412
|
+
const { currentThread } = current;
|
|
413
|
+
this.onDidFocusThreadEmitter.fire(currentThread);
|
|
414
|
+
}
|
|
415
|
+
this.updateBreakpoints(previous, current);
|
|
416
|
+
this.open();
|
|
417
|
+
this.fireDidChange(current);
|
|
418
|
+
}
|
|
419
|
+
open(revealOption = 'center') {
|
|
420
|
+
const { currentFrame } = this;
|
|
421
|
+
if (currentFrame && currentFrame.thread.stopped) {
|
|
422
|
+
currentFrame.open({ revealOption });
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
updateBreakpoints(previous, current) {
|
|
426
|
+
const affectedUri = new Set();
|
|
427
|
+
for (const session of [previous, current]) {
|
|
428
|
+
if (session) {
|
|
429
|
+
for (const uriString of session.breakpointUris) {
|
|
430
|
+
if (!affectedUri.has(uriString)) {
|
|
431
|
+
affectedUri.add(uriString);
|
|
432
|
+
this.fireDidChangeBreakpoints({
|
|
433
|
+
session: current,
|
|
434
|
+
uri: new uri_1.default(uriString)
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
updateCurrentSession(session) {
|
|
442
|
+
this.currentSession = session || this.sessions[0];
|
|
443
|
+
}
|
|
444
|
+
get currentThread() {
|
|
445
|
+
const session = this.currentSession;
|
|
446
|
+
return session && session.currentThread;
|
|
447
|
+
}
|
|
448
|
+
get state() {
|
|
449
|
+
const session = this.currentSession;
|
|
450
|
+
return session ? session.state : debug_session_1.DebugState.Inactive;
|
|
451
|
+
}
|
|
452
|
+
get currentFrame() {
|
|
453
|
+
const { currentThread } = this;
|
|
454
|
+
return currentThread && currentThread.currentFrame;
|
|
455
|
+
}
|
|
456
|
+
get topFrame() {
|
|
457
|
+
const { currentThread } = this;
|
|
458
|
+
return currentThread && currentThread.topFrame;
|
|
459
|
+
}
|
|
460
|
+
getFunctionBreakpoints(session = this.currentSession) {
|
|
461
|
+
if (session && session.state > debug_session_1.DebugState.Initializing) {
|
|
462
|
+
return session.getFunctionBreakpoints();
|
|
463
|
+
}
|
|
464
|
+
const { labelProvider, breakpoints, editorManager } = this;
|
|
465
|
+
return this.breakpoints.getFunctionBreakpoints().map(origin => new debug_function_breakpoint_1.DebugFunctionBreakpoint(origin, { labelProvider, breakpoints, editorManager }));
|
|
466
|
+
}
|
|
467
|
+
getInstructionBreakpoints(session = this.currentSession) {
|
|
468
|
+
if (session && session.state > debug_session_1.DebugState.Initializing) {
|
|
469
|
+
return session.getInstructionBreakpoints();
|
|
470
|
+
}
|
|
471
|
+
const { labelProvider, breakpoints, editorManager } = this;
|
|
472
|
+
return this.breakpoints.getInstructionBreakpoints().map(origin => new debug_instruction_breakpoint_1.DebugInstructionBreakpoint(origin, { labelProvider, breakpoints, editorManager }));
|
|
473
|
+
}
|
|
474
|
+
getDataBreakpoints(session = this.currentSession) {
|
|
475
|
+
if (session && session.state > debug_session_1.DebugState.Initializing) {
|
|
476
|
+
return session.getDataBreakpoints();
|
|
477
|
+
}
|
|
478
|
+
const { labelProvider, breakpoints, editorManager } = this;
|
|
479
|
+
return this.breakpoints.getDataBreakpoints().map(origin => new debug_data_breakpoint_1.DebugDataBreakpoint(origin, { labelProvider, breakpoints, editorManager }));
|
|
480
|
+
}
|
|
481
|
+
getBreakpoints(arg, arg2) {
|
|
482
|
+
const uri = arg instanceof uri_1.default ? arg : undefined;
|
|
483
|
+
const session = arg instanceof debug_session_1.DebugSession ? arg : arg2 instanceof debug_session_1.DebugSession ? arg2 : this.currentSession;
|
|
484
|
+
if (session && session.state > debug_session_1.DebugState.Initializing) {
|
|
485
|
+
return session.getSourceBreakpoints(uri);
|
|
486
|
+
}
|
|
487
|
+
const { labelProvider, breakpoints, editorManager } = this;
|
|
488
|
+
return this.breakpoints.findMarkers({ uri }).map(({ data }) => new debug_source_breakpoint_1.DebugSourceBreakpoint(data, { labelProvider, breakpoints, editorManager }));
|
|
489
|
+
}
|
|
490
|
+
getLineBreakpoints(uri, line) {
|
|
491
|
+
const session = this.currentSession;
|
|
492
|
+
if (session && session.state > debug_session_1.DebugState.Initializing) {
|
|
493
|
+
return session.getSourceBreakpoints(uri).filter(breakpoint => breakpoint.line === line);
|
|
494
|
+
}
|
|
495
|
+
const { labelProvider, breakpoints, editorManager } = this;
|
|
496
|
+
return this.breakpoints.getLineBreakpoints(uri, line).map(origin => new debug_source_breakpoint_1.DebugSourceBreakpoint(origin, { labelProvider, breakpoints, editorManager }));
|
|
497
|
+
}
|
|
498
|
+
getInlineBreakpoint(uri, line, column) {
|
|
499
|
+
const session = this.currentSession;
|
|
500
|
+
if (session && session.state > debug_session_1.DebugState.Initializing) {
|
|
501
|
+
return session.getSourceBreakpoints(uri).filter(breakpoint => breakpoint.line === line && breakpoint.column === column)[0];
|
|
502
|
+
}
|
|
503
|
+
const origin = this.breakpoints.getInlineBreakpoint(uri, line, column);
|
|
504
|
+
const { labelProvider, breakpoints, editorManager } = this;
|
|
505
|
+
return origin && new debug_source_breakpoint_1.DebugSourceBreakpoint(origin, { labelProvider, breakpoints, editorManager });
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* Runs the given tasks.
|
|
509
|
+
* @param taskName the task name to run, see [TaskNameResolver](#TaskNameResolver)
|
|
510
|
+
* @return true if it allowed to continue debugging otherwise it returns false
|
|
511
|
+
*/
|
|
512
|
+
async runTask(workspaceFolderUri, taskName, checkErrors) {
|
|
513
|
+
if (!taskName) {
|
|
514
|
+
return true;
|
|
515
|
+
}
|
|
516
|
+
const taskInfo = await this.taskService.runWorkspaceTask(this.taskService.startUserAction(), workspaceFolderUri, taskName);
|
|
517
|
+
if (!checkErrors) {
|
|
518
|
+
return true;
|
|
519
|
+
}
|
|
520
|
+
const taskLabel = typeof taskName === 'string' ? taskName : JSON.stringify(taskName);
|
|
521
|
+
if (!taskInfo) {
|
|
522
|
+
return this.doPostTaskAction(core_1.nls.localize('theia/debug/couldNotRunTask', "Could not run the task '{0}'.", taskLabel));
|
|
523
|
+
}
|
|
524
|
+
const getExitCodePromise = this.taskService.getExitCode(taskInfo.taskId).then(result => ({ taskEndedType: task_service_1.TaskEndedTypes.TaskExited, value: result }));
|
|
525
|
+
const isBackgroundTaskEndedPromise = this.taskService.isBackgroundTaskEnded(taskInfo.taskId).then(result => ({ taskEndedType: task_service_1.TaskEndedTypes.BackgroundTaskEnded, value: result }));
|
|
526
|
+
// After start running the task, we wait for the task process to exit and if it is a background task, we also wait for a feedback
|
|
527
|
+
// that a background task is active, as soon as one of the promises fulfills, we can continue and analyze the results.
|
|
528
|
+
const taskEndedInfo = await Promise.race([getExitCodePromise, isBackgroundTaskEndedPromise]);
|
|
529
|
+
if (taskEndedInfo.taskEndedType === task_service_1.TaskEndedTypes.BackgroundTaskEnded && taskEndedInfo.value) {
|
|
530
|
+
return true;
|
|
531
|
+
}
|
|
532
|
+
if (taskEndedInfo.taskEndedType === task_service_1.TaskEndedTypes.TaskExited && taskEndedInfo.value === 0) {
|
|
533
|
+
return true;
|
|
534
|
+
}
|
|
535
|
+
else if (taskEndedInfo.taskEndedType === task_service_1.TaskEndedTypes.TaskExited && taskEndedInfo.value !== undefined) {
|
|
536
|
+
return this.doPostTaskAction(core_1.nls.localize('theia/debug/taskTerminatedWithExitCode', "Task '{0}' terminated with exit code {1}.", taskLabel, taskEndedInfo.value));
|
|
537
|
+
}
|
|
538
|
+
else {
|
|
539
|
+
const signal = await this.taskService.getTerminateSignal(taskInfo.taskId);
|
|
540
|
+
if (signal !== undefined) {
|
|
541
|
+
return this.doPostTaskAction(core_1.nls.localize('theia/debug/taskTerminatedBySignal', "Task '{0}' terminated by signal {1}.", taskLabel, signal));
|
|
542
|
+
}
|
|
543
|
+
else {
|
|
544
|
+
return this.doPostTaskAction(core_1.nls.localize('theia/debug/taskTerminatedForUnknownReason', "Task '{0}' terminated for unknown reason.", taskLabel));
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
async doPostTaskAction(errorMessage) {
|
|
549
|
+
const actions = [
|
|
550
|
+
core_1.nls.localizeByDefault('Open {0}', 'launch.json'),
|
|
551
|
+
core_1.nls.localizeByDefault('Cancel'),
|
|
552
|
+
core_1.nls.localizeByDefault('Configure Task'),
|
|
553
|
+
core_1.nls.localizeByDefault('Debug Anyway')
|
|
554
|
+
];
|
|
555
|
+
const result = await this.messageService.error(errorMessage, ...actions);
|
|
556
|
+
switch (result) {
|
|
557
|
+
case actions[0]: // open launch.json
|
|
558
|
+
this.debugConfigurationManager.openConfiguration();
|
|
559
|
+
return false;
|
|
560
|
+
case actions[1]: // cancel
|
|
561
|
+
return false;
|
|
562
|
+
case actions[2]: // configure tasks
|
|
563
|
+
this.quickOpenTask.configure();
|
|
564
|
+
return false;
|
|
565
|
+
default: // continue debugging
|
|
566
|
+
return true;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
};
|
|
570
|
+
exports.DebugSessionManager = DebugSessionManager;
|
|
571
|
+
tslib_1.__decorate([
|
|
572
|
+
(0, inversify_1.inject)(debug_session_contribution_1.DebugSessionFactory),
|
|
573
|
+
tslib_1.__metadata("design:type", Object)
|
|
574
|
+
], DebugSessionManager.prototype, "debugSessionFactory", void 0);
|
|
575
|
+
tslib_1.__decorate([
|
|
576
|
+
(0, inversify_1.inject)(debug_service_1.DebugService),
|
|
577
|
+
tslib_1.__metadata("design:type", Object)
|
|
578
|
+
], DebugSessionManager.prototype, "debug", void 0);
|
|
579
|
+
tslib_1.__decorate([
|
|
580
|
+
(0, inversify_1.inject)(browser_1.LabelProvider),
|
|
581
|
+
tslib_1.__metadata("design:type", browser_1.LabelProvider)
|
|
582
|
+
], DebugSessionManager.prototype, "labelProvider", void 0);
|
|
583
|
+
tslib_1.__decorate([
|
|
584
|
+
(0, inversify_1.inject)(browser_2.EditorManager),
|
|
585
|
+
tslib_1.__metadata("design:type", browser_2.EditorManager)
|
|
586
|
+
], DebugSessionManager.prototype, "editorManager", void 0);
|
|
587
|
+
tslib_1.__decorate([
|
|
588
|
+
(0, inversify_1.inject)(breakpoint_manager_1.BreakpointManager),
|
|
589
|
+
tslib_1.__metadata("design:type", breakpoint_manager_1.BreakpointManager)
|
|
590
|
+
], DebugSessionManager.prototype, "breakpoints", void 0);
|
|
591
|
+
tslib_1.__decorate([
|
|
592
|
+
(0, inversify_1.inject)(browser_3.VariableResolverService),
|
|
593
|
+
tslib_1.__metadata("design:type", browser_3.VariableResolverService)
|
|
594
|
+
], DebugSessionManager.prototype, "variableResolver", void 0);
|
|
595
|
+
tslib_1.__decorate([
|
|
596
|
+
(0, inversify_1.inject)(debug_session_contribution_1.DebugSessionContributionRegistry),
|
|
597
|
+
tslib_1.__metadata("design:type", Object)
|
|
598
|
+
], DebugSessionManager.prototype, "sessionContributionRegistry", void 0);
|
|
599
|
+
tslib_1.__decorate([
|
|
600
|
+
(0, inversify_1.inject)(core_1.MessageService),
|
|
601
|
+
tslib_1.__metadata("design:type", core_1.MessageService)
|
|
602
|
+
], DebugSessionManager.prototype, "messageService", void 0);
|
|
603
|
+
tslib_1.__decorate([
|
|
604
|
+
(0, inversify_1.inject)(core_1.ProgressService),
|
|
605
|
+
tslib_1.__metadata("design:type", core_1.ProgressService)
|
|
606
|
+
], DebugSessionManager.prototype, "progressService", void 0);
|
|
607
|
+
tslib_1.__decorate([
|
|
608
|
+
(0, inversify_1.inject)(context_key_service_1.ContextKeyService),
|
|
609
|
+
tslib_1.__metadata("design:type", Object)
|
|
610
|
+
], DebugSessionManager.prototype, "contextKeyService", void 0);
|
|
611
|
+
tslib_1.__decorate([
|
|
612
|
+
(0, inversify_1.inject)(task_service_1.TaskService),
|
|
613
|
+
tslib_1.__metadata("design:type", task_service_1.TaskService)
|
|
614
|
+
], DebugSessionManager.prototype, "taskService", void 0);
|
|
615
|
+
tslib_1.__decorate([
|
|
616
|
+
(0, inversify_1.inject)(debug_configuration_manager_1.DebugConfigurationManager),
|
|
617
|
+
tslib_1.__metadata("design:type", debug_configuration_manager_1.DebugConfigurationManager)
|
|
618
|
+
], DebugSessionManager.prototype, "debugConfigurationManager", void 0);
|
|
619
|
+
tslib_1.__decorate([
|
|
620
|
+
(0, inversify_1.inject)(quick_open_task_1.QuickOpenTask),
|
|
621
|
+
tslib_1.__metadata("design:type", quick_open_task_1.QuickOpenTask)
|
|
622
|
+
], DebugSessionManager.prototype, "quickOpenTask", void 0);
|
|
623
|
+
tslib_1.__decorate([
|
|
624
|
+
(0, inversify_1.inject)(browser_1.ApplicationShell),
|
|
625
|
+
tslib_1.__metadata("design:type", browser_1.ApplicationShell)
|
|
626
|
+
], DebugSessionManager.prototype, "shell", void 0);
|
|
627
|
+
tslib_1.__decorate([
|
|
628
|
+
(0, inversify_1.inject)(debug_session_configuration_label_provider_1.DebugSessionConfigurationLabelProvider),
|
|
629
|
+
tslib_1.__metadata("design:type", debug_session_configuration_label_provider_1.DebugSessionConfigurationLabelProvider)
|
|
630
|
+
], DebugSessionManager.prototype, "sessionConfigurationLabelProvider", void 0);
|
|
631
|
+
tslib_1.__decorate([
|
|
632
|
+
(0, inversify_1.postConstruct)(),
|
|
633
|
+
tslib_1.__metadata("design:type", Function),
|
|
634
|
+
tslib_1.__metadata("design:paramtypes", []),
|
|
635
|
+
tslib_1.__metadata("design:returntype", void 0)
|
|
636
|
+
], DebugSessionManager.prototype, "init", null);
|
|
637
|
+
exports.DebugSessionManager = DebugSessionManager = tslib_1.__decorate([
|
|
638
|
+
(0, inversify_1.injectable)()
|
|
639
|
+
], DebugSessionManager);
|
|
640
|
+
//# sourceMappingURL=debug-session-manager.js.map
|