@theia/debug 1.67.0-next.3 → 1.67.0-next.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +15 -15
- package/src/browser/breakpoint/breakpoint-manager.ts +69 -16
- package/src/browser/breakpoint/breakpoint-marker.ts +38 -0
- package/src/browser/breakpoint/debug-data-breakpoint-actions.ts +170 -0
- package/src/browser/console/debug-console-items.tsx +5 -1
- package/src/browser/debug-frontend-application-contribution.ts +52 -0
- package/src/browser/debug-frontend-module.ts +4 -0
- package/src/browser/debug-session-manager.ts +18 -0
- package/src/browser/debug-session.tsx +31 -0
- package/src/browser/editor/debug-expression-provider.ts +49 -4
- package/src/browser/editor/debug-hover-widget.ts +7 -52
- package/src/browser/model/debug-data-breakpoint.tsx +79 -0
- package/src/browser/style/index.css +4 -0
- package/src/browser/view/debug-breakpoints-source.tsx +4 -10
- package/src/browser/view/debug-stack-frames-widget.ts +6 -2
- package/src/browser/view/debug-variables-widget.ts +99 -2
- package/src/browser/view/debug-view-model.ts +5 -0
- package/lib/browser/breakpoint/breakpoint-manager.d.ts +0 -71
- package/lib/browser/breakpoint/breakpoint-manager.d.ts.map +0 -1
- package/lib/browser/breakpoint/breakpoint-manager.js +0 -321
- package/lib/browser/breakpoint/breakpoint-manager.js.map +0 -1
- package/lib/browser/breakpoint/breakpoint-marker.d.ts +0 -42
- package/lib/browser/breakpoint/breakpoint-marker.d.ts.map +0 -1
- package/lib/browser/breakpoint/breakpoint-marker.js +0 -88
- package/lib/browser/breakpoint/breakpoint-marker.js.map +0 -1
- package/lib/browser/console/debug-console-contribution.d.ts +0 -45
- package/lib/browser/console/debug-console-contribution.d.ts.map +0 -1
- package/lib/browser/console/debug-console-contribution.js +0 -233
- package/lib/browser/console/debug-console-contribution.js.map +0 -1
- package/lib/browser/console/debug-console-items.d.ts +0 -97
- package/lib/browser/console/debug-console-items.d.ts.map +0 -1
- package/lib/browser/console/debug-console-items.js +0 -343
- package/lib/browser/console/debug-console-items.js.map +0 -1
- package/lib/browser/console/debug-console-session.d.ts +0 -32
- package/lib/browser/console/debug-console-session.d.ts.map +0 -1
- package/lib/browser/console/debug-console-session.js +0 -192
- package/lib/browser/console/debug-console-session.js.map +0 -1
- package/lib/browser/debug-call-stack-item-type-key.d.ts +0 -4
- package/lib/browser/debug-call-stack-item-type-key.d.ts.map +0 -1
- package/lib/browser/debug-call-stack-item-type-key.js +0 -20
- package/lib/browser/debug-call-stack-item-type-key.js.map +0 -1
- package/lib/browser/debug-configuration-manager.d.ts +0 -103
- package/lib/browser/debug-configuration-manager.d.ts.map +0 -1
- package/lib/browser/debug-configuration-manager.js +0 -545
- package/lib/browser/debug-configuration-manager.js.map +0 -1
- package/lib/browser/debug-configuration-model.d.ts +0 -30
- package/lib/browser/debug-configuration-model.d.ts.map +0 -1
- package/lib/browser/debug-configuration-model.js +0 -80
- package/lib/browser/debug-configuration-model.js.map +0 -1
- package/lib/browser/debug-contribution.d.ts +0 -23
- package/lib/browser/debug-contribution.d.ts.map +0 -1
- package/lib/browser/debug-contribution.js +0 -20
- package/lib/browser/debug-contribution.js.map +0 -1
- package/lib/browser/debug-frontend-application-contribution.d.ts +0 -246
- package/lib/browser/debug-frontend-application-contribution.d.ts.map +0 -1
- package/lib/browser/debug-frontend-application-contribution.js +0 -1645
- package/lib/browser/debug-frontend-application-contribution.js.map +0 -1
- package/lib/browser/debug-frontend-module.d.ts +0 -5
- package/lib/browser/debug-frontend-module.d.ts.map +0 -1
- package/lib/browser/debug-frontend-module.js +0 -108
- package/lib/browser/debug-frontend-module.js.map +0 -1
- package/lib/browser/debug-package.spec.d.ts +0 -1
- package/lib/browser/debug-package.spec.d.ts.map +0 -1
- package/lib/browser/debug-package.spec.js +0 -19
- package/lib/browser/debug-package.spec.js.map +0 -1
- package/lib/browser/debug-prefix-configuration.d.ts +0 -52
- package/lib/browser/debug-prefix-configuration.d.ts.map +0 -1
- package/lib/browser/debug-prefix-configuration.js +0 -202
- package/lib/browser/debug-prefix-configuration.js.map +0 -1
- package/lib/browser/debug-resource.d.ts +0 -15
- package/lib/browser/debug-resource.d.ts.map +0 -1
- package/lib/browser/debug-resource.js +0 -58
- package/lib/browser/debug-resource.js.map +0 -1
- package/lib/browser/debug-schema-updater.d.ts +0 -14
- package/lib/browser/debug-schema-updater.d.ts.map +0 -1
- package/lib/browser/debug-schema-updater.js +0 -161
- package/lib/browser/debug-schema-updater.js.map +0 -1
- package/lib/browser/debug-session-configuration-label-provider.d.ts +0 -11
- package/lib/browser/debug-session-configuration-label-provider.d.ts.map +0 -1
- package/lib/browser/debug-session-configuration-label-provider.js +0 -48
- package/lib/browser/debug-session-configuration-label-provider.js.map +0 -1
- package/lib/browser/debug-session-configuration-label-provider.spec.d.ts +0 -2
- package/lib/browser/debug-session-configuration-label-provider.spec.d.ts.map +0 -1
- package/lib/browser/debug-session-configuration-label-provider.spec.js +0 -84
- package/lib/browser/debug-session-configuration-label-provider.spec.js.map +0 -1
- package/lib/browser/debug-session-connection.d.ts +0 -111
- package/lib/browser/debug-session-connection.d.ts.map +0 -1
- package/lib/browser/debug-session-connection.js +0 -259
- package/lib/browser/debug-session-connection.js.map +0 -1
- package/lib/browser/debug-session-contribution.d.ts +0 -77
- package/lib/browser/debug-session-contribution.d.ts.map +0 -1
- package/lib/browser/debug-session-contribution.js +0 -143
- package/lib/browser/debug-session-contribution.js.map +0 -1
- package/lib/browser/debug-session-manager.d.ts +0 -138
- package/lib/browser/debug-session-manager.d.ts.map +0 -1
- package/lib/browser/debug-session-manager.js +0 -620
- package/lib/browser/debug-session-manager.js.map +0 -1
- package/lib/browser/debug-session-options.d.ts +0 -56
- package/lib/browser/debug-session-options.d.ts.map +0 -1
- package/lib/browser/debug-session-options.js +0 -92
- package/lib/browser/debug-session-options.js.map +0 -1
- package/lib/browser/debug-session.d.ts +0 -192
- package/lib/browser/debug-session.d.ts.map +0 -1
- package/lib/browser/debug-session.js +0 -913
- package/lib/browser/debug-session.js.map +0 -1
- package/lib/browser/debug-tab-bar-decorator.d.ts +0 -17
- package/lib/browser/debug-tab-bar-decorator.d.ts.map +0 -1
- package/lib/browser/debug-tab-bar-decorator.js +0 -63
- package/lib/browser/debug-tab-bar-decorator.js.map +0 -1
- package/lib/browser/debug-watch-manager.d.ts +0 -22
- package/lib/browser/debug-watch-manager.d.ts.map +0 -1
- package/lib/browser/debug-watch-manager.js +0 -86
- package/lib/browser/debug-watch-manager.js.map +0 -1
- package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.d.ts +0 -7
- package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.d.ts.map +0 -1
- package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.js +0 -39
- package/lib/browser/disassembly-view/disassembly-view-accessibility-provider.js.map +0 -1
- package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.d.ts +0 -20
- package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.d.ts.map +0 -1
- package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.js +0 -111
- package/lib/browser/disassembly-view/disassembly-view-breakpoint-renderer.js.map +0 -1
- package/lib/browser/disassembly-view/disassembly-view-contribution.d.ts +0 -25
- package/lib/browser/disassembly-view/disassembly-view-contribution.d.ts.map +0 -1
- package/lib/browser/disassembly-view/disassembly-view-contribution.js +0 -124
- package/lib/browser/disassembly-view/disassembly-view-contribution.js.map +0 -1
- package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.d.ts +0 -39
- package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.d.ts.map +0 -1
- package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.js +0 -213
- package/lib/browser/disassembly-view/disassembly-view-instruction-renderer.js.map +0 -1
- package/lib/browser/disassembly-view/disassembly-view-table-delegate.d.ts +0 -16
- package/lib/browser/disassembly-view/disassembly-view-table-delegate.d.ts.map +0 -1
- package/lib/browser/disassembly-view/disassembly-view-table-delegate.js +0 -39
- package/lib/browser/disassembly-view/disassembly-view-table-delegate.js.map +0 -1
- package/lib/browser/disassembly-view/disassembly-view-utilities.d.ts +0 -38
- package/lib/browser/disassembly-view/disassembly-view-utilities.d.ts.map +0 -1
- package/lib/browser/disassembly-view/disassembly-view-utilities.js +0 -18
- package/lib/browser/disassembly-view/disassembly-view-utilities.js.map +0 -1
- package/lib/browser/disassembly-view/disassembly-view-widget.d.ts +0 -61
- package/lib/browser/disassembly-view/disassembly-view-widget.d.ts.map +0 -1
- package/lib/browser/disassembly-view/disassembly-view-widget.js +0 -446
- package/lib/browser/disassembly-view/disassembly-view-widget.js.map +0 -1
- package/lib/browser/editor/debug-breakpoint-widget.d.ts +0 -58
- package/lib/browser/editor/debug-breakpoint-widget.d.ts.map +0 -1
- package/lib/browser/editor/debug-breakpoint-widget.js +0 -270
- package/lib/browser/editor/debug-breakpoint-widget.js.map +0 -1
- package/lib/browser/editor/debug-editor-model.d.ts +0 -87
- package/lib/browser/editor/debug-editor-model.d.ts.map +0 -1
- package/lib/browser/editor/debug-editor-model.js +0 -499
- package/lib/browser/editor/debug-editor-model.js.map +0 -1
- package/lib/browser/editor/debug-editor-service.d.ts +0 -38
- package/lib/browser/editor/debug-editor-service.d.ts.map +0 -1
- package/lib/browser/editor/debug-editor-service.js +0 -183
- package/lib/browser/editor/debug-editor-service.js.map +0 -1
- package/lib/browser/editor/debug-editor.d.ts +0 -4
- package/lib/browser/editor/debug-editor.d.ts.map +0 -1
- package/lib/browser/editor/debug-editor.js +0 -20
- package/lib/browser/editor/debug-editor.js.map +0 -1
- package/lib/browser/editor/debug-exception-widget.d.ts +0 -30
- package/lib/browser/editor/debug-exception-widget.d.ts.map +0 -1
- package/lib/browser/editor/debug-exception-widget.js +0 -107
- package/lib/browser/editor/debug-exception-widget.js.map +0 -1
- package/lib/browser/editor/debug-expression-provider.d.ts +0 -12
- package/lib/browser/editor/debug-expression-provider.d.ts.map +0 -1
- package/lib/browser/editor/debug-expression-provider.js +0 -77
- package/lib/browser/editor/debug-expression-provider.js.map +0 -1
- package/lib/browser/editor/debug-hover-source.d.ts +0 -19
- package/lib/browser/editor/debug-hover-source.d.ts.map +0 -1
- package/lib/browser/editor/debug-hover-source.js +0 -110
- package/lib/browser/editor/debug-hover-source.js.map +0 -1
- package/lib/browser/editor/debug-hover-widget.d.ts +0 -61
- package/lib/browser/editor/debug-hover-widget.d.ts.map +0 -1
- package/lib/browser/editor/debug-hover-widget.js +0 -304
- package/lib/browser/editor/debug-hover-widget.js.map +0 -1
- package/lib/browser/editor/debug-inline-value-decorator.d.ts +0 -20
- package/lib/browser/editor/debug-inline-value-decorator.d.ts.map +0 -1
- package/lib/browser/editor/debug-inline-value-decorator.js +0 -326
- package/lib/browser/editor/debug-inline-value-decorator.js.map +0 -1
- package/lib/browser/model/debug-breakpoint.d.ts +0 -48
- package/lib/browser/model/debug-breakpoint.d.ts.map +0 -1
- package/lib/browser/model/debug-breakpoint.js +0 -111
- package/lib/browser/model/debug-breakpoint.js.map +0 -1
- package/lib/browser/model/debug-function-breakpoint.d.ts +0 -19
- package/lib/browser/model/debug-function-breakpoint.d.ts.map +0 -1
- package/lib/browser/model/debug-function-breakpoint.js +0 -93
- package/lib/browser/model/debug-function-breakpoint.js.map +0 -1
- package/lib/browser/model/debug-instruction-breakpoint.d.ts +0 -15
- package/lib/browser/model/debug-instruction-breakpoint.d.ts.map +0 -1
- package/lib/browser/model/debug-instruction-breakpoint.js +0 -66
- package/lib/browser/model/debug-instruction-breakpoint.js.map +0 -1
- package/lib/browser/model/debug-source-breakpoint.d.ts +0 -39
- package/lib/browser/model/debug-source-breakpoint.d.ts.map +0 -1
- package/lib/browser/model/debug-source-breakpoint.js +0 -219
- package/lib/browser/model/debug-source-breakpoint.js.map +0 -1
- package/lib/browser/model/debug-source.d.ts +0 -25
- package/lib/browser/model/debug-source.d.ts.map +0 -1
- package/lib/browser/model/debug-source.js +0 -81
- package/lib/browser/model/debug-source.js.map +0 -1
- package/lib/browser/model/debug-stack-frame.d.ts +0 -45
- package/lib/browser/model/debug-stack-frame.d.ts.map +0 -1
- package/lib/browser/model/debug-stack-frame.js +0 -157
- package/lib/browser/model/debug-stack-frame.js.map +0 -1
- package/lib/browser/model/debug-thread.d.ts +0 -68
- package/lib/browser/model/debug-thread.d.ts.map +0 -1
- package/lib/browser/model/debug-thread.js +0 -262
- package/lib/browser/model/debug-thread.js.map +0 -1
- package/lib/browser/view/debug-action.d.ts +0 -18
- package/lib/browser/view/debug-action.d.ts.map +0 -1
- package/lib/browser/view/debug-action.js +0 -44
- package/lib/browser/view/debug-action.js.map +0 -1
- package/lib/browser/view/debug-breakpoints-source.d.ts +0 -10
- package/lib/browser/view/debug-breakpoints-source.d.ts.map +0 -1
- package/lib/browser/view/debug-breakpoints-source.js +0 -63
- package/lib/browser/view/debug-breakpoints-source.js.map +0 -1
- package/lib/browser/view/debug-breakpoints-widget.d.ts +0 -23
- package/lib/browser/view/debug-breakpoints-widget.d.ts.map +0 -1
- package/lib/browser/view/debug-breakpoints-widget.js +0 -81
- package/lib/browser/view/debug-breakpoints-widget.js.map +0 -1
- package/lib/browser/view/debug-configuration-select.d.ts +0 -67
- package/lib/browser/view/debug-configuration-select.d.ts.map +0 -1
- package/lib/browser/view/debug-configuration-select.js +0 -212
- package/lib/browser/view/debug-configuration-select.js.map +0 -1
- package/lib/browser/view/debug-configuration-widget.d.ts +0 -33
- package/lib/browser/view/debug-configuration-widget.d.ts.map +0 -1
- package/lib/browser/view/debug-configuration-widget.js +0 -137
- package/lib/browser/view/debug-configuration-widget.js.map +0 -1
- package/lib/browser/view/debug-exception-breakpoint.d.ts +0 -15
- package/lib/browser/view/debug-exception-breakpoint.d.ts.map +0 -1
- package/lib/browser/view/debug-exception-breakpoint.js +0 -62
- package/lib/browser/view/debug-exception-breakpoint.js.map +0 -1
- package/lib/browser/view/debug-session-widget.d.ts +0 -29
- package/lib/browser/view/debug-session-widget.d.ts.map +0 -1
- package/lib/browser/view/debug-session-widget.js +0 -127
- package/lib/browser/view/debug-session-widget.js.map +0 -1
- package/lib/browser/view/debug-stack-frames-source.d.ts +0 -18
- package/lib/browser/view/debug-stack-frames-source.d.ts.map +0 -1
- package/lib/browser/view/debug-stack-frames-source.js +0 -83
- package/lib/browser/view/debug-stack-frames-source.js.map +0 -1
- package/lib/browser/view/debug-stack-frames-widget.d.ts +0 -25
- package/lib/browser/view/debug-stack-frames-widget.d.ts.map +0 -1
- package/lib/browser/view/debug-stack-frames-widget.js +0 -147
- package/lib/browser/view/debug-stack-frames-widget.js.map +0 -1
- package/lib/browser/view/debug-threads-source.d.ts +0 -9
- package/lib/browser/view/debug-threads-source.d.ts.map +0 -1
- package/lib/browser/view/debug-threads-source.js +0 -56
- package/lib/browser/view/debug-threads-source.js.map +0 -1
- package/lib/browser/view/debug-threads-widget.d.ts +0 -27
- package/lib/browser/view/debug-threads-widget.d.ts.map +0 -1
- package/lib/browser/view/debug-threads-widget.js +0 -139
- package/lib/browser/view/debug-threads-widget.js.map +0 -1
- package/lib/browser/view/debug-toolbar-widget.d.ts +0 -34
- package/lib/browser/view/debug-toolbar-widget.d.ts.map +0 -1
- package/lib/browser/view/debug-toolbar-widget.js +0 -139
- package/lib/browser/view/debug-toolbar-widget.js.map +0 -1
- package/lib/browser/view/debug-variables-source.d.ts +0 -10
- package/lib/browser/view/debug-variables-source.d.ts.map +0 -1
- package/lib/browser/view/debug-variables-source.js +0 -53
- package/lib/browser/view/debug-variables-source.js.map +0 -1
- package/lib/browser/view/debug-variables-widget.d.ts +0 -17
- package/lib/browser/view/debug-variables-widget.d.ts.map +0 -1
- package/lib/browser/view/debug-variables-widget.js +0 -71
- package/lib/browser/view/debug-variables-widget.js.map +0 -1
- package/lib/browser/view/debug-view-model.d.ts +0 -53
- package/lib/browser/view/debug-view-model.d.ts.map +0 -1
- package/lib/browser/view/debug-view-model.js +0 -212
- package/lib/browser/view/debug-view-model.js.map +0 -1
- package/lib/browser/view/debug-watch-expression.d.ts +0 -33
- package/lib/browser/view/debug-watch-expression.d.ts.map +0 -1
- package/lib/browser/view/debug-watch-expression.js +0 -93
- package/lib/browser/view/debug-watch-expression.js.map +0 -1
- package/lib/browser/view/debug-watch-source.d.ts +0 -10
- package/lib/browser/view/debug-watch-source.d.ts.map +0 -1
- package/lib/browser/view/debug-watch-source.js +0 -51
- package/lib/browser/view/debug-watch-source.js.map +0 -1
- package/lib/browser/view/debug-watch-widget.d.ts +0 -17
- package/lib/browser/view/debug-watch-widget.d.ts.map +0 -1
- package/lib/browser/view/debug-watch-widget.js +0 -71
- package/lib/browser/view/debug-watch-widget.js.map +0 -1
- package/lib/browser/view/debug-widget.d.ts +0 -24
- package/lib/browser/view/debug-widget.d.ts.map +0 -1
- package/lib/browser/view/debug-widget.js +0 -101
- package/lib/browser/view/debug-widget.js.map +0 -1
- package/lib/common/debug-adapter-contribution-registry.d.ts +0 -60
- package/lib/common/debug-adapter-contribution-registry.d.ts.map +0 -1
- package/lib/common/debug-adapter-contribution-registry.js +0 -205
- package/lib/common/debug-adapter-contribution-registry.js.map +0 -1
- package/lib/common/debug-adapter-session.d.ts +0 -19
- package/lib/common/debug-adapter-session.d.ts.map +0 -1
- package/lib/common/debug-adapter-session.js +0 -79
- package/lib/common/debug-adapter-session.js.map +0 -1
- package/lib/common/debug-common.d.ts +0 -2
- package/lib/common/debug-common.d.ts.map +0 -1
- package/lib/common/debug-common.js +0 -21
- package/lib/common/debug-common.js.map +0 -1
- package/lib/common/debug-compound.d.ts +0 -15
- package/lib/common/debug-compound.d.ts.map +0 -1
- package/lib/common/debug-compound.js +0 -28
- package/lib/common/debug-compound.js.map +0 -1
- package/lib/common/debug-configuration.d.ts +0 -77
- package/lib/common/debug-configuration.d.ts.map +0 -1
- package/lib/common/debug-configuration.js +0 -32
- package/lib/common/debug-configuration.js.map +0 -1
- package/lib/common/debug-model.d.ts +0 -153
- package/lib/common/debug-model.d.ts.map +0 -1
- package/lib/common/debug-model.js +0 -36
- package/lib/common/debug-model.js.map +0 -1
- package/lib/common/debug-preferences.d.ts +0 -18
- package/lib/common/debug-preferences.d.ts.map +0 -1
- package/lib/common/debug-preferences.js +0 -89
- package/lib/common/debug-preferences.js.map +0 -1
- package/lib/common/debug-service.d.ts +0 -124
- package/lib/common/debug-service.d.ts.map +0 -1
- package/lib/common/debug-service.js +0 -67
- package/lib/common/debug-service.js.map +0 -1
- package/lib/common/debug-uri-utils.d.ts +0 -24
- package/lib/common/debug-uri-utils.d.ts.map +0 -1
- package/lib/common/debug-uri-utils.js +0 -27
- package/lib/common/debug-uri-utils.js.map +0 -1
- package/lib/common/inline-debug-adapter.d.ts +0 -19
- package/lib/common/inline-debug-adapter.d.ts.map +0 -1
- package/lib/common/inline-debug-adapter.js +0 -45
- package/lib/common/inline-debug-adapter.js.map +0 -1
- package/lib/common/launch-preferences.d.ts +0 -6
- package/lib/common/launch-preferences.d.ts.map +0 -1
- package/lib/common/launch-preferences.js +0 -37
- package/lib/common/launch-preferences.js.map +0 -1
- package/lib/node/debug-adapter-factory.d.ts +0 -20
- package/lib/node/debug-adapter-factory.d.ts.map +0 -1
- package/lib/node/debug-adapter-factory.js +0 -89
- package/lib/node/debug-adapter-factory.js.map +0 -1
- package/lib/node/debug-adapter-session-manager.d.ts +0 -38
- package/lib/node/debug-adapter-session-manager.d.ts.map +0 -1
- package/lib/node/debug-adapter-session-manager.js +0 -104
- package/lib/node/debug-adapter-session-manager.js.map +0 -1
- package/lib/node/debug-backend-module.d.ts +0 -4
- package/lib/node/debug-backend-module.d.ts.map +0 -1
- package/lib/node/debug-backend-module.js +0 -45
- package/lib/node/debug-backend-module.js.map +0 -1
- package/lib/node/debug-service-impl.d.ts +0 -31
- package/lib/node/debug-service-impl.d.ts.map +0 -1
- package/lib/node/debug-service-impl.js +0 -117
- package/lib/node/debug-service-impl.js.map +0 -1
- package/lib/node/stream-debug-adapter.d.ts +0 -41
- package/lib/node/stream-debug-adapter.d.ts.map +0 -1
- package/lib/node/stream-debug-adapter.js +0 -113
- package/lib/node/stream-debug-adapter.js.map +0 -1
package/README.md
CHANGED
|
@@ -41,7 +41,7 @@ At the back-end we start a debug adapter using `DebugAdapterFactory` and then a
|
|
|
41
41
|
|
|
42
42
|
## Additional Information
|
|
43
43
|
|
|
44
|
-
* [API documentation for `@theia/debug`](https://eclipse-theia.github.io/theia/docs/next/modules/
|
|
44
|
+
* [API documentation for `@theia/debug`](https://eclipse-theia.github.io/theia/docs/next/modules/_theia_debug.html)
|
|
45
45
|
* [Theia - GitHub](https://github.com/eclipse-theia/theia)
|
|
46
46
|
* [Theia - Website](https://theia-ide.org/)
|
|
47
47
|
* [Debug Adapter Protocol](https://github.com/Microsoft/vscode-debugadapter-node/blob/master/protocol/src/debugProtocol.ts)
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theia/debug",
|
|
3
|
-
"version": "1.67.0-next.
|
|
3
|
+
"version": "1.67.0-next.56+d8f18cc386c",
|
|
4
4
|
"description": "Theia - Debug Extension",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@theia/console": "1.67.0-next.
|
|
7
|
-
"@theia/core": "1.67.0-next.
|
|
8
|
-
"@theia/editor": "1.67.0-next.
|
|
9
|
-
"@theia/filesystem": "1.67.0-next.
|
|
10
|
-
"@theia/markers": "1.67.0-next.
|
|
11
|
-
"@theia/monaco": "1.67.0-next.
|
|
6
|
+
"@theia/console": "1.67.0-next.56+d8f18cc386c",
|
|
7
|
+
"@theia/core": "1.67.0-next.56+d8f18cc386c",
|
|
8
|
+
"@theia/editor": "1.67.0-next.56+d8f18cc386c",
|
|
9
|
+
"@theia/filesystem": "1.67.0-next.56+d8f18cc386c",
|
|
10
|
+
"@theia/markers": "1.67.0-next.56+d8f18cc386c",
|
|
11
|
+
"@theia/monaco": "1.67.0-next.56+d8f18cc386c",
|
|
12
12
|
"@theia/monaco-editor-core": "1.96.302",
|
|
13
|
-
"@theia/output": "1.67.0-next.
|
|
14
|
-
"@theia/process": "1.67.0-next.
|
|
15
|
-
"@theia/task": "1.67.0-next.
|
|
16
|
-
"@theia/terminal": "1.67.0-next.
|
|
17
|
-
"@theia/test": "1.67.0-next.
|
|
18
|
-
"@theia/variable-resolver": "1.67.0-next.
|
|
19
|
-
"@theia/workspace": "1.67.0-next.
|
|
13
|
+
"@theia/output": "1.67.0-next.56+d8f18cc386c",
|
|
14
|
+
"@theia/process": "1.67.0-next.56+d8f18cc386c",
|
|
15
|
+
"@theia/task": "1.67.0-next.56+d8f18cc386c",
|
|
16
|
+
"@theia/terminal": "1.67.0-next.56+d8f18cc386c",
|
|
17
|
+
"@theia/test": "1.67.0-next.56+d8f18cc386c",
|
|
18
|
+
"@theia/variable-resolver": "1.67.0-next.56+d8f18cc386c",
|
|
19
|
+
"@theia/workspace": "1.67.0-next.56+d8f18cc386c",
|
|
20
20
|
"@vscode/debugprotocol": "^1.51.0",
|
|
21
21
|
"fast-deep-equal": "^3.1.3",
|
|
22
22
|
"jsonc-parser": "^2.2.0",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"nyc": {
|
|
65
65
|
"extends": "../../configs/nyc.json"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "d8f18cc386c45a736cd193d42eab02c8f64c6b10"
|
|
68
68
|
}
|
|
@@ -21,7 +21,8 @@ import { StorageService } from '@theia/core/lib/browser';
|
|
|
21
21
|
import { Marker } from '@theia/markers/lib/common/marker';
|
|
22
22
|
import { MarkerManager } from '@theia/markers/lib/browser/marker-manager';
|
|
23
23
|
import URI from '@theia/core/lib/common/uri';
|
|
24
|
-
import { SourceBreakpoint, BREAKPOINT_KIND, ExceptionBreakpoint, FunctionBreakpoint, BaseBreakpoint, InstructionBreakpoint } from './breakpoint-marker';
|
|
24
|
+
import { SourceBreakpoint, BREAKPOINT_KIND, ExceptionBreakpoint, FunctionBreakpoint, BaseBreakpoint, InstructionBreakpoint, DataBreakpoint } from './breakpoint-marker';
|
|
25
|
+
import { DebugProtocol } from '@vscode/debugprotocol';
|
|
25
26
|
|
|
26
27
|
export interface BreakpointsChangeEvent<T extends BaseBreakpoint> {
|
|
27
28
|
uri: URI
|
|
@@ -32,6 +33,7 @@ export interface BreakpointsChangeEvent<T extends BaseBreakpoint> {
|
|
|
32
33
|
export type SourceBreakpointsChangeEvent = BreakpointsChangeEvent<SourceBreakpoint>;
|
|
33
34
|
export type FunctionBreakpointsChangeEvent = BreakpointsChangeEvent<FunctionBreakpoint>;
|
|
34
35
|
export type InstructionBreakpointsChangeEvent = BreakpointsChangeEvent<InstructionBreakpoint>;
|
|
36
|
+
export type DataBreakpointsChangeEvent = BreakpointsChangeEvent<DataBreakpoint>;
|
|
35
37
|
|
|
36
38
|
@injectable()
|
|
37
39
|
export class BreakpointManager extends MarkerManager<SourceBreakpoint> {
|
|
@@ -42,6 +44,8 @@ export class BreakpointManager extends MarkerManager<SourceBreakpoint> {
|
|
|
42
44
|
|
|
43
45
|
static INSTRUCTION_URI = new URI('debug:instruction://');
|
|
44
46
|
|
|
47
|
+
static DATA_URI = new URI('debug:data://');
|
|
48
|
+
|
|
45
49
|
protected readonly owner = 'breakpoint';
|
|
46
50
|
|
|
47
51
|
@inject(StorageService)
|
|
@@ -60,6 +64,9 @@ export class BreakpointManager extends MarkerManager<SourceBreakpoint> {
|
|
|
60
64
|
protected readonly onDidChangeInstructionBreakpointsEmitter = new Emitter<InstructionBreakpointsChangeEvent>();
|
|
61
65
|
readonly onDidChangeInstructionBreakpoints = this.onDidChangeInstructionBreakpointsEmitter.event;
|
|
62
66
|
|
|
67
|
+
protected readonly onDidChangeDataBreakpointsEmitter = new Emitter<DataBreakpointsChangeEvent>();
|
|
68
|
+
readonly onDidChangeDataBreakpoints = this.onDidChangeDataBreakpointsEmitter.event;
|
|
69
|
+
|
|
63
70
|
override setMarkers(uri: URI, owner: string, newMarkers: SourceBreakpoint[]): Marker<SourceBreakpoint>[] {
|
|
64
71
|
const result = this.findMarkers({ uri, owner });
|
|
65
72
|
const added: SourceBreakpoint[] = [];
|
|
@@ -254,21 +261,8 @@ export class BreakpointManager extends MarkerManager<SourceBreakpoint> {
|
|
|
254
261
|
}
|
|
255
262
|
|
|
256
263
|
protected setInstructionBreakpoints(newBreakpoints: InstructionBreakpoint[]): void {
|
|
257
|
-
const
|
|
258
|
-
|
|
259
|
-
const added = [];
|
|
260
|
-
const changed = [];
|
|
261
|
-
for (const [id, breakpoint] of currentBreakpoints.entries()) {
|
|
262
|
-
const old = oldBreakpoints.get(id);
|
|
263
|
-
if (old) {
|
|
264
|
-
changed.push(old);
|
|
265
|
-
} else {
|
|
266
|
-
added.push(breakpoint);
|
|
267
|
-
}
|
|
268
|
-
oldBreakpoints.delete(id);
|
|
269
|
-
}
|
|
270
|
-
const removed = Array.from(oldBreakpoints.values());
|
|
271
|
-
this.instructionBreakpoints = Array.from(currentBreakpoints.values());
|
|
264
|
+
const { added, removed, changed } = diff(this.instructionBreakpoints, newBreakpoints, bp => bp.id);
|
|
265
|
+
this.instructionBreakpoints = newBreakpoints.slice();
|
|
272
266
|
this.fireOnDidChangeMarkers(BreakpointManager.INSTRUCTION_URI);
|
|
273
267
|
this.onDidChangeInstructionBreakpointsEmitter.fire({ uri: BreakpointManager.INSTRUCTION_URI, added, removed, changed });
|
|
274
268
|
}
|
|
@@ -307,10 +301,45 @@ export class BreakpointManager extends MarkerManager<SourceBreakpoint> {
|
|
|
307
301
|
this.setInstructionBreakpoints([]);
|
|
308
302
|
}
|
|
309
303
|
|
|
304
|
+
protected dataBreakpoints: DataBreakpoint[] = [];
|
|
305
|
+
|
|
306
|
+
getDataBreakpoints(): readonly DataBreakpoint[] {
|
|
307
|
+
return Object.freeze(this.dataBreakpoints.slice());
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
setDataBreakpoints(breakpoints: DataBreakpoint[]): void {
|
|
311
|
+
const { added, removed, changed } = diff(this.dataBreakpoints, breakpoints, ({ id }) => id);
|
|
312
|
+
this.dataBreakpoints = breakpoints.slice();
|
|
313
|
+
this.fireOnDidChangeMarkers(BreakpointManager.DATA_URI);
|
|
314
|
+
this.onDidChangeDataBreakpointsEmitter.fire({ uri: BreakpointManager.DATA_URI, added, removed, changed });
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
addDataBreakpoint(breakpoint: DataBreakpoint): void {
|
|
318
|
+
this.setDataBreakpoints(this.dataBreakpoints.concat(breakpoint));
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
updateDataBreakpoint(id: string, options: { enabled?: boolean; raw?: Partial<Omit<DebugProtocol.DataBreakpoint, 'dataId'>> }): void {
|
|
322
|
+
const breakpoint = this.dataBreakpoints.find(bp => bp.id === id);
|
|
323
|
+
if (!breakpoint) { return; }
|
|
324
|
+
Object.assign(breakpoint.raw, options);
|
|
325
|
+
breakpoint.enabled = options.enabled ?? breakpoint.enabled;
|
|
326
|
+
this.fireOnDidChangeMarkers(BreakpointManager.DATA_URI);
|
|
327
|
+
this.onDidChangeDataBreakpointsEmitter.fire({ uri: BreakpointManager.DATA_URI, added: [], removed: [], changed: [breakpoint] });
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
removeDataBreakpoint(id: string): void {
|
|
331
|
+
const index = this.dataBreakpoints.findIndex(bp => bp.id === id);
|
|
332
|
+
if (~index) { return; }
|
|
333
|
+
const removed = this.dataBreakpoints.splice(index);
|
|
334
|
+
this.fireOnDidChangeMarkers(BreakpointManager.DATA_URI);
|
|
335
|
+
this.onDidChangeDataBreakpointsEmitter.fire({ uri: BreakpointManager.DATA_URI, added: [], removed, changed: [] });
|
|
336
|
+
}
|
|
337
|
+
|
|
310
338
|
removeBreakpoints(): void {
|
|
311
339
|
this.cleanAllMarkers();
|
|
312
340
|
this.setFunctionBreakpoints([]);
|
|
313
341
|
this.setInstructionBreakpoints([]);
|
|
342
|
+
this.setDataBreakpoints([]);
|
|
314
343
|
}
|
|
315
344
|
|
|
316
345
|
async load(): Promise<void> {
|
|
@@ -352,6 +381,11 @@ export class BreakpointManager extends MarkerManager<SourceBreakpoint> {
|
|
|
352
381
|
if (this.instructionBreakpoints.length) {
|
|
353
382
|
data.instructionBreakpoints = this.instructionBreakpoints;
|
|
354
383
|
}
|
|
384
|
+
const dataBreakpointsToStore = this.dataBreakpoints.filter(candidate => candidate.info.canPersist);
|
|
385
|
+
if (dataBreakpointsToStore.length) {
|
|
386
|
+
data.dataBreakpoints = dataBreakpointsToStore;
|
|
387
|
+
}
|
|
388
|
+
|
|
355
389
|
this.storage.setData('breakpoints', data);
|
|
356
390
|
}
|
|
357
391
|
|
|
@@ -365,5 +399,24 @@ export namespace BreakpointManager {
|
|
|
365
399
|
exceptionBreakpoints?: ExceptionBreakpoint[];
|
|
366
400
|
functionBreakpoints?: FunctionBreakpoint[];
|
|
367
401
|
instructionBreakpoints?: InstructionBreakpoint[];
|
|
402
|
+
dataBreakpoints?: DataBreakpoint[];
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
export function diff<T>(prevs: T[], nexts: T[], toKey: (member: T) => string): { added: T[], removed: T[], changed: T[] } {
|
|
407
|
+
const old = new Map(prevs.map(item => [toKey(item), item]));
|
|
408
|
+
const current = new Map(nexts.map(item => [toKey(item), item]));
|
|
409
|
+
const added = [];
|
|
410
|
+
const changed = [];
|
|
411
|
+
for (const [id, next] of current.entries()) {
|
|
412
|
+
const prev = old.get(id);
|
|
413
|
+
if (prev) {
|
|
414
|
+
changed.push(prev);
|
|
415
|
+
} else {
|
|
416
|
+
added.push(next);
|
|
417
|
+
}
|
|
418
|
+
old.delete(id);
|
|
368
419
|
}
|
|
420
|
+
const removed = Array.from(old.values());
|
|
421
|
+
return { added, removed, changed };
|
|
369
422
|
}
|
|
@@ -102,3 +102,41 @@ export namespace InstructionBreakpoint {
|
|
|
102
102
|
return isObject<InstructionBreakpoint>(arg) && isString(arg.instructionReference);
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
+
|
|
106
|
+
export type DataBreakpointInfo = DebugProtocol.DataBreakpointInfoResponse['body'];
|
|
107
|
+
|
|
108
|
+
export interface DataBreakpointAddressSource {
|
|
109
|
+
type: DataBreakpointSourceType.Address;
|
|
110
|
+
address: string;
|
|
111
|
+
bytes: number;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface DataBreakpointVariableSource {
|
|
115
|
+
type: DataBreakpointSourceType.Variable;
|
|
116
|
+
variable: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export const enum DataBreakpointSourceType {
|
|
120
|
+
Variable,
|
|
121
|
+
Address,
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export type DataBreakpointSource = | DataBreakpointAddressSource | DataBreakpointVariableSource;
|
|
125
|
+
|
|
126
|
+
export interface DataBreakpoint extends BaseBreakpoint {
|
|
127
|
+
raw: DebugProtocol.DataBreakpoint;
|
|
128
|
+
info: DataBreakpointInfo;
|
|
129
|
+
source: DataBreakpointSource;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export namespace DataBreakpoint {
|
|
133
|
+
export function create(raw: DebugProtocol.DataBreakpoint, info: DataBreakpointInfo, source: DataBreakpointSource, ref?: DataBreakpoint): DataBreakpoint {
|
|
134
|
+
return {
|
|
135
|
+
raw,
|
|
136
|
+
info,
|
|
137
|
+
id: ref?.id ?? UUID.uuid4(),
|
|
138
|
+
enabled: ref?.enabled ?? true,
|
|
139
|
+
source
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
// *****************************************************************************
|
|
2
|
+
// Copyright (C) 2025 EclipseSource GmbH and others.
|
|
3
|
+
//
|
|
4
|
+
// This program and the accompanying materials are made available under the
|
|
5
|
+
// terms of the Eclipse Public License v. 2.0 which is available at
|
|
6
|
+
// http://www.eclipse.org/legal/epl-2.0.
|
|
7
|
+
//
|
|
8
|
+
// This Source Code may also be made available under the following Secondary
|
|
9
|
+
// Licenses when the conditions for such availability set forth in the Eclipse
|
|
10
|
+
// Public License v. 2.0 are satisfied: GNU General Public License, version 2
|
|
11
|
+
// with the GNU Classpath Exception which is available at
|
|
12
|
+
// https://www.gnu.org/software/classpath/license.html.
|
|
13
|
+
//
|
|
14
|
+
// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
|
|
15
|
+
// *****************************************************************************
|
|
16
|
+
|
|
17
|
+
import { nls, CommandHandler, DisposableCollection, MessageService, QuickInputService, Disposable } from '@theia/core';
|
|
18
|
+
import { inject, injectable } from '@theia/core/shared/inversify';
|
|
19
|
+
import { DebugViewModel } from '../view/debug-view-model';
|
|
20
|
+
import { TreeElementNode } from '@theia/core/lib/browser/source-tree';
|
|
21
|
+
import { DebugDataBreakpoint } from '../model/debug-data-breakpoint';
|
|
22
|
+
import { DataBreakpoint, DataBreakpointSource, DataBreakpointSourceType } from './breakpoint-marker';
|
|
23
|
+
import { DebugProtocol } from '@vscode/debugprotocol';
|
|
24
|
+
import { BreakpointManager } from './breakpoint-manager';
|
|
25
|
+
import { TreeNode, Widget } from '@theia/core/lib/browser';
|
|
26
|
+
import { DebugBreakpointsWidget } from '../view/debug-breakpoints-widget';
|
|
27
|
+
|
|
28
|
+
// Adapted from https://github.com/microsoft/vscode/blob/9c883243a89e7ec3b730d3746fbb1e836d5e4f52/src/vs/workbench/contrib/debug/browser/breakpointsView.ts#L1506-L1625
|
|
29
|
+
|
|
30
|
+
@injectable()
|
|
31
|
+
export class AddOrEditDataBreakpointAddress implements CommandHandler {
|
|
32
|
+
@inject(DebugViewModel)
|
|
33
|
+
protected readonly viewModel: DebugViewModel;
|
|
34
|
+
@inject(QuickInputService)
|
|
35
|
+
protected readonly quickInputService: QuickInputService;
|
|
36
|
+
@inject(MessageService)
|
|
37
|
+
protected readonly messageService: MessageService;
|
|
38
|
+
@inject(BreakpointManager)
|
|
39
|
+
protected readonly breakpointManager: BreakpointManager;
|
|
40
|
+
|
|
41
|
+
isEnabled(node?: TreeElementNode): boolean {
|
|
42
|
+
return !!this.viewModel.currentSession?.capabilities.supportsDataBreakpoints
|
|
43
|
+
&& this.viewModel.currentSession?.capabilities.supportsDataBreakpointBytes !== false
|
|
44
|
+
&& this.isAddressBreakpointOrDebugWidget(node);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
isVisible(node?: TreeElementNode): boolean {
|
|
48
|
+
return this.isEnabled(node);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
protected isAddressBreakpointOrDebugWidget(candidate?: unknown): boolean {
|
|
52
|
+
return !candidate ? true // Probably command palette
|
|
53
|
+
: TreeNode.is(candidate) && TreeElementNode.is(candidate)
|
|
54
|
+
? candidate.element instanceof DebugDataBreakpoint && candidate.element.origin.source.type === DataBreakpointSourceType.Address
|
|
55
|
+
: candidate instanceof Widget
|
|
56
|
+
? candidate instanceof DebugBreakpointsWidget
|
|
57
|
+
: false;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
async execute(node?: TreeElementNode): Promise<void> {
|
|
61
|
+
const existingBreakpoint = TreeElementNode.is(node) && node.element instanceof DebugDataBreakpoint ? node.element : undefined;
|
|
62
|
+
const session = this.viewModel.currentSession;
|
|
63
|
+
if (!session) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
let defaultValue = undefined;
|
|
68
|
+
if (existingBreakpoint?.origin.source.type === DataBreakpointSourceType.Address) {
|
|
69
|
+
defaultValue = `${existingBreakpoint.origin.source.address} + ${existingBreakpoint.origin.source.bytes}`;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const quickInput = this.quickInputService;
|
|
73
|
+
const range = await this.getRange(defaultValue);
|
|
74
|
+
if (!range) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const info = await session.sendRequest('dataBreakpointInfo', { asAddress: true, name: range.address, bytes: range.bytes })
|
|
79
|
+
.then(({ body }) => body)
|
|
80
|
+
.catch(e => { this.messageService.error(nls.localizeByDefault('Failed to set data breakpoint at {0}: {1}', range.address, e.message)); });
|
|
81
|
+
if (!info?.dataId) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
let accessType: DebugProtocol.DataBreakpointAccessType = 'write';
|
|
86
|
+
if (info.accessTypes && info.accessTypes?.length > 1) {
|
|
87
|
+
const accessTypes = info.accessTypes.map(type => ({ label: type }));
|
|
88
|
+
const selectedAccessType = await quickInput.pick(accessTypes, { placeHolder: nls.localizeByDefault('Select the access type to monitor') });
|
|
89
|
+
if (!selectedAccessType) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
accessType = selectedAccessType.label;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const src: DataBreakpointSource = { type: DataBreakpointSourceType.Address, ...range };
|
|
97
|
+
if (existingBreakpoint) {
|
|
98
|
+
this.breakpointManager.removeDataBreakpoint(existingBreakpoint.id);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
this.breakpointManager.addDataBreakpoint(DataBreakpoint.create({ dataId: info.dataId, accessType }, { ...info, canPersist: true }, src));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
private getRange(defaultValue?: string): Promise<{ address: string, bytes: number } | undefined> {
|
|
105
|
+
return new Promise(resolve => {
|
|
106
|
+
const disposables = new DisposableCollection();
|
|
107
|
+
const addDisposable = <T extends Disposable>(disposable: T): T => {
|
|
108
|
+
disposables.push(disposable);
|
|
109
|
+
return disposable;
|
|
110
|
+
};
|
|
111
|
+
const input = addDisposable(this.quickInputService.createInputBox());
|
|
112
|
+
input.prompt = nls.localizeByDefault('Enter a memory range in which to break');
|
|
113
|
+
input.placeholder = nls.localizeByDefault('Absolute range (0x1234 - 0x1300) or range of bytes after an address (0x1234 + 0xff)');
|
|
114
|
+
if (defaultValue) {
|
|
115
|
+
input.value = defaultValue;
|
|
116
|
+
input.valueSelection = [0, defaultValue.length];
|
|
117
|
+
}
|
|
118
|
+
addDisposable(input.onDidChangeValue(e => {
|
|
119
|
+
const err = this.parseAddress(e, false);
|
|
120
|
+
input.validationMessage = err?.error;
|
|
121
|
+
}));
|
|
122
|
+
addDisposable(input.onDidAccept(() => {
|
|
123
|
+
const r = this.parseAddress(input.value ?? '', true);
|
|
124
|
+
if ('error' in r) {
|
|
125
|
+
input.validationMessage = r.error;
|
|
126
|
+
} else {
|
|
127
|
+
resolve(r);
|
|
128
|
+
}
|
|
129
|
+
input.dispose();
|
|
130
|
+
}));
|
|
131
|
+
addDisposable(input.onDidHide(() => {
|
|
132
|
+
resolve(undefined);
|
|
133
|
+
disposables.dispose();
|
|
134
|
+
}));
|
|
135
|
+
input.ignoreFocusOut = true;
|
|
136
|
+
input.show();
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
private parseAddress(range: string, isFinal: false): { error: string } | undefined;
|
|
141
|
+
private parseAddress(range: string, isFinal: true): { error: string } | { address: string; bytes: number };
|
|
142
|
+
private parseAddress(range: string, isFinal: boolean): { error: string } | { address: string; bytes: number } | undefined {
|
|
143
|
+
const parts = /^(\S+)\s*(?:([+-])\s*(\S+))?/.exec(range);
|
|
144
|
+
if (!parts) {
|
|
145
|
+
return { error: nls.localizeByDefault('Address should be a range of numbers the form "[Start] - [End]" or "[Start] + [Bytes]"') };
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
const isNum = (e: string) => isFinal ? /^0x[0-9a-f]*|[0-9]*$/i.test(e) : /^0x[0-9a-f]+|[0-9]+$/i.test(e);
|
|
149
|
+
const [, startStr, sign = '+', endStr = '1'] = parts;
|
|
150
|
+
|
|
151
|
+
for (const n of [startStr, endStr]) {
|
|
152
|
+
if (!isNum(n)) {
|
|
153
|
+
return { error: nls.localizeByDefault('Number must be a decimal integer or hex value starting with \"0x\", got {0}', n) };
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
if (!isFinal) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const start = BigInt(startStr);
|
|
162
|
+
const end = BigInt(endStr);
|
|
163
|
+
const address = `0x${start.toString(16)}`;
|
|
164
|
+
if (sign === '-') {
|
|
165
|
+
return { address, bytes: Number(start - end) };
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
return { address, bytes: Number(end) };
|
|
169
|
+
}
|
|
170
|
+
}
|
|
@@ -51,8 +51,12 @@ export class ExpressionContainer implements CompositeConsoleItem {
|
|
|
51
51
|
return undefined;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
get reference(): number | undefined {
|
|
55
|
+
return this.variablesReference;
|
|
56
|
+
}
|
|
57
|
+
|
|
54
58
|
get hasElements(): boolean {
|
|
55
|
-
return
|
|
59
|
+
return this.variablesReference !== undefined;
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
protected elements: Promise<ExpressionContainer[]> | undefined;
|
|
@@ -62,6 +62,8 @@ import { ConsoleWidget } from '@theia/console/lib/browser/console-widget';
|
|
|
62
62
|
import { ConsoleContentWidget } from '@theia/console/lib/browser/console-content-widget';
|
|
63
63
|
import { ConsoleContextMenu } from '@theia/console/lib/browser/console-contribution';
|
|
64
64
|
import { DebugHoverWidget } from './editor/debug-hover-widget';
|
|
65
|
+
import { DebugExpressionProvider } from './editor/debug-expression-provider';
|
|
66
|
+
import { AddOrEditDataBreakpointAddress } from './breakpoint/debug-data-breakpoint-actions';
|
|
65
67
|
|
|
66
68
|
export namespace DebugMenus {
|
|
67
69
|
export const DEBUG = [...MAIN_MENU_BAR, '6_debug'];
|
|
@@ -197,6 +199,11 @@ export namespace DebugCommands {
|
|
|
197
199
|
category: DEBUG_CATEGORY,
|
|
198
200
|
label: 'Add Function Breakpoint',
|
|
199
201
|
});
|
|
202
|
+
export const ADD_DATA_BREAKPOINT = Command.toDefaultLocalizedCommand({
|
|
203
|
+
id: 'debug.breakpoint.add.data',
|
|
204
|
+
category: DEBUG_CATEGORY,
|
|
205
|
+
label: 'Add Data Breakpoint at Address'
|
|
206
|
+
});
|
|
200
207
|
export const ENABLE_SELECTED_BREAKPOINTS = Command.toLocalizedCommand({
|
|
201
208
|
id: 'debug.breakpoint.enableSelected',
|
|
202
209
|
category: DEBUG_CATEGORY,
|
|
@@ -268,6 +275,11 @@ export namespace DebugCommands {
|
|
|
268
275
|
category: DEBUG_CATEGORY,
|
|
269
276
|
label: 'Evaluate in Debug Console'
|
|
270
277
|
});
|
|
278
|
+
export const ADD_TO_WATCH = Command.toDefaultLocalizedCommand({
|
|
279
|
+
id: 'editor.debug.action.selectionToWatch',
|
|
280
|
+
category: DEBUG_CATEGORY,
|
|
281
|
+
label: 'Add to Watch'
|
|
282
|
+
});
|
|
271
283
|
export const JUMP_TO_CURSOR = Command.toDefaultLocalizedCommand({
|
|
272
284
|
id: 'editor.debug.action.jumpToCursor',
|
|
273
285
|
category: DEBUG_CATEGORY,
|
|
@@ -465,6 +477,9 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
465
477
|
@inject(DebugWatchManager)
|
|
466
478
|
protected readonly watchManager: DebugWatchManager;
|
|
467
479
|
|
|
480
|
+
@inject(DebugExpressionProvider)
|
|
481
|
+
protected readonly expressionProvider: DebugExpressionProvider;
|
|
482
|
+
|
|
468
483
|
@inject(LabelProvider)
|
|
469
484
|
protected readonly labelProvider: LabelProvider;
|
|
470
485
|
|
|
@@ -474,6 +489,9 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
474
489
|
@inject(MessageService)
|
|
475
490
|
protected readonly messageService: MessageService;
|
|
476
491
|
|
|
492
|
+
@inject(AddOrEditDataBreakpointAddress)
|
|
493
|
+
protected readonly AddOrEditDataBreakpointAddress: AddOrEditDataBreakpointAddress;
|
|
494
|
+
|
|
477
495
|
constructor() {
|
|
478
496
|
super({
|
|
479
497
|
widgetId: DebugWidget.ID,
|
|
@@ -603,6 +621,7 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
603
621
|
DebugCommands.INLINE_BREAKPOINT,
|
|
604
622
|
DebugCommands.ADD_FUNCTION_BREAKPOINT,
|
|
605
623
|
DebugCommands.ADD_LOGPOINT,
|
|
624
|
+
DebugCommands.ADD_DATA_BREAKPOINT
|
|
606
625
|
);
|
|
607
626
|
registerMenuActions(DebugMenus.DEBUG_BREAKPOINTS,
|
|
608
627
|
DebugCommands.ENABLE_ALL_BREAKPOINTS,
|
|
@@ -662,6 +681,7 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
662
681
|
|
|
663
682
|
registerMenuActions(DebugBreakpointsWidget.EDIT_MENU,
|
|
664
683
|
DebugCommands.EDIT_BREAKPOINT,
|
|
684
|
+
{ ...DebugCommands.ADD_DATA_BREAKPOINT, label: nls.localizeByDefault('Edit Address...'), originalLabel: 'Edit Address...' },
|
|
665
685
|
DebugCommands.EDIT_LOGPOINT,
|
|
666
686
|
DebugCommands.EDIT_BREAKPOINT_CONDITION
|
|
667
687
|
);
|
|
@@ -681,6 +701,7 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
681
701
|
const DEBUG_EDITOR_CONTEXT_MENU_GROUP = [...EDITOR_CONTEXT_MENU, '2_debug'];
|
|
682
702
|
registerMenuActions(DEBUG_EDITOR_CONTEXT_MENU_GROUP,
|
|
683
703
|
DebugCommands.EVALUATE_IN_DEBUG_CONSOLE,
|
|
704
|
+
DebugCommands.ADD_TO_WATCH,
|
|
684
705
|
DebugCommands.JUMP_TO_CURSOR,
|
|
685
706
|
DebugCommands.RUN_TO_CURSOR,
|
|
686
707
|
DebugCommands.RUN_TO_LINE
|
|
@@ -853,6 +874,7 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
853
874
|
isEnabled: widget => !(widget instanceof Widget) || widget instanceof DebugBreakpointsWidget,
|
|
854
875
|
isVisible: widget => !(widget instanceof Widget) || widget instanceof DebugBreakpointsWidget
|
|
855
876
|
});
|
|
877
|
+
registry.registerCommand(DebugCommands.ADD_DATA_BREAKPOINT, this.AddOrEditDataBreakpointAddress);
|
|
856
878
|
registry.registerCommand(DebugCommands.ENABLE_ALL_BREAKPOINTS, {
|
|
857
879
|
execute: () => this.breakpointManager.enableAllBreakpoints(true),
|
|
858
880
|
isEnabled: () => this.breakpointManager.hasBreakpoints()
|
|
@@ -957,6 +979,29 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
957
979
|
isVisible: () => !!this.editors.model && !!this.manager.currentFrame
|
|
958
980
|
});
|
|
959
981
|
|
|
982
|
+
registry.registerCommand(DebugCommands.ADD_TO_WATCH, {
|
|
983
|
+
execute: async () => {
|
|
984
|
+
const { model } = this.editors;
|
|
985
|
+
if (model) {
|
|
986
|
+
const { editor } = model;
|
|
987
|
+
const selection = editor.getControl().getSelection();
|
|
988
|
+
if (selection) {
|
|
989
|
+
const expression = editor.getControl().getModel()?.getValueInRange(selection) ||
|
|
990
|
+
(await this.expressionProvider.getEvaluatableExpression(editor, selection))?.matchingExpression;
|
|
991
|
+
if (expression) {
|
|
992
|
+
this.watchManager.addWatchExpression(expression);
|
|
993
|
+
const watchWidget = this.widgetManager.tryGetWidget(DebugWatchWidget.FACTORY_ID);
|
|
994
|
+
if (watchWidget) {
|
|
995
|
+
await this.shell.activateWidget(watchWidget.id);
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
isEnabled: () => !!this.editors.model && this.manager.inDebugMode,
|
|
1002
|
+
isVisible: () => !!this.editors.model && this.manager.inDebugMode
|
|
1003
|
+
});
|
|
1004
|
+
|
|
960
1005
|
registry.registerCommand(DebugCommands.JUMP_TO_CURSOR, {
|
|
961
1006
|
execute: () => {
|
|
962
1007
|
const model = this.editors.model;
|
|
@@ -1281,6 +1326,13 @@ export class DebugFrontendApplicationContribution extends AbstractViewContributi
|
|
|
1281
1326
|
icon: codicon('add'),
|
|
1282
1327
|
tooltip: DebugCommands.ADD_FUNCTION_BREAKPOINT.label
|
|
1283
1328
|
});
|
|
1329
|
+
toolbar.registerItem({
|
|
1330
|
+
id: DebugCommands.ADD_DATA_BREAKPOINT.id,
|
|
1331
|
+
command: DebugCommands.ADD_DATA_BREAKPOINT.id,
|
|
1332
|
+
icon: codicon('variable-group'),
|
|
1333
|
+
tooltip: DebugCommands.ADD_DATA_BREAKPOINT.label,
|
|
1334
|
+
onDidChange: this.manager.onDidStopDebugSession as unknown as Event<void>
|
|
1335
|
+
});
|
|
1284
1336
|
updateToggleBreakpointsEnabled();
|
|
1285
1337
|
this.breakpointManager.onDidChangeBreakpoints(updateToggleBreakpointsEnabled);
|
|
1286
1338
|
toolbar.registerItem(toggleBreakpointsEnabled);
|
|
@@ -49,6 +49,7 @@ import { CommandContribution } from '@theia/core/lib/common/command';
|
|
|
49
49
|
import { TabBarToolbarContribution } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
|
|
50
50
|
import { ColorContribution } from '@theia/core/lib/browser/color-application-contribution';
|
|
51
51
|
import { DebugWatchManager } from './debug-watch-manager';
|
|
52
|
+
import { DebugExpressionProvider } from './editor/debug-expression-provider';
|
|
52
53
|
import { DebugBreakpointWidget } from './editor/debug-breakpoint-widget';
|
|
53
54
|
import { DebugInlineValueDecorator } from './editor/debug-inline-value-decorator';
|
|
54
55
|
import { JsonSchemaContribution } from '@theia/core/lib/browser/json-schema-store';
|
|
@@ -63,6 +64,7 @@ import { bindDisassemblyView } from './disassembly-view/disassembly-view-contrib
|
|
|
63
64
|
import { StandaloneServices } from '@theia/monaco-editor-core/esm/vs/editor/standalone/browser/standaloneServices';
|
|
64
65
|
import { ICodeEditorService } from '@theia/monaco-editor-core/esm/vs/editor/browser/services/codeEditorService';
|
|
65
66
|
import { DebugSessionConfigurationLabelProvider } from './debug-session-configuration-label-provider';
|
|
67
|
+
import { AddOrEditDataBreakpointAddress } from './breakpoint/debug-data-breakpoint-actions';
|
|
66
68
|
|
|
67
69
|
export default new ContainerModule((bind: interfaces.Bind) => {
|
|
68
70
|
bindContributionProvider(bind, DebugContribution);
|
|
@@ -118,6 +120,7 @@ export default new ContainerModule((bind: interfaces.Bind) => {
|
|
|
118
120
|
bindLaunchPreferences(bind);
|
|
119
121
|
|
|
120
122
|
bind(DebugWatchManager).toSelf().inSingletonScope();
|
|
123
|
+
bind(DebugExpressionProvider).toSelf().inSingletonScope();
|
|
121
124
|
|
|
122
125
|
bind(DebugTabBarDecorator).toSelf().inSingletonScope();
|
|
123
126
|
bind(TabBarDecorator).toService(DebugTabBarDecorator);
|
|
@@ -133,4 +136,5 @@ export default new ContainerModule((bind: interfaces.Bind) => {
|
|
|
133
136
|
bindDisassemblyView(bind);
|
|
134
137
|
|
|
135
138
|
bind(DebugSessionConfigurationLabelProvider).toSelf().inSingletonScope();
|
|
139
|
+
bind(AddOrEditDataBreakpointAddress).toSelf().inSingletonScope();
|
|
136
140
|
});
|
|
@@ -38,6 +38,7 @@ import { DebugFunctionBreakpoint } from './model/debug-function-breakpoint';
|
|
|
38
38
|
import * as monaco from '@theia/monaco-editor-core';
|
|
39
39
|
import { DebugInstructionBreakpoint } from './model/debug-instruction-breakpoint';
|
|
40
40
|
import { DebugSessionConfigurationLabelProvider } from './debug-session-configuration-label-provider';
|
|
41
|
+
import { DebugDataBreakpoint } from './model/debug-data-breakpoint';
|
|
41
42
|
|
|
42
43
|
export interface WillStartDebugSession extends WaitUntilEvent {
|
|
43
44
|
}
|
|
@@ -449,6 +450,15 @@ export class DebugSessionManager {
|
|
|
449
450
|
}
|
|
450
451
|
|
|
451
452
|
protected cleanup(session: DebugSession): void {
|
|
453
|
+
// Data breakpoints belonging to this session that can't persist and aren't verified by some other session should be removed.
|
|
454
|
+
const currentDataBreakpoints = this.breakpoints.getDataBreakpoints();
|
|
455
|
+
const toRemove = currentDataBreakpoints.filter(candidate => !candidate.info.canPersist && this.sessions.every(otherSession => otherSession !== session
|
|
456
|
+
&& otherSession.getDataBreakpoints().every(otherSessionBp => otherSessionBp.id !== candidate.id || !otherSessionBp.verified)))
|
|
457
|
+
.map(bp => bp.id);
|
|
458
|
+
const toRetain = this.breakpoints.getDataBreakpoints().filter(candidate => !toRemove.includes(candidate.id));
|
|
459
|
+
if (currentDataBreakpoints.length !== toRetain.length) {
|
|
460
|
+
this.breakpoints.setDataBreakpoints(toRetain);
|
|
461
|
+
}
|
|
452
462
|
if (this.remove(session.id)) {
|
|
453
463
|
this.onDidDestroyDebugSessionEmitter.fire(session);
|
|
454
464
|
}
|
|
@@ -604,6 +614,14 @@ export class DebugSessionManager {
|
|
|
604
614
|
return this.breakpoints.getInstructionBreakpoints().map(origin => new DebugInstructionBreakpoint(origin, { labelProvider, breakpoints, editorManager }));
|
|
605
615
|
}
|
|
606
616
|
|
|
617
|
+
getDataBreakpoints(session = this.currentSession): DebugDataBreakpoint[] {
|
|
618
|
+
if (session && session.state > DebugState.Initializing) {
|
|
619
|
+
return session.getDataBreakpoints();
|
|
620
|
+
}
|
|
621
|
+
const { labelProvider, breakpoints, editorManager } = this;
|
|
622
|
+
return this.breakpoints.getDataBreakpoints().map(origin => new DebugDataBreakpoint(origin, { labelProvider, breakpoints, editorManager }));
|
|
623
|
+
}
|
|
624
|
+
|
|
607
625
|
getBreakpoints(session?: DebugSession): DebugSourceBreakpoint[];
|
|
608
626
|
getBreakpoints(uri: URI, session?: DebugSession): DebugSourceBreakpoint[];
|
|
609
627
|
getBreakpoints(arg?: URI | DebugSession, arg2?: DebugSession): DebugSourceBreakpoint[] {
|