@codingame/monaco-vscode-api 4.5.2 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.js +1 -1
- package/extensions.d.ts +2 -3
- package/lifecycle.js +6 -0
- package/localExtensionHost.d.ts +4 -1
- package/missing-services.js +41 -25
- package/package.json +8 -8
- package/service-override/tools/editor.js +31 -8
- package/service-override/tools/views.d.ts +1 -1
- package/service-override/tools/views.js +2 -3
- package/service-override/views.d.ts +0 -1
- package/services.d.ts +3 -3
- package/services.js +3 -3
- package/vscode/src/vs/base/browser/markdownRenderer.js +9 -3
- package/vscode/src/vs/base/browser/ui/actionbar/actionViewItems.js +2 -2
- package/vscode/src/vs/base/browser/ui/button/button.js +3 -3
- package/vscode/src/vs/base/browser/ui/codicons/codicon/codicon.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/contextview/contextview.js +1 -1
- package/vscode/src/vs/base/browser/ui/dropdown/dropdown.js +2 -2
- package/vscode/src/vs/base/browser/ui/dropdown/dropdownActionViewItem.js +2 -2
- package/vscode/src/vs/base/browser/ui/highlightedlabel/highlightedLabel.js +2 -2
- package/vscode/src/vs/{platform/hover/browser → base/browser/ui/hover}/hover.d.ts +64 -4
- package/vscode/src/vs/base/browser/ui/hover/hoverDelegate.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/hover/hoverDelegate2.js +13 -0
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/hover/hoverWidget.js +30 -14
- package/vscode/src/vs/base/browser/ui/iconLabel/iconLabel.js +15 -2
- package/vscode/src/vs/base/browser/ui/iconLabel/simpleIconLabel.js +2 -2
- package/vscode/src/vs/base/browser/ui/icons/iconSelectBox.css.js +4 -0
- package/vscode/src/vs/base/browser/ui/icons/iconSelectBox.js +239 -0
- package/vscode/src/vs/base/browser/ui/inputbox/inputBox.js +2 -2
- package/vscode/src/vs/base/browser/ui/keybindingLabel/keybindingLabel.js +2 -2
- package/vscode/src/vs/base/browser/ui/list/listView.js +5 -3
- package/vscode/src/vs/base/browser/ui/list/listWidget.d.ts +33 -0
- package/vscode/src/vs/base/browser/ui/list/listWidget.js +4 -1
- package/vscode/src/vs/base/browser/ui/menu/menu.js +1 -0
- package/vscode/src/vs/base/browser/ui/menu/menubar.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/progressbar/progressAccessibilitySignal.js +13 -0
- package/vscode/src/vs/base/browser/ui/progressbar/progressbar.js +7 -1
- package/vscode/src/vs/base/browser/ui/selectBox/selectBoxCustom.js +2 -2
- package/vscode/src/vs/base/browser/ui/table/tableWidget.js +2 -2
- package/vscode/src/vs/base/browser/ui/toggle/toggle.js +8 -2
- package/vscode/src/vs/base/browser/ui/toolbar/toolbar.d.ts +1 -1
- package/vscode/src/vs/base/browser/ui/tree/abstractTree.js +11 -4
- package/vscode/src/vs/base/browser/ui/tree/media/tree.css.js +1 -1
- package/vscode/src/vs/base/browser/ui/tree/objectTree.js +6 -4
- package/vscode/src/vs/base/common/arraysFind.js +7 -7
- package/vscode/src/vs/base/common/async.js +8 -3
- package/vscode/src/vs/base/common/cache.js +29 -10
- package/vscode/src/vs/base/common/cancellation.js +6 -1
- package/vscode/src/vs/base/common/codicons.d.ts +3 -0
- package/vscode/src/vs/base/common/codiconsLibrary.js +3 -0
- package/vscode/src/vs/base/common/controlFlow.js +48 -0
- package/vscode/src/vs/base/common/equals.js +44 -0
- package/vscode/src/vs/base/common/event.d.ts +11 -1
- package/vscode/src/vs/base/common/event.js +26 -1
- package/vscode/src/vs/base/common/jsonEdit.js +1 -1
- package/vscode/src/vs/base/common/lifecycle.js +1 -1
- package/vscode/src/vs/base/common/map.js +53 -4
- package/vscode/src/vs/base/common/network.js +2 -0
- package/vscode/src/vs/base/common/objects.js +3 -0
- package/vscode/src/vs/base/common/observableInternal/autorun.js +1 -10
- package/vscode/src/vs/base/common/observableInternal/base.js +22 -10
- package/vscode/src/vs/base/common/observableInternal/derived.js +8 -8
- package/vscode/src/vs/base/common/observableInternal/promise.js +19 -1
- package/vscode/src/vs/base/common/observableInternal/utils.js +30 -52
- package/vscode/src/vs/base/common/product.d.ts +1 -0
- package/vscode/src/vs/base/common/strings.js +1 -1
- package/vscode/src/vs/base/common/types.d.ts +5 -1
- package/vscode/src/vs/editor/browser/config/editorConfiguration.js +3 -2
- package/vscode/src/vs/editor/browser/observableUtilities.js +58 -0
- package/vscode/src/vs/editor/browser/services/hoverService/hoverService.js +121 -2
- package/vscode/src/vs/editor/browser/services/hoverService/updatableHoverWidget.js +80 -0
- package/vscode/src/vs/editor/browser/stableEditorScroll.js +37 -1
- package/vscode/src/vs/editor/browser/widget/codeEditor/codeEditorWidget.js +10 -3
- package/vscode/src/vs/editor/browser/widget/codeEditor/editor.css.js +1 -1
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorDecorations.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorEditors.js +7 -5
- package/vscode/src/vs/editor/browser/widget/diffEditor/components/diffEditorSash.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorOptions.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorViewModel.js +3 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffEditorWidget.js +3 -10
- package/vscode/src/vs/editor/browser/widget/diffEditor/diffProviderFactoryService.js +8 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/gutterFeature.js +6 -6
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/hideUnchangedRegionsFeature.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/movedBlocksLinesFeature.js +2 -2
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/overviewRulerFeature.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/features/revertButtonsFeature.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils/editorGutter.js +1 -0
- package/vscode/src/vs/editor/browser/widget/diffEditor/utils.js +1 -0
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/diffEditorItemTemplate.js +3 -2
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorViewModel.js +17 -8
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidget.js +1 -0
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/multiDiffEditorWidgetImpl.js +27 -19
- package/vscode/src/vs/editor/browser/widget/multiDiffEditor/style.css.js +1 -1
- package/vscode/src/vs/editor/common/core/editorColorRegistry.js +4 -4
- package/vscode/src/vs/editor/common/core/lineRange.d.ts +12 -0
- package/vscode/src/vs/editor/common/core/lineRange.js +28 -0
- package/vscode/src/vs/editor/common/core/textEdit.d.ts +21 -0
- package/vscode/src/vs/editor/common/core/textEdit.js +13 -1
- package/vscode/src/vs/editor/common/core/textLength.d.ts +29 -0
- package/vscode/src/vs/editor/common/core/textLength.js +6 -0
- package/vscode/src/vs/editor/common/cursor/cursorCollection.js +3 -3
- package/vscode/src/vs/editor/common/diff/defaultLinesDiffComputer/defaultLinesDiffComputer.js +11 -1
- package/vscode/src/vs/editor/common/diff/rangeMapping.d.ts +11 -0
- package/vscode/src/vs/editor/common/diff/rangeMapping.js +34 -3
- package/vscode/src/vs/editor/common/languages.d.ts +50 -10
- package/vscode/src/vs/editor/common/languages.js +11 -1
- package/vscode/src/vs/editor/common/services/languageFeatureDebounce.js +1 -1
- package/vscode/src/vs/editor/common/services/languageFeatures.d.ts +2 -2
- package/vscode/src/vs/editor/common/services/languageFeaturesService.js +1 -1
- package/vscode/src/vs/editor/common/standalone/standaloneEnums.js +11 -1
- package/vscode/src/vs/editor/common/viewModel/viewModelImpl.js +3 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionController.js +22 -6
- package/vscode/src/vs/editor/contrib/codeAction/browser/codeActionModel.js +5 -0
- package/vscode/src/vs/editor/contrib/codeAction/browser/lightBulbWidget.js +1 -0
- package/vscode/src/vs/editor/contrib/colorPicker/browser/colorContributions.js +1 -1
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerActions.js +20 -3
- package/vscode/src/vs/editor/contrib/colorPicker/browser/standaloneColorPickerWidget.js +1 -1
- package/vscode/src/vs/editor/contrib/contextmenu/browser/contextmenu.js +2 -2
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/defaultProviders.js +4 -4
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js +2 -2
- package/vscode/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.js +7 -0
- package/vscode/src/vs/editor/contrib/find/browser/findController.js +11 -6
- package/vscode/src/vs/editor/contrib/find/browser/findWidget.js +10 -10
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverComputer.js +74 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverController.js +332 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverStatusBar.js +34 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverTypes.js +39 -0
- package/vscode/src/vs/editor/contrib/hover/browser/contentHoverWidget.js +355 -0
- package/vscode/src/vs/editor/contrib/hover/browser/getHover.js +11 -14
- package/vscode/src/vs/editor/contrib/hover/browser/hover.css.js +1 -1
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActionIds.js +13 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hoverActions.js +354 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hoverContribution.js +42 -0
- package/vscode/src/vs/editor/contrib/hover/browser/hoverController.js +320 -0
- package/vscode/src/vs/editor/contrib/hover/browser/marginHoverComputer.js +48 -0
- package/vscode/src/vs/editor/contrib/hover/browser/{marginHover.js → marginHoverWidget.js} +14 -48
- package/vscode/src/vs/editor/contrib/hover/browser/markdownHoverParticipant.js +250 -41
- package/vscode/src/vs/editor/contrib/hover/browser/markerHoverParticipant.js +1 -0
- package/vscode/src/vs/editor/contrib/indentation/browser/indentation.js +44 -20
- package/vscode/src/vs/editor/contrib/inlayHints/browser/inlayHintsHover.js +11 -7
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/commands.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/ghostTextWidget.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/hoverParticipant.js +2 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionContextKeys.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsController.js +26 -13
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.js +5 -11
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsModel.js +24 -22
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsSource.js +39 -70
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/suggestWidgetInlineCompletionProvider.js +3 -3
- package/vscode/src/vs/editor/contrib/inlineCompletions/browser/utils.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/ghostTextWidget.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/hoverParticipant.js +1 -0
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditController.js +4 -2
- package/vscode/src/vs/editor/contrib/inlineEdit/browser/inlineEditHintsWidget.js +5 -3
- package/vscode/src/vs/editor/contrib/inlineProgress/browser/inlineProgressWidget.css.js +1 -1
- package/vscode/src/vs/editor/contrib/rename/browser/rename.js +18 -6
- package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.css.js +1 -1
- package/vscode/src/vs/editor/contrib/rename/browser/renameWidget.js +165 -40
- package/vscode/src/vs/editor/contrib/sectionHeaders/browser/sectionHeaders.js +5 -0
- package/vscode/src/vs/editor/contrib/snippet/browser/snippetController2.js +3 -3
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollActions.js +15 -8
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollController.js +13 -6
- package/vscode/src/vs/editor/contrib/stickyScroll/browser/stickyScrollModelProvider.js +0 -2
- package/vscode/src/vs/editor/contrib/toggleTabFocusMode/browser/toggleTabFocusMode.js +9 -2
- package/vscode/src/vs/editor/standalone/browser/standaloneCodeEditor.js +23 -18
- package/vscode/src/vs/editor/standalone/browser/standaloneServices.js +33 -11
- package/vscode/src/vs/platform/accessibility/common/accessibility.d.ts +1 -9
- package/vscode/src/vs/platform/accessibility/common/accessibility.js +2 -1
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.d.ts +15 -9
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.js +133 -132
- package/vscode/src/vs/platform/accessibilitySignal/browser/accessibilitySignalService.service.d.ts +12 -5
- package/vscode/src/vs/platform/accessibilitySignal/browser/progressAccessibilitySignalScheduler.js +25 -0
- package/vscode/src/vs/platform/actionWidget/browser/actionWidget.js +4 -4
- package/vscode/src/vs/platform/actions/browser/buttonbar.js +10 -7
- package/vscode/src/vs/platform/actions/browser/dropdownWithPrimaryActionViewItem.js +1 -1
- package/vscode/src/vs/platform/actions/browser/toolbar.d.ts +4 -1
- package/vscode/src/vs/platform/actions/browser/toolbar.js +53 -36
- package/vscode/src/vs/platform/actions/common/actions.d.ts +3 -1
- package/vscode/src/vs/platform/actions/common/actions.js +14 -4
- package/vscode/src/vs/platform/actions/common/menuService.js +30 -8
- package/vscode/src/vs/platform/configuration/common/configuration.js +4 -0
- package/vscode/src/vs/platform/configuration/common/configurationModels.js +43 -32
- package/vscode/src/vs/platform/configuration/common/configurations.js +12 -10
- package/vscode/src/vs/platform/contextview/browser/contextView.d.ts +4 -1
- package/vscode/src/vs/platform/contextview/browser/contextView.service.d.ts +2 -3
- package/vscode/src/vs/platform/contextview/browser/contextViewService.js +10 -8
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.d.ts +0 -1
- package/vscode/src/vs/platform/extensionManagement/common/extensionManagement.js +1 -0
- package/vscode/src/vs/platform/extensionManagement/common/extensionsScannerService.js +1 -0
- package/vscode/src/vs/platform/extensions/common/extensions.d.ts +5 -0
- package/vscode/src/vs/platform/files/common/files.d.ts +14 -1
- package/vscode/src/vs/platform/hover/browser/hover.service.d.ts +2 -31
- package/vscode/src/vs/platform/instantiation/common/instantiation.d.ts +9 -0
- package/vscode/src/vs/platform/instantiation/common/instantiationService.js +42 -8
- package/vscode/src/vs/platform/log/common/log.js +3 -1
- package/vscode/src/vs/platform/markers/common/markerService.js +7 -3
- package/vscode/src/vs/platform/opener/browser/link.js +6 -4
- package/vscode/src/vs/platform/quickinput/browser/quickInput.js +2 -2
- package/vscode/src/vs/platform/quickinput/browser/quickInputTree.js +15 -7
- package/vscode/src/vs/platform/telemetry/common/gdprTypings.d.ts +0 -1
- package/vscode/src/vs/platform/telemetry/common/telemetryUtils.js +1 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/capabilities.d.ts +5 -0
- package/vscode/src/vs/platform/terminal/common/capabilities/commandDetection/promptInputModel.d.ts +30 -0
- package/vscode/src/vs/platform/theme/browser/defaultStyles.js +6 -0
- package/vscode/src/vs/platform/theme/browser/iconsStyleSheet.js +13 -11
- package/vscode/src/vs/platform/userDataProfile/common/userDataProfile.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHost.api.impl.js +28 -28
- package/vscode/src/vs/workbench/api/common/extHost.protocol.js +2 -6
- package/vscode/src/vs/workbench/api/common/extHostBulkEdits.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostChatAgents2.js +104 -96
- package/vscode/src/vs/workbench/api/common/extHostChatVariables.js +4 -4
- package/vscode/src/vs/workbench/api/common/extHostConfiguration.js +9 -3
- package/vscode/src/vs/workbench/api/common/extHostDebugService.js +3 -3
- package/vscode/src/vs/workbench/api/common/extHostDocumentSaveParticipant.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostEditorTabs.js +1 -1
- package/vscode/src/vs/workbench/api/common/extHostFileSystemEventService.js +19 -1
- package/vscode/src/vs/workbench/api/common/extHostLanguageFeatures.js +87 -17
- package/vscode/src/vs/workbench/api/common/extHostLanguageModels.js +39 -2
- package/vscode/src/vs/workbench/api/common/extHostNotebookDocumentSaveParticipant.js +2 -1
- package/vscode/src/vs/workbench/api/common/extHostTerminalShellIntegration.js +52 -36
- package/vscode/src/vs/workbench/api/common/extHostTesting.js +10 -28
- package/vscode/src/vs/workbench/api/common/extHostTreeViews.js +6 -1
- package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +132 -136
- package/vscode/src/vs/workbench/api/common/extHostTypes.js +72 -18
- package/vscode/src/vs/workbench/api/common/extHostWindow.js +3 -5
- package/vscode/src/vs/workbench/browser/actions/layoutActions.js +86 -76
- package/vscode/src/vs/workbench/browser/actions/media/actions.css.js +1 -1
- package/vscode/src/vs/workbench/browser/actions/widgetNavigationCommands.js +30 -6
- package/vscode/src/vs/workbench/browser/labels.js +4 -1
- package/vscode/src/vs/workbench/browser/parts/compositePart.d.ts +3 -1
- package/vscode/src/vs/workbench/browser/parts/editor/diffEditorCommands.js +19 -7
- package/vscode/src/vs/workbench/browser/parts/editor/editorGroupView.js +16 -3
- package/vscode/src/vs/workbench/browser/parts/editor/media/editorquickaccess.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.js +14 -33
- package/vscode/src/vs/workbench/browser/parts/globalCompositeBar.js +33 -13
- package/vscode/src/vs/workbench/browser/parts/notifications/notificationsViewer.js +7 -5
- package/vscode/src/vs/workbench/browser/parts/paneCompositePart.d.ts +4 -3
- package/vscode/src/vs/workbench/browser/parts/panel/panelPart.d.ts +2 -1
- package/vscode/src/vs/workbench/browser/parts/sidebar/sidebarPart.d.ts +3 -1
- package/vscode/src/vs/workbench/browser/parts/views/checkbox.js +3 -3
- package/vscode/src/vs/workbench/browser/parts/views/media/views.css.js +1 -1
- package/vscode/src/vs/workbench/browser/parts/views/treeView.js +182 -63
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.d.ts +14 -3
- package/vscode/src/vs/workbench/browser/parts/views/viewPane.js +61 -34
- package/vscode/src/vs/workbench/browser/workbench.contribution.js +16 -10
- package/vscode/src/vs/workbench/common/theme.js +144 -98
- package/vscode/src/vs/workbench/common/views.d.ts +2 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibilityConfiguration.js +190 -138
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +876 -0
- package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleViewActions.js +59 -7
- package/vscode/src/vs/workbench/contrib/accessibility/browser/{accessibilityContributions.js → accessibleViewContributions.js} +160 -6
- package/vscode/src/vs/workbench/contrib/accessibility/browser/editorAccessibilityHelp.js +3 -3
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatActions.js +66 -150
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatExecuteActions.js +75 -12
- package/vscode/src/vs/workbench/contrib/chat/browser/actions/chatQuickInputActions.js +21 -22
- package/vscode/src/vs/workbench/contrib/chat/browser/chat.js +6 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/chatAgentHover.js +101 -0
- package/vscode/src/vs/workbench/contrib/chat/browser/chatEditorInput.js +6 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatInputPart.js +30 -23
- package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +201 -47
- package/vscode/src/vs/workbench/contrib/chat/browser/chatMarkdownDecorationsRenderer.js +42 -5
- package/vscode/src/vs/workbench/contrib/chat/browser/chatWidget.js +13 -28
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/codeBlockPart.js +366 -6
- package/vscode/src/vs/workbench/contrib/chat/browser/contrib/chatDynamicVariables.js +35 -2
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/browser/media/chatAgentHover.css.js +4 -0
- package/vscode/src/vs/workbench/contrib/chat/common/annotations.js +4 -9
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.js +95 -5
- package/vscode/src/vs/workbench/contrib/chat/common/chatAgents.service.js +2 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatColors.js +1 -1
- package/vscode/src/vs/workbench/contrib/chat/common/chatContextKeys.js +11 -6
- package/vscode/src/vs/workbench/contrib/chat/common/chatModel.js +94 -79
- package/vscode/src/vs/workbench/contrib/chat/common/chatParserTypes.js +0 -13
- package/vscode/src/vs/workbench/contrib/chat/common/chatParticipantContribTypes.js +2 -0
- package/vscode/src/vs/workbench/contrib/chat/common/chatViewModel.js +7 -9
- package/vscode/src/vs/workbench/contrib/chat/common/languageModelStats.service.js +3 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/dictation/editorDictation.js +1 -1
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/diffEditorHelper.js +1 -0
- package/vscode/src/vs/workbench/contrib/codeEditor/browser/find/simpleFindWidget.js +4 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentNode.js +30 -26
- package/vscode/src/vs/workbench/contrib/comments/browser/commentReply.js +30 -29
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadBody.js +4 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadWidget.js +5 -4
- package/vscode/src/vs/workbench/contrib/comments/browser/commentThreadZoneWidget.js +3 -3
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsController.js +13 -13
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsTreeViewer.js +26 -16
- package/vscode/src/vs/workbench/contrib/comments/browser/commentsView.js +107 -26
- package/vscode/src/vs/workbench/contrib/comments/browser/media/review.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/comments/browser/simpleCommentEditor.js +23 -2
- package/vscode/src/vs/workbench/contrib/comments/browser/timestamp.js +2 -3
- package/vscode/src/vs/workbench/contrib/debug/browser/baseDebugView.js +39 -11
- package/vscode/src/vs/workbench/contrib/debug/browser/breakpointsView.js +53 -33
- package/vscode/src/vs/workbench/contrib/debug/browser/debugCommands.js +967 -0
- package/vscode/src/vs/workbench/contrib/debug/browser/debugSessionPicker.js +101 -0
- package/vscode/src/vs/workbench/contrib/debug/common/debug.js +4 -1
- package/vscode/src/vs/workbench/contrib/debug/common/loadedScriptsPicker.js +82 -0
- package/vscode/src/vs/workbench/contrib/extensions/browser/extensionsActions.js +10 -9
- package/vscode/src/vs/workbench/contrib/files/browser/fileActions.js +79 -45
- package/vscode/src/vs/workbench/contrib/files/browser/{fileCommands.save.js → fileCommands._save.js} +4 -4
- package/vscode/src/vs/workbench/contrib/files/browser/{files.configuration.contribution.js → files.contribution._configuration.js} +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/{files.editorPane.contribution.js → files.contribution._editorPane.js} +18 -18
- package/vscode/src/vs/workbench/contrib/files/browser/views/emptyView.js +5 -3
- package/vscode/src/vs/workbench/contrib/files/browser/views/explorerView.js +19 -14
- package/vscode/src/vs/workbench/contrib/files/browser/views/media/openeditors.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/files/browser/views/openEditorsView.js +8 -8
- package/vscode/src/vs/workbench/contrib/files/browser/workspaceWatcher.js +15 -2
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatActions.js +29 -112
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatContentWidget.js +10 -7
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatController.js +99 -91
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSession.js +9 -31
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatSessionServiceImpl.js +345 -104
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatStrategies.js +62 -69
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatWidget.js +63 -46
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatZoneWidget.js +18 -10
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChat.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/media/inlineChatContentWidget.css.js +1 -1
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/utils.js +1 -31
- package/vscode/src/vs/workbench/contrib/inlineChat/common/inlineChat.js +7 -3
- package/vscode/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.js +5 -1
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInput.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeEditorInputModel.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/mergeMarkers/mergeMarkersController.js +1 -0
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/model/textModelDiffs.js +4 -4
- package/vscode/src/vs/workbench/contrib/mergeEditor/browser/utils.js +2 -48
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffEditorInput.js +28 -23
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/multiDiffSourceResolverService.js +5 -9
- package/vscode/src/vs/workbench/contrib/multiDiffEditor/browser/scmMultiDiffSourceResolver.js +112 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindReplaceWidget.js +18 -10
- package/vscode/src/vs/workbench/contrib/notebook/browser/contrib/find/notebookFindWidget.js +4 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/cellOutputActions.js +7 -2
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/chat/notebookChatController.js +4 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/controller/editActions.js +8 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookAccessibilityProvider.js +1 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditor.js +36 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.js +9 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/notebookOptions.js +17 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellActionView.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellComments.js +5 -5
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellEditorOptions.js +3 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellStatusPart.js +5 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/cellToolbars.js +2 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/cellParts/foldedCellHint.js +1 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/notebookCellAnchor.js +2 -3
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.js +22 -1
- package/vscode/src/vs/workbench/contrib/notebook/browser/view/renderers/webviewPreloads.js +34 -6
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/baseCellViewModel.js +15 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/cellEditorOptions.js +6 -4
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProviderFactory.service.js +3 -0
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorStickyScroll.js +17 -14
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewParts/notebookEditorToolbar.js +2 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/model/notebookCellTextModel.js +52 -16
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookCommon.js +3 -1
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookContextKeys.js +2 -2
- package/vscode/src/vs/workbench/contrib/notebook/common/notebookEditorModel.js +25 -12
- package/vscode/src/vs/workbench/contrib/preferences/browser/preferencesWidgets.js +6 -4
- package/vscode/src/vs/workbench/contrib/remote/browser/remoteExplorer.js +0 -2
- package/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.js +6 -4
- package/vscode/src/vs/workbench/contrib/scm/browser/dirtydiffDecorator.js +24 -2
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +38 -8
- package/vscode/src/vs/workbench/contrib/search/browser/searchModel.js +0 -1
- package/vscode/src/vs/workbench/contrib/speech/common/speechService.js +1 -0
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +7 -14
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.d.ts +24 -6
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.service.js +2 -1
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +8 -9
- package/vscode/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts +2 -20
- package/vscode/src/vs/workbench/contrib/terminal/common/terminal.d.ts +3 -1
- package/vscode/src/vs/workbench/contrib/terminal/common/terminalColorRegistry.js +2 -2
- package/vscode/src/vs/workbench/contrib/testing/common/testCoverage.js +1 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testItemCollection.js +10 -0
- package/vscode/src/vs/workbench/contrib/testing/common/testResult.js +15 -3
- package/vscode/src/vs/workbench/services/accessibility/common/accessibleViewInformationService.service.d.ts +9 -0
- package/vscode/src/vs/workbench/services/accessibility/common/accessibleViewInformationService.service.js +3 -0
- package/vscode/src/vs/workbench/services/editor/common/customEditorLabelService.js +30 -16
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.d.ts +15 -4
- package/vscode/src/vs/workbench/services/editor/common/editorGroupsService.service.d.ts +20 -1
- package/vscode/src/vs/workbench/services/extensionManagement/common/extensionManagement.service.d.ts +0 -1
- package/vscode/src/vs/workbench/services/extensions/common/abstractExtensionService.d.ts +4 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionHostManagers.d.ts +4 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionRunningLocation.d.ts +1 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensions.d.ts +8 -2
- package/vscode/src/vs/workbench/services/extensions/common/extensions.js +2 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensions.service.d.ts +4 -1
- package/vscode/src/vs/workbench/services/extensions/common/extensionsApiProposals.js +3 -3
- package/vscode/src/vs/workbench/services/language/common/languageService.js +23 -18
- package/vscode/src/vs/workbench/services/layout/browser/layoutService.js +6 -4
- package/vscode/src/vs/workbench/services/preferences/browser/keybindingsEditorModel.js +50 -9
- package/vscode/src/vs/workbench/services/themes/common/workbenchThemeService.js +1 -0
- package/vscode/src/vs/workbench/services/userDataProfile/browser/iconSelectBox.js +97 -0
- package/vscode/src/vs/workbench/services/workingCopy/common/fileWorkingCopy.d.ts +7 -2
- package/vscode/src/vs/workbench/services/workingCopy/common/storedFileWorkingCopy.js +2 -2
- package/vscode-dts/vscode.proposed.chatParticipant.d.ts +23 -45
- package/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts +65 -91
- package/vscode-dts/vscode.proposed.chatProvider.d.ts +9 -0
- package/vscode-dts/vscode.proposed.chatTab.d.ts +1 -5
- package/vscode-dts/vscode.proposed.contribAccessibilityHelpContent.d.ts +15 -0
- package/vscode-dts/vscode.proposed.debugFocus.d.ts +4 -4
- package/vscode-dts/vscode.proposed.defaultChatParticipant.d.ts +2 -2
- package/vscode-dts/vscode.proposed.documentPaste.d.ts +144 -43
- package/vscode-dts/vscode.proposed.editorHoverVerbosityLevel.d.ts +76 -0
- package/vscode-dts/vscode.proposed.interactive.d.ts +1 -17
- package/vscode-dts/vscode.proposed.languageModels.d.ts +56 -11
- package/vscode-dts/vscode.proposed.newSymbolNamesProvider.d.ts +12 -1
- package/vscode-dts/vscode.proposed.scmHistoryProvider.d.ts +4 -4
- package/vscode-dts/vscode.proposed.speech.d.ts +2 -1
- package/vscode-dts/vscode.proposed.terminalShellIntegration.d.ts +144 -38
- package/vscode-dts/vscode.proposed.testPreserveFocus.d.ts +28 -0
- package/vscode/src/vs/base/browser/ui/hover/updatableHoverWidget.d.ts +0 -21
- package/vscode/src/vs/base/browser/ui/hover/updatableHoverWidget.js +0 -214
- package/vscode/src/vs/editor/browser/services/hoverService/hoverService.d.ts +0 -32
- package/vscode/src/vs/editor/contrib/hover/browser/contentHover.js +0 -838
- package/vscode/src/vs/editor/contrib/hover/browser/hover.js +0 -621
- package/vscode/src/vs/platform/accessibility/common/accessibility.service.d.ts +0 -19
- package/vscode/src/vs/workbench/api/common/extHostChat.js +0 -54
- package/vscode/src/vs/workbench/api/common/extHostIssueReporter.js +0 -70
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignal.contribution.js +0 -237
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalDebuggerContribution.js +0 -49
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/accessibilitySignalLineFeatureContribution.js +0 -178
- package/vscode/src/vs/workbench/contrib/accessibilitySignals/browser/commands.js +0 -141
- package/vscode/src/vs/workbench/contrib/chat/common/chatContributionService.service.js +0 -3
- package/vscode/src/vs/workbench/contrib/inlineChat/browser/inlineChatFileCreationWidget.js +0 -212
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/OutlineEntry.js +0 -95
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineEntryFactory.js +0 -110
- package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/notebookOutlineProvider.js +0 -224
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalConfigHelper.d.ts +0 -48
- package/vscode/src/vs/workbench/contrib/terminal/browser/terminalEvents.js +0 -47
- package/vscode-dts/vscode.proposed.dropMetadata.d.ts +0 -65
- package/vscode-dts/vscode.proposed.handleIssueUri.d.ts +0 -57
- package/vscode-dts/vscode.proposed.windowActivity.d.ts +0 -17
- /package/vscode/src/vs/workbench/browser/parts/editor/{editor.autosave.contribution.js → editor.contribution._autosave.js} +0 -0
- /package/vscode/src/vs/workbench/contrib/files/browser/{files.fileEditorFactory.contribution.js → files.contribution._fileEditorFactory.js} +0 -0
|
@@ -0,0 +1,967 @@
|
|
|
1
|
+
import { localizeWithPath, localize2WithPath } from '../../../../nls.js';
|
|
2
|
+
import { List } from '../../../../base/browser/ui/list/listWidget.js';
|
|
3
|
+
import { KeybindingsRegistry } from '../../../../platform/keybinding/common/keybindingsRegistry.js';
|
|
4
|
+
import { IListService } from '../../../../platform/list/browser/listService.service.js';
|
|
5
|
+
import { CONTEXT_DISASSEMBLY_VIEW_FOCUS, CONTEXT_JUMP_TO_CURSOR_SUPPORTED, CONTEXT_IN_DEBUG_REPL, CONTEXT_IN_DEBUG_MODE, CONTEXT_DEBUG_STATE, CONTEXT_STEP_INTO_TARGETS_SUPPORTED, CONTEXT_FOCUSED_SESSION_IS_ATTACH, REPL_VIEW_ID, CONTEXT_DEBUGGERS_AVAILABLE, getStateLabel, CONTEXT_BREAKPOINTS_FOCUSED, CONTEXT_WATCH_EXPRESSIONS_FOCUSED, CONTEXT_VARIABLES_FOCUSED, CONTEXT_EXPRESSION_SELECTED, CONTEXT_BREAKPOINT_INPUT_FOCUSED, VIEWLET_ID as VIEWLET_ID$1, isFrameDeemphasized, EDITOR_CONTRIBUTION_ID } from '../common/debug.js';
|
|
6
|
+
import { IDebugService } from '../common/debug.service.js';
|
|
7
|
+
import { Expression, Variable, Breakpoint, FunctionBreakpoint, DataBreakpoint } from '../common/debugModel.js';
|
|
8
|
+
import { VIEWLET_ID } from '../../extensions/common/extensions.js';
|
|
9
|
+
import { isCodeEditor } from '../../../../editor/browser/editorBrowser.js';
|
|
10
|
+
import { MenuRegistry, MenuId, registerAction2, Action2 } from '../../../../platform/actions/common/actions.js';
|
|
11
|
+
import { IEditorService } from '../../../services/editor/common/editorService.service.js';
|
|
12
|
+
import { EditorContextKeys } from '../../../../editor/common/editorContextKeys.js';
|
|
13
|
+
import { ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js';
|
|
14
|
+
import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.service.js';
|
|
15
|
+
import { openBreakpointSource } from './breakpointsView.js';
|
|
16
|
+
import { INotificationService } from '../../../../platform/notification/common/notification.service.js';
|
|
17
|
+
import { InputFocusedContext } from '../../../../platform/contextkey/common/contextkeys.js';
|
|
18
|
+
import { PanelFocusContext, ResourceContextKey, ActiveEditorContext } from '../../../common/contextkeys.js';
|
|
19
|
+
import { CommandsRegistry } from '../../../../platform/commands/common/commands.js';
|
|
20
|
+
import { ICommandService } from '../../../../platform/commands/common/commands.service.js';
|
|
21
|
+
import { ITextResourcePropertiesService } from '../../../../editor/common/services/textResourceConfiguration.js';
|
|
22
|
+
import { IClipboardService } from '../../../../platform/clipboard/common/clipboardService.service.js';
|
|
23
|
+
import { IConfigurationService } from '../../../../platform/configuration/common/configuration.service.js';
|
|
24
|
+
import { IQuickInputService } from '../../../../platform/quickinput/common/quickInput.service.js';
|
|
25
|
+
import { IViewsService } from '../../../services/views/common/viewsService.service.js';
|
|
26
|
+
import { deepClone } from '../../../../base/common/objects.js';
|
|
27
|
+
import { isWeb, isWindows } from '../../../../base/common/platform.js';
|
|
28
|
+
import { saveAllBeforeDebugStart } from '../common/debugUtils.js';
|
|
29
|
+
import { IPaneCompositePartService } from '../../../services/panecomposite/browser/panecomposite.service.js';
|
|
30
|
+
import { showLoadedScriptMenu } from '../common/loadedScriptsPicker.js';
|
|
31
|
+
import { showDebugSessionMenu } from './debugSessionPicker.js';
|
|
32
|
+
import { TEXT_FILE_EDITOR_ID } from '../../files/common/files.js';
|
|
33
|
+
const _moduleId = "vs/workbench/contrib/debug/browser/debugCommands";
|
|
34
|
+
const ADD_CONFIGURATION_ID = 'debug.addConfiguration';
|
|
35
|
+
const TOGGLE_INLINE_BREAKPOINT_ID = 'editor.debug.action.toggleInlineBreakpoint';
|
|
36
|
+
const COPY_STACK_TRACE_ID = 'debug.copyStackTrace';
|
|
37
|
+
const REVERSE_CONTINUE_ID = 'workbench.action.debug.reverseContinue';
|
|
38
|
+
const STEP_BACK_ID = 'workbench.action.debug.stepBack';
|
|
39
|
+
const RESTART_SESSION_ID = 'workbench.action.debug.restart';
|
|
40
|
+
const TERMINATE_THREAD_ID = 'workbench.action.debug.terminateThread';
|
|
41
|
+
const STEP_OVER_ID = 'workbench.action.debug.stepOver';
|
|
42
|
+
const STEP_INTO_ID = 'workbench.action.debug.stepInto';
|
|
43
|
+
const STEP_INTO_TARGET_ID = 'workbench.action.debug.stepIntoTarget';
|
|
44
|
+
const STEP_OUT_ID = 'workbench.action.debug.stepOut';
|
|
45
|
+
const PAUSE_ID = 'workbench.action.debug.pause';
|
|
46
|
+
const DISCONNECT_ID = 'workbench.action.debug.disconnect';
|
|
47
|
+
const DISCONNECT_AND_SUSPEND_ID = 'workbench.action.debug.disconnectAndSuspend';
|
|
48
|
+
const STOP_ID = 'workbench.action.debug.stop';
|
|
49
|
+
const RESTART_FRAME_ID = 'workbench.action.debug.restartFrame';
|
|
50
|
+
const CONTINUE_ID = 'workbench.action.debug.continue';
|
|
51
|
+
const FOCUS_REPL_ID = 'workbench.debug.action.focusRepl';
|
|
52
|
+
const JUMP_TO_CURSOR_ID = 'debug.jumpToCursor';
|
|
53
|
+
const FOCUS_SESSION_ID = 'workbench.action.debug.focusProcess';
|
|
54
|
+
const SELECT_AND_START_ID = 'workbench.action.debug.selectandstart';
|
|
55
|
+
const SELECT_DEBUG_CONSOLE_ID = 'workbench.action.debug.selectDebugConsole';
|
|
56
|
+
const SELECT_DEBUG_SESSION_ID = 'workbench.action.debug.selectDebugSession';
|
|
57
|
+
const DEBUG_CONFIGURE_COMMAND_ID = 'workbench.action.debug.configure';
|
|
58
|
+
const DEBUG_START_COMMAND_ID = 'workbench.action.debug.start';
|
|
59
|
+
const DEBUG_RUN_COMMAND_ID = 'workbench.action.debug.run';
|
|
60
|
+
const EDIT_EXPRESSION_COMMAND_ID = 'debug.renameWatchExpression';
|
|
61
|
+
const SET_EXPRESSION_COMMAND_ID = 'debug.setWatchExpression';
|
|
62
|
+
const REMOVE_EXPRESSION_COMMAND_ID = 'debug.removeWatchExpression';
|
|
63
|
+
const NEXT_DEBUG_CONSOLE_ID = 'workbench.action.debug.nextConsole';
|
|
64
|
+
const PREV_DEBUG_CONSOLE_ID = 'workbench.action.debug.prevConsole';
|
|
65
|
+
const SHOW_LOADED_SCRIPTS_ID = 'workbench.action.debug.showLoadedScripts';
|
|
66
|
+
const CALLSTACK_TOP_ID = 'workbench.action.debug.callStackTop';
|
|
67
|
+
const CALLSTACK_BOTTOM_ID = 'workbench.action.debug.callStackBottom';
|
|
68
|
+
const CALLSTACK_UP_ID = 'workbench.action.debug.callStackUp';
|
|
69
|
+
const CALLSTACK_DOWN_ID = 'workbench.action.debug.callStackDown';
|
|
70
|
+
const ADD_TO_WATCH_ID = 'debug.addToWatchExpressions';
|
|
71
|
+
const COPY_EVALUATE_PATH_ID = 'debug.copyEvaluatePath';
|
|
72
|
+
const COPY_VALUE_ID = 'workbench.debug.viewlet.action.copyValue';
|
|
73
|
+
const DEBUG_COMMAND_CATEGORY = ( localize2WithPath(_moduleId, 0, 'Debug'));
|
|
74
|
+
const RESTART_LABEL = ( localize2WithPath(_moduleId, 1, "Restart"));
|
|
75
|
+
const STEP_OVER_LABEL = ( localize2WithPath(_moduleId, 2, "Step Over"));
|
|
76
|
+
const STEP_INTO_LABEL = ( localize2WithPath(_moduleId, 3, "Step Into"));
|
|
77
|
+
const STEP_INTO_TARGET_LABEL = ( localize2WithPath(_moduleId, 4, "Step Into Target"));
|
|
78
|
+
const STEP_OUT_LABEL = ( localize2WithPath(_moduleId, 5, "Step Out"));
|
|
79
|
+
const PAUSE_LABEL = ( localize2WithPath(_moduleId, 6, "Pause"));
|
|
80
|
+
const DISCONNECT_LABEL = ( localize2WithPath(_moduleId, 7, "Disconnect"));
|
|
81
|
+
const DISCONNECT_AND_SUSPEND_LABEL = ( localize2WithPath(_moduleId, 8, "Disconnect and Suspend"));
|
|
82
|
+
const STOP_LABEL = ( localize2WithPath(_moduleId, 9, "Stop"));
|
|
83
|
+
const CONTINUE_LABEL = ( localize2WithPath(_moduleId, 10, "Continue"));
|
|
84
|
+
const FOCUS_SESSION_LABEL = ( localize2WithPath(_moduleId, 11, "Focus Session"));
|
|
85
|
+
const SELECT_AND_START_LABEL = ( localize2WithPath(_moduleId, 12, "Select and Start Debugging"));
|
|
86
|
+
const DEBUG_CONFIGURE_LABEL = ( localizeWithPath(_moduleId, 13, "Open '{0}'", 'launch.json'));
|
|
87
|
+
const DEBUG_START_LABEL = ( localize2WithPath(_moduleId, 14, "Start Debugging"));
|
|
88
|
+
const DEBUG_RUN_LABEL = ( localize2WithPath(_moduleId, 15, "Start Without Debugging"));
|
|
89
|
+
const NEXT_DEBUG_CONSOLE_LABEL = ( localize2WithPath(_moduleId, 16, "Focus Next Debug Console"));
|
|
90
|
+
const PREV_DEBUG_CONSOLE_LABEL = ( localize2WithPath(_moduleId, 17, "Focus Previous Debug Console"));
|
|
91
|
+
const OPEN_LOADED_SCRIPTS_LABEL = ( localize2WithPath(_moduleId, 18, "Open Loaded Script..."));
|
|
92
|
+
const CALLSTACK_TOP_LABEL = ( localize2WithPath(_moduleId, 19, "Navigate to Top of Call Stack"));
|
|
93
|
+
const CALLSTACK_BOTTOM_LABEL = ( localize2WithPath(_moduleId, 20, "Navigate to Bottom of Call Stack"));
|
|
94
|
+
const CALLSTACK_UP_LABEL = ( localize2WithPath(_moduleId, 21, "Navigate Up Call Stack"));
|
|
95
|
+
const CALLSTACK_DOWN_LABEL = ( localize2WithPath(_moduleId, 22, "Navigate Down Call Stack"));
|
|
96
|
+
const COPY_EVALUATE_PATH_LABEL = ( localize2WithPath(_moduleId, 23, "Copy as Expression"));
|
|
97
|
+
const COPY_VALUE_LABEL = ( localize2WithPath(_moduleId, 24, "Copy Value"));
|
|
98
|
+
const ADD_TO_WATCH_LABEL = ( localize2WithPath(_moduleId, 25, "Add to Watch"));
|
|
99
|
+
const SELECT_DEBUG_CONSOLE_LABEL = ( localize2WithPath(_moduleId, 26, "Select Debug Console"));
|
|
100
|
+
const SELECT_DEBUG_SESSION_LABEL = ( localize2WithPath(_moduleId, 27, "Select Debug Session"));
|
|
101
|
+
const DEBUG_QUICK_ACCESS_PREFIX = 'debug ';
|
|
102
|
+
const DEBUG_CONSOLE_QUICK_ACCESS_PREFIX = 'debug consoles ';
|
|
103
|
+
function isThreadContext(obj) {
|
|
104
|
+
return obj && typeof obj.sessionId === 'string' && typeof obj.threadId === 'string';
|
|
105
|
+
}
|
|
106
|
+
async function getThreadAndRun(accessor, sessionAndThreadId, run) {
|
|
107
|
+
const debugService = accessor.get(IDebugService);
|
|
108
|
+
let thread;
|
|
109
|
+
if (isThreadContext(sessionAndThreadId)) {
|
|
110
|
+
const session = debugService.getModel().getSession(sessionAndThreadId.sessionId);
|
|
111
|
+
if (session) {
|
|
112
|
+
thread = session.getAllThreads().find(t => t.getId() === sessionAndThreadId.threadId);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
else if (isSessionContext(sessionAndThreadId)) {
|
|
116
|
+
const session = debugService.getModel().getSession(sessionAndThreadId.sessionId);
|
|
117
|
+
if (session) {
|
|
118
|
+
const threads = session.getAllThreads();
|
|
119
|
+
thread = threads.length > 0 ? threads[0] : undefined;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
if (!thread) {
|
|
123
|
+
thread = debugService.getViewModel().focusedThread;
|
|
124
|
+
if (!thread) {
|
|
125
|
+
const focusedSession = debugService.getViewModel().focusedSession;
|
|
126
|
+
const threads = focusedSession ? focusedSession.getAllThreads() : undefined;
|
|
127
|
+
thread = threads && threads.length ? threads[0] : undefined;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if (thread) {
|
|
131
|
+
await run(thread);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function isStackFrameContext(obj) {
|
|
135
|
+
return obj && typeof obj.sessionId === 'string' && typeof obj.threadId === 'string' && typeof obj.frameId === 'string';
|
|
136
|
+
}
|
|
137
|
+
function getFrame(debugService, context) {
|
|
138
|
+
if (isStackFrameContext(context)) {
|
|
139
|
+
const session = debugService.getModel().getSession(context.sessionId);
|
|
140
|
+
if (session) {
|
|
141
|
+
const thread = session.getAllThreads().find(t => t.getId() === context.threadId);
|
|
142
|
+
if (thread) {
|
|
143
|
+
return thread.getCallStack().find(sf => sf.getId() === context.frameId);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
else {
|
|
148
|
+
return debugService.getViewModel().focusedStackFrame;
|
|
149
|
+
}
|
|
150
|
+
return undefined;
|
|
151
|
+
}
|
|
152
|
+
function isSessionContext(obj) {
|
|
153
|
+
return obj && typeof obj.sessionId === 'string';
|
|
154
|
+
}
|
|
155
|
+
async function changeDebugConsoleFocus(accessor, next) {
|
|
156
|
+
const debugService = accessor.get(IDebugService);
|
|
157
|
+
const viewsService = accessor.get(IViewsService);
|
|
158
|
+
const sessions = debugService.getModel().getSessions(true).filter(s => s.hasSeparateRepl());
|
|
159
|
+
let currSession = debugService.getViewModel().focusedSession;
|
|
160
|
+
let nextIndex = 0;
|
|
161
|
+
if (sessions.length > 0 && currSession) {
|
|
162
|
+
while (currSession && !currSession.hasSeparateRepl()) {
|
|
163
|
+
currSession = currSession.parentSession;
|
|
164
|
+
}
|
|
165
|
+
if (currSession) {
|
|
166
|
+
const currIndex = sessions.indexOf(currSession);
|
|
167
|
+
if (next) {
|
|
168
|
+
nextIndex = (currIndex === (sessions.length - 1) ? 0 : (currIndex + 1));
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
nextIndex = (currIndex === 0 ? (sessions.length - 1) : (currIndex - 1));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
await debugService.focusStackFrame(undefined, undefined, sessions[nextIndex], { explicit: true });
|
|
176
|
+
if (!viewsService.isViewVisible(REPL_VIEW_ID)) {
|
|
177
|
+
await viewsService.openView(REPL_VIEW_ID, true);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
async function navigateCallStack(debugService, down) {
|
|
181
|
+
const frame = debugService.getViewModel().focusedStackFrame;
|
|
182
|
+
if (frame) {
|
|
183
|
+
let callStack = frame.thread.getCallStack();
|
|
184
|
+
let index = callStack.findIndex(elem => elem.frameId === frame.frameId);
|
|
185
|
+
let nextVisibleFrame;
|
|
186
|
+
if (down) {
|
|
187
|
+
if (index >= callStack.length - 1) {
|
|
188
|
+
if (frame.thread.reachedEndOfCallStack) {
|
|
189
|
+
goToTopOfCallStack(debugService);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
await debugService.getModel().fetchCallstack(frame.thread, 20);
|
|
194
|
+
callStack = frame.thread.getCallStack();
|
|
195
|
+
index = callStack.findIndex(elem => elem.frameId === frame.frameId);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
nextVisibleFrame = findNextVisibleFrame(true, callStack, index);
|
|
199
|
+
}
|
|
200
|
+
else {
|
|
201
|
+
if (index <= 0) {
|
|
202
|
+
goToBottomOfCallStack(debugService);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
nextVisibleFrame = findNextVisibleFrame(false, callStack, index);
|
|
206
|
+
}
|
|
207
|
+
if (nextVisibleFrame) {
|
|
208
|
+
debugService.focusStackFrame(nextVisibleFrame, undefined, undefined, { preserveFocus: false });
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
async function goToBottomOfCallStack(debugService) {
|
|
213
|
+
const thread = debugService.getViewModel().focusedThread;
|
|
214
|
+
if (thread) {
|
|
215
|
+
await debugService.getModel().fetchCallstack(thread);
|
|
216
|
+
const callStack = thread.getCallStack();
|
|
217
|
+
if (callStack.length > 0) {
|
|
218
|
+
const nextVisibleFrame = findNextVisibleFrame(false, callStack, 0);
|
|
219
|
+
if (nextVisibleFrame) {
|
|
220
|
+
debugService.focusStackFrame(nextVisibleFrame, undefined, undefined, { preserveFocus: false });
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
function goToTopOfCallStack(debugService) {
|
|
226
|
+
const thread = debugService.getViewModel().focusedThread;
|
|
227
|
+
if (thread) {
|
|
228
|
+
debugService.focusStackFrame(thread.getTopStackFrame(), undefined, undefined, { preserveFocus: false });
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
function findNextVisibleFrame(down, callStack, startIndex) {
|
|
232
|
+
if (startIndex >= callStack.length) {
|
|
233
|
+
startIndex = callStack.length - 1;
|
|
234
|
+
}
|
|
235
|
+
else if (startIndex < 0) {
|
|
236
|
+
startIndex = 0;
|
|
237
|
+
}
|
|
238
|
+
let index = startIndex;
|
|
239
|
+
let currFrame;
|
|
240
|
+
do {
|
|
241
|
+
if (down) {
|
|
242
|
+
if (index === callStack.length - 1) {
|
|
243
|
+
index = 0;
|
|
244
|
+
}
|
|
245
|
+
else {
|
|
246
|
+
index++;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
if (index === 0) {
|
|
251
|
+
index = callStack.length - 1;
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
index--;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
currFrame = callStack[index];
|
|
258
|
+
if (!isFrameDeemphasized(currFrame)) {
|
|
259
|
+
return currFrame;
|
|
260
|
+
}
|
|
261
|
+
} while (index !== startIndex);
|
|
262
|
+
return undefined;
|
|
263
|
+
}
|
|
264
|
+
CommandsRegistry.registerCommand({
|
|
265
|
+
id: COPY_STACK_TRACE_ID,
|
|
266
|
+
handler: async (accessor, _, context) => {
|
|
267
|
+
const textResourcePropertiesService = accessor.get(ITextResourcePropertiesService);
|
|
268
|
+
const clipboardService = accessor.get(IClipboardService);
|
|
269
|
+
const debugService = accessor.get(IDebugService);
|
|
270
|
+
const frame = getFrame(debugService, context);
|
|
271
|
+
if (frame) {
|
|
272
|
+
const eol = textResourcePropertiesService.getEOL(frame.source.uri);
|
|
273
|
+
await clipboardService.writeText(( (frame.thread.getCallStack().map(sf => ( (sf.toString()))))).join(eol));
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
CommandsRegistry.registerCommand({
|
|
278
|
+
id: REVERSE_CONTINUE_ID,
|
|
279
|
+
handler: async (accessor, _, context) => {
|
|
280
|
+
await getThreadAndRun(accessor, context, thread => thread.reverseContinue());
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
CommandsRegistry.registerCommand({
|
|
284
|
+
id: STEP_BACK_ID,
|
|
285
|
+
handler: async (accessor, _, context) => {
|
|
286
|
+
const contextKeyService = accessor.get(IContextKeyService);
|
|
287
|
+
if (CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(contextKeyService)) {
|
|
288
|
+
await getThreadAndRun(accessor, context, (thread) => thread.stepBack('instruction'));
|
|
289
|
+
}
|
|
290
|
+
else {
|
|
291
|
+
await getThreadAndRun(accessor, context, (thread) => thread.stepBack());
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
});
|
|
295
|
+
CommandsRegistry.registerCommand({
|
|
296
|
+
id: TERMINATE_THREAD_ID,
|
|
297
|
+
handler: async (accessor, _, context) => {
|
|
298
|
+
await getThreadAndRun(accessor, context, thread => thread.terminate());
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
CommandsRegistry.registerCommand({
|
|
302
|
+
id: JUMP_TO_CURSOR_ID,
|
|
303
|
+
handler: async (accessor) => {
|
|
304
|
+
const debugService = accessor.get(IDebugService);
|
|
305
|
+
const stackFrame = debugService.getViewModel().focusedStackFrame;
|
|
306
|
+
const editorService = accessor.get(IEditorService);
|
|
307
|
+
const activeEditorControl = editorService.activeTextEditorControl;
|
|
308
|
+
const notificationService = accessor.get(INotificationService);
|
|
309
|
+
const quickInputService = accessor.get(IQuickInputService);
|
|
310
|
+
if (stackFrame && isCodeEditor(activeEditorControl) && activeEditorControl.hasModel()) {
|
|
311
|
+
const position = activeEditorControl.getPosition();
|
|
312
|
+
const resource = activeEditorControl.getModel().uri;
|
|
313
|
+
const source = stackFrame.thread.session.getSourceForUri(resource);
|
|
314
|
+
if (source) {
|
|
315
|
+
const response = await stackFrame.thread.session.gotoTargets(source.raw, position.lineNumber, position.column);
|
|
316
|
+
const targets = response?.body.targets;
|
|
317
|
+
if (targets && targets.length) {
|
|
318
|
+
let id = targets[0].id;
|
|
319
|
+
if (targets.length > 1) {
|
|
320
|
+
const picks = ( (targets.map(t => ({ label: t.label, _id: t.id }))));
|
|
321
|
+
const pick = await quickInputService.pick(picks, { placeHolder: ( localizeWithPath(_moduleId, 28, "Choose the specific location")) });
|
|
322
|
+
if (!pick) {
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
id = pick._id;
|
|
326
|
+
}
|
|
327
|
+
return await stackFrame.thread.session.goto(stackFrame.thread.threadId, id).catch(e => notificationService.warn(e));
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
return notificationService.warn(( localizeWithPath(
|
|
332
|
+
_moduleId,
|
|
333
|
+
29,
|
|
334
|
+
"No executable code is associated at the current cursor position."
|
|
335
|
+
)));
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
CommandsRegistry.registerCommand({
|
|
339
|
+
id: CALLSTACK_TOP_ID,
|
|
340
|
+
handler: async (accessor, _, context) => {
|
|
341
|
+
const debugService = accessor.get(IDebugService);
|
|
342
|
+
goToTopOfCallStack(debugService);
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
CommandsRegistry.registerCommand({
|
|
346
|
+
id: CALLSTACK_BOTTOM_ID,
|
|
347
|
+
handler: async (accessor, _, context) => {
|
|
348
|
+
const debugService = accessor.get(IDebugService);
|
|
349
|
+
await goToBottomOfCallStack(debugService);
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
CommandsRegistry.registerCommand({
|
|
353
|
+
id: CALLSTACK_UP_ID,
|
|
354
|
+
handler: async (accessor, _, context) => {
|
|
355
|
+
const debugService = accessor.get(IDebugService);
|
|
356
|
+
navigateCallStack(debugService, false);
|
|
357
|
+
}
|
|
358
|
+
});
|
|
359
|
+
CommandsRegistry.registerCommand({
|
|
360
|
+
id: CALLSTACK_DOWN_ID,
|
|
361
|
+
handler: async (accessor, _, context) => {
|
|
362
|
+
const debugService = accessor.get(IDebugService);
|
|
363
|
+
navigateCallStack(debugService, true);
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
MenuRegistry.appendMenuItem(MenuId.EditorContext, {
|
|
367
|
+
command: {
|
|
368
|
+
id: JUMP_TO_CURSOR_ID,
|
|
369
|
+
title: ( localizeWithPath(_moduleId, 30, "Jump to Cursor")),
|
|
370
|
+
category: DEBUG_COMMAND_CATEGORY
|
|
371
|
+
},
|
|
372
|
+
when: ( (ContextKeyExpr.and(CONTEXT_JUMP_TO_CURSOR_SUPPORTED, EditorContextKeys.editorTextFocus))),
|
|
373
|
+
group: 'debug',
|
|
374
|
+
order: 3
|
|
375
|
+
});
|
|
376
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
377
|
+
id: NEXT_DEBUG_CONSOLE_ID,
|
|
378
|
+
weight: 200 + 1,
|
|
379
|
+
when: CONTEXT_IN_DEBUG_REPL,
|
|
380
|
+
primary: 2048 | 12 ,
|
|
381
|
+
mac: { primary: 1024 | 2048 | 94 },
|
|
382
|
+
handler: async (accessor, _, context) => {
|
|
383
|
+
changeDebugConsoleFocus(accessor, true);
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
387
|
+
id: PREV_DEBUG_CONSOLE_ID,
|
|
388
|
+
weight: 200 + 1,
|
|
389
|
+
when: CONTEXT_IN_DEBUG_REPL,
|
|
390
|
+
primary: 2048 | 11 ,
|
|
391
|
+
mac: { primary: 1024 | 2048 | 92 },
|
|
392
|
+
handler: async (accessor, _, context) => {
|
|
393
|
+
changeDebugConsoleFocus(accessor, false);
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
397
|
+
id: RESTART_SESSION_ID,
|
|
398
|
+
weight: 200 ,
|
|
399
|
+
primary: 1024 | 2048 | 63 ,
|
|
400
|
+
when: CONTEXT_IN_DEBUG_MODE,
|
|
401
|
+
handler: async (accessor, _, context) => {
|
|
402
|
+
const debugService = accessor.get(IDebugService);
|
|
403
|
+
const configurationService = accessor.get(IConfigurationService);
|
|
404
|
+
let session;
|
|
405
|
+
if (isSessionContext(context)) {
|
|
406
|
+
session = debugService.getModel().getSession(context.sessionId);
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
session = debugService.getViewModel().focusedSession;
|
|
410
|
+
}
|
|
411
|
+
if (!session) {
|
|
412
|
+
const { launch, name } = debugService.getConfigurationManager().selectedConfiguration;
|
|
413
|
+
await debugService.startDebugging(launch, name, { noDebug: false, startedByUser: true });
|
|
414
|
+
}
|
|
415
|
+
else {
|
|
416
|
+
const showSubSessions = configurationService.getValue('debug').showSubSessionsInToolBar;
|
|
417
|
+
while (!showSubSessions && session.lifecycleManagedByParent && session.parentSession) {
|
|
418
|
+
session = session.parentSession;
|
|
419
|
+
}
|
|
420
|
+
session.removeReplExpressions();
|
|
421
|
+
await debugService.restartSession(session);
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
});
|
|
425
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
426
|
+
id: STEP_OVER_ID,
|
|
427
|
+
weight: 200 ,
|
|
428
|
+
primary: 68 ,
|
|
429
|
+
when: ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))),
|
|
430
|
+
handler: async (accessor, _, context) => {
|
|
431
|
+
const contextKeyService = accessor.get(IContextKeyService);
|
|
432
|
+
if (CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(contextKeyService)) {
|
|
433
|
+
await getThreadAndRun(accessor, context, (thread) => thread.next('instruction'));
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
await getThreadAndRun(accessor, context, (thread) => thread.next());
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
const STEP_INTO_KEYBINDING = (isWeb && isWindows) ? ((512 | 69) ) : 69 ;
|
|
441
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
442
|
+
id: STEP_INTO_ID,
|
|
443
|
+
weight: 200 + 10,
|
|
444
|
+
primary: STEP_INTO_KEYBINDING,
|
|
445
|
+
when: ( (CONTEXT_DEBUG_STATE.notEqualsTo('inactive'))),
|
|
446
|
+
handler: async (accessor, _, context) => {
|
|
447
|
+
const contextKeyService = accessor.get(IContextKeyService);
|
|
448
|
+
if (CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(contextKeyService)) {
|
|
449
|
+
await getThreadAndRun(accessor, context, (thread) => thread.stepIn('instruction'));
|
|
450
|
+
}
|
|
451
|
+
else {
|
|
452
|
+
await getThreadAndRun(accessor, context, (thread) => thread.stepIn());
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
});
|
|
456
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
457
|
+
id: STEP_OUT_ID,
|
|
458
|
+
weight: 200 ,
|
|
459
|
+
primary: 1024 | 69 ,
|
|
460
|
+
when: ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))),
|
|
461
|
+
handler: async (accessor, _, context) => {
|
|
462
|
+
const contextKeyService = accessor.get(IContextKeyService);
|
|
463
|
+
if (CONTEXT_DISASSEMBLY_VIEW_FOCUS.getValue(contextKeyService)) {
|
|
464
|
+
await getThreadAndRun(accessor, context, (thread) => thread.stepOut('instruction'));
|
|
465
|
+
}
|
|
466
|
+
else {
|
|
467
|
+
await getThreadAndRun(accessor, context, (thread) => thread.stepOut());
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
472
|
+
id: PAUSE_ID,
|
|
473
|
+
weight: 200 + 2,
|
|
474
|
+
primary: 64 ,
|
|
475
|
+
when: ( (CONTEXT_DEBUG_STATE.isEqualTo('running'))),
|
|
476
|
+
handler: async (accessor, _, context) => {
|
|
477
|
+
await getThreadAndRun(accessor, context, thread => thread.pause());
|
|
478
|
+
}
|
|
479
|
+
});
|
|
480
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
481
|
+
id: STEP_INTO_TARGET_ID,
|
|
482
|
+
primary: STEP_INTO_KEYBINDING | 2048 ,
|
|
483
|
+
when: ( (ContextKeyExpr.and(
|
|
484
|
+
CONTEXT_STEP_INTO_TARGETS_SUPPORTED,
|
|
485
|
+
CONTEXT_IN_DEBUG_MODE,
|
|
486
|
+
(CONTEXT_DEBUG_STATE.isEqualTo('stopped'))
|
|
487
|
+
))),
|
|
488
|
+
weight: 200 ,
|
|
489
|
+
handler: async (accessor, _, context) => {
|
|
490
|
+
const quickInputService = accessor.get(IQuickInputService);
|
|
491
|
+
const debugService = accessor.get(IDebugService);
|
|
492
|
+
const session = debugService.getViewModel().focusedSession;
|
|
493
|
+
const frame = debugService.getViewModel().focusedStackFrame;
|
|
494
|
+
if (!frame || !session) {
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
const editor = await accessor.get(IEditorService).openEditor({
|
|
498
|
+
resource: frame.source.uri,
|
|
499
|
+
options: { revealIfOpened: true }
|
|
500
|
+
});
|
|
501
|
+
let codeEditor;
|
|
502
|
+
if (editor) {
|
|
503
|
+
const ctrl = editor?.getControl();
|
|
504
|
+
if (isCodeEditor(ctrl)) {
|
|
505
|
+
codeEditor = ctrl;
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
const qp = quickInputService.createQuickPick();
|
|
509
|
+
qp.busy = true;
|
|
510
|
+
qp.show();
|
|
511
|
+
qp.onDidChangeActive(([item]) => {
|
|
512
|
+
if (codeEditor && item && item.target.line !== undefined) {
|
|
513
|
+
codeEditor.revealLineInCenterIfOutsideViewport(item.target.line);
|
|
514
|
+
codeEditor.setSelection({
|
|
515
|
+
startLineNumber: item.target.line,
|
|
516
|
+
startColumn: item.target.column || 1,
|
|
517
|
+
endLineNumber: item.target.endLine || item.target.line,
|
|
518
|
+
endColumn: item.target.endColumn || item.target.column || 1,
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
qp.onDidAccept(() => {
|
|
523
|
+
if (qp.activeItems.length) {
|
|
524
|
+
session.stepIn(frame.thread.threadId, qp.activeItems[0].target.id);
|
|
525
|
+
}
|
|
526
|
+
});
|
|
527
|
+
qp.onDidHide(() => qp.dispose());
|
|
528
|
+
session.stepInTargets(frame.frameId).then(targets => {
|
|
529
|
+
qp.busy = false;
|
|
530
|
+
if (targets?.length) {
|
|
531
|
+
qp.items = targets?.map(target => ({ target, label: target.label }));
|
|
532
|
+
}
|
|
533
|
+
else {
|
|
534
|
+
qp.placeholder = ( localizeWithPath(_moduleId, 31, "No step targets available"));
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
});
|
|
539
|
+
async function stopHandler(accessor, _, context, disconnect, suspend) {
|
|
540
|
+
const debugService = accessor.get(IDebugService);
|
|
541
|
+
let session;
|
|
542
|
+
if (isSessionContext(context)) {
|
|
543
|
+
session = debugService.getModel().getSession(context.sessionId);
|
|
544
|
+
}
|
|
545
|
+
else {
|
|
546
|
+
session = debugService.getViewModel().focusedSession;
|
|
547
|
+
}
|
|
548
|
+
const configurationService = accessor.get(IConfigurationService);
|
|
549
|
+
const showSubSessions = configurationService.getValue('debug').showSubSessionsInToolBar;
|
|
550
|
+
while (!showSubSessions && session && session.lifecycleManagedByParent && session.parentSession) {
|
|
551
|
+
session = session.parentSession;
|
|
552
|
+
}
|
|
553
|
+
await debugService.stopSession(session, disconnect, suspend);
|
|
554
|
+
}
|
|
555
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
556
|
+
id: DISCONNECT_ID,
|
|
557
|
+
weight: 200 ,
|
|
558
|
+
primary: 1024 | 63 ,
|
|
559
|
+
when: ( (ContextKeyExpr.and(CONTEXT_FOCUSED_SESSION_IS_ATTACH, CONTEXT_IN_DEBUG_MODE))),
|
|
560
|
+
handler: (accessor, _, context) => stopHandler(accessor, _, context, true)
|
|
561
|
+
});
|
|
562
|
+
CommandsRegistry.registerCommand({
|
|
563
|
+
id: DISCONNECT_AND_SUSPEND_ID,
|
|
564
|
+
handler: (accessor, _, context) => stopHandler(accessor, _, context, true, true)
|
|
565
|
+
});
|
|
566
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
567
|
+
id: STOP_ID,
|
|
568
|
+
weight: 200 ,
|
|
569
|
+
primary: 1024 | 63 ,
|
|
570
|
+
when: ( (ContextKeyExpr.and(
|
|
571
|
+
(CONTEXT_FOCUSED_SESSION_IS_ATTACH.toNegated()),
|
|
572
|
+
CONTEXT_IN_DEBUG_MODE
|
|
573
|
+
))),
|
|
574
|
+
handler: (accessor, _, context) => stopHandler(accessor, _, context, false)
|
|
575
|
+
});
|
|
576
|
+
CommandsRegistry.registerCommand({
|
|
577
|
+
id: RESTART_FRAME_ID,
|
|
578
|
+
handler: async (accessor, _, context) => {
|
|
579
|
+
const debugService = accessor.get(IDebugService);
|
|
580
|
+
const notificationService = accessor.get(INotificationService);
|
|
581
|
+
const frame = getFrame(debugService, context);
|
|
582
|
+
if (frame) {
|
|
583
|
+
try {
|
|
584
|
+
await frame.restart();
|
|
585
|
+
}
|
|
586
|
+
catch (e) {
|
|
587
|
+
notificationService.error(e);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
});
|
|
592
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
593
|
+
id: CONTINUE_ID,
|
|
594
|
+
weight: 200 + 10,
|
|
595
|
+
primary: 63 ,
|
|
596
|
+
when: ( (CONTEXT_DEBUG_STATE.isEqualTo('stopped'))),
|
|
597
|
+
handler: async (accessor, _, context) => {
|
|
598
|
+
await getThreadAndRun(accessor, context, thread => thread.continue());
|
|
599
|
+
}
|
|
600
|
+
});
|
|
601
|
+
CommandsRegistry.registerCommand({
|
|
602
|
+
id: SHOW_LOADED_SCRIPTS_ID,
|
|
603
|
+
handler: async (accessor) => {
|
|
604
|
+
await showLoadedScriptMenu(accessor);
|
|
605
|
+
}
|
|
606
|
+
});
|
|
607
|
+
CommandsRegistry.registerCommand({
|
|
608
|
+
id: FOCUS_REPL_ID,
|
|
609
|
+
handler: async (accessor) => {
|
|
610
|
+
const viewsService = accessor.get(IViewsService);
|
|
611
|
+
await viewsService.openView(REPL_VIEW_ID, true);
|
|
612
|
+
}
|
|
613
|
+
});
|
|
614
|
+
CommandsRegistry.registerCommand({
|
|
615
|
+
id: 'debug.startFromConfig',
|
|
616
|
+
handler: async (accessor, config) => {
|
|
617
|
+
const debugService = accessor.get(IDebugService);
|
|
618
|
+
await debugService.startDebugging(undefined, config);
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
CommandsRegistry.registerCommand({
|
|
622
|
+
id: FOCUS_SESSION_ID,
|
|
623
|
+
handler: async (accessor, session) => {
|
|
624
|
+
const debugService = accessor.get(IDebugService);
|
|
625
|
+
const editorService = accessor.get(IEditorService);
|
|
626
|
+
const stoppedChildSession = debugService.getModel().getSessions().find(s => s.parentSession === session && s.state === 2 );
|
|
627
|
+
if (stoppedChildSession && session.state !== 2 ) {
|
|
628
|
+
session = stoppedChildSession;
|
|
629
|
+
}
|
|
630
|
+
await debugService.focusStackFrame(undefined, undefined, session, { explicit: true });
|
|
631
|
+
const stackFrame = debugService.getViewModel().focusedStackFrame;
|
|
632
|
+
if (stackFrame) {
|
|
633
|
+
await stackFrame.openInEditor(editorService, true);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
});
|
|
637
|
+
CommandsRegistry.registerCommand({
|
|
638
|
+
id: SELECT_AND_START_ID,
|
|
639
|
+
handler: async (accessor, debugType, debugStartOptions) => {
|
|
640
|
+
const quickInputService = accessor.get(IQuickInputService);
|
|
641
|
+
const debugService = accessor.get(IDebugService);
|
|
642
|
+
if (debugType) {
|
|
643
|
+
const configManager = debugService.getConfigurationManager();
|
|
644
|
+
const dynamicProviders = await configManager.getDynamicProviders();
|
|
645
|
+
for (const provider of dynamicProviders) {
|
|
646
|
+
if (provider.type === debugType) {
|
|
647
|
+
const pick = await provider.pick();
|
|
648
|
+
if (pick) {
|
|
649
|
+
await configManager.selectConfiguration(pick.launch, pick.config.name, pick.config, { type: provider.type });
|
|
650
|
+
debugService.startDebugging(pick.launch, pick.config, { noDebug: debugStartOptions?.noDebug, startedByUser: true });
|
|
651
|
+
return;
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
quickInputService.quickAccess.show(DEBUG_QUICK_ACCESS_PREFIX);
|
|
657
|
+
}
|
|
658
|
+
});
|
|
659
|
+
CommandsRegistry.registerCommand({
|
|
660
|
+
id: SELECT_DEBUG_CONSOLE_ID,
|
|
661
|
+
handler: async (accessor) => {
|
|
662
|
+
const quickInputService = accessor.get(IQuickInputService);
|
|
663
|
+
quickInputService.quickAccess.show(DEBUG_CONSOLE_QUICK_ACCESS_PREFIX);
|
|
664
|
+
}
|
|
665
|
+
});
|
|
666
|
+
CommandsRegistry.registerCommand({
|
|
667
|
+
id: SELECT_DEBUG_SESSION_ID,
|
|
668
|
+
handler: async (accessor) => {
|
|
669
|
+
showDebugSessionMenu(accessor, SELECT_AND_START_ID);
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
673
|
+
id: DEBUG_START_COMMAND_ID,
|
|
674
|
+
weight: 200 ,
|
|
675
|
+
primary: 63 ,
|
|
676
|
+
when: ( (ContextKeyExpr.and(
|
|
677
|
+
CONTEXT_DEBUGGERS_AVAILABLE,
|
|
678
|
+
(CONTEXT_DEBUG_STATE.isEqualTo('inactive'))
|
|
679
|
+
))),
|
|
680
|
+
handler: async (accessor, debugStartOptions) => {
|
|
681
|
+
const debugService = accessor.get(IDebugService);
|
|
682
|
+
await saveAllBeforeDebugStart(accessor.get(IConfigurationService), accessor.get(IEditorService));
|
|
683
|
+
const { launch, name, getConfig } = debugService.getConfigurationManager().selectedConfiguration;
|
|
684
|
+
const config = await getConfig();
|
|
685
|
+
const configOrName = config ? Object.assign(deepClone(config), debugStartOptions?.config) : name;
|
|
686
|
+
await debugService.startDebugging(launch, configOrName, { noDebug: debugStartOptions?.noDebug, startedByUser: true }, false);
|
|
687
|
+
}
|
|
688
|
+
});
|
|
689
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
690
|
+
id: DEBUG_RUN_COMMAND_ID,
|
|
691
|
+
weight: 200 ,
|
|
692
|
+
primary: 2048 | 63 ,
|
|
693
|
+
mac: { primary: 256 | 63 },
|
|
694
|
+
when: ( (ContextKeyExpr.and(
|
|
695
|
+
CONTEXT_DEBUGGERS_AVAILABLE,
|
|
696
|
+
(CONTEXT_DEBUG_STATE.notEqualsTo(getStateLabel(1 )))
|
|
697
|
+
))),
|
|
698
|
+
handler: async (accessor) => {
|
|
699
|
+
const commandService = accessor.get(ICommandService);
|
|
700
|
+
await commandService.executeCommand(DEBUG_START_COMMAND_ID, { noDebug: true });
|
|
701
|
+
}
|
|
702
|
+
});
|
|
703
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
704
|
+
id: 'debug.toggleBreakpoint',
|
|
705
|
+
weight: 200 + 5,
|
|
706
|
+
when: ( (ContextKeyExpr.and(
|
|
707
|
+
CONTEXT_BREAKPOINTS_FOCUSED,
|
|
708
|
+
(InputFocusedContext.toNegated())
|
|
709
|
+
))),
|
|
710
|
+
primary: 10 ,
|
|
711
|
+
handler: (accessor) => {
|
|
712
|
+
const listService = accessor.get(IListService);
|
|
713
|
+
const debugService = accessor.get(IDebugService);
|
|
714
|
+
const list = listService.lastFocusedList;
|
|
715
|
+
if (list instanceof List) {
|
|
716
|
+
const focused = list.getFocusedElements();
|
|
717
|
+
if (focused && focused.length) {
|
|
718
|
+
debugService.enableOrDisableBreakpoints(!focused[0].enabled, focused[0]);
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
});
|
|
723
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
724
|
+
id: 'debug.enableOrDisableBreakpoint',
|
|
725
|
+
weight: 200 ,
|
|
726
|
+
primary: undefined,
|
|
727
|
+
when: EditorContextKeys.editorTextFocus,
|
|
728
|
+
handler: (accessor) => {
|
|
729
|
+
const debugService = accessor.get(IDebugService);
|
|
730
|
+
const editorService = accessor.get(IEditorService);
|
|
731
|
+
const control = editorService.activeTextEditorControl;
|
|
732
|
+
if (isCodeEditor(control)) {
|
|
733
|
+
const model = control.getModel();
|
|
734
|
+
if (model) {
|
|
735
|
+
const position = control.getPosition();
|
|
736
|
+
if (position) {
|
|
737
|
+
const bps = debugService.getModel().getBreakpoints({ uri: model.uri, lineNumber: position.lineNumber });
|
|
738
|
+
if (bps.length) {
|
|
739
|
+
debugService.enableOrDisableBreakpoints(!bps[0].enabled, bps[0]);
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
});
|
|
746
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
747
|
+
id: EDIT_EXPRESSION_COMMAND_ID,
|
|
748
|
+
weight: 200 + 5,
|
|
749
|
+
when: CONTEXT_WATCH_EXPRESSIONS_FOCUSED,
|
|
750
|
+
primary: 60 ,
|
|
751
|
+
mac: { primary: 3 },
|
|
752
|
+
handler: (accessor, expression) => {
|
|
753
|
+
const debugService = accessor.get(IDebugService);
|
|
754
|
+
if (!(expression instanceof Expression)) {
|
|
755
|
+
const listService = accessor.get(IListService);
|
|
756
|
+
const focused = listService.lastFocusedList;
|
|
757
|
+
if (focused) {
|
|
758
|
+
const elements = focused.getFocus();
|
|
759
|
+
if (Array.isArray(elements) && elements[0] instanceof Expression) {
|
|
760
|
+
expression = elements[0];
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
if (expression instanceof Expression) {
|
|
765
|
+
debugService.getViewModel().setSelectedExpression(expression, false);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
});
|
|
769
|
+
CommandsRegistry.registerCommand({
|
|
770
|
+
id: SET_EXPRESSION_COMMAND_ID,
|
|
771
|
+
handler: async (accessor, expression) => {
|
|
772
|
+
const debugService = accessor.get(IDebugService);
|
|
773
|
+
if (expression instanceof Expression || expression instanceof Variable) {
|
|
774
|
+
debugService.getViewModel().setSelectedExpression(expression, true);
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
});
|
|
778
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
779
|
+
id: 'debug.setVariable',
|
|
780
|
+
weight: 200 + 5,
|
|
781
|
+
when: CONTEXT_VARIABLES_FOCUSED,
|
|
782
|
+
primary: 60 ,
|
|
783
|
+
mac: { primary: 3 },
|
|
784
|
+
handler: (accessor) => {
|
|
785
|
+
const listService = accessor.get(IListService);
|
|
786
|
+
const debugService = accessor.get(IDebugService);
|
|
787
|
+
const focused = listService.lastFocusedList;
|
|
788
|
+
if (focused) {
|
|
789
|
+
const elements = focused.getFocus();
|
|
790
|
+
if (Array.isArray(elements) && elements[0] instanceof Variable) {
|
|
791
|
+
debugService.getViewModel().setSelectedExpression(elements[0], false);
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
});
|
|
796
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
797
|
+
id: REMOVE_EXPRESSION_COMMAND_ID,
|
|
798
|
+
weight: 200 ,
|
|
799
|
+
when: ( (ContextKeyExpr.and(
|
|
800
|
+
CONTEXT_WATCH_EXPRESSIONS_FOCUSED,
|
|
801
|
+
(CONTEXT_EXPRESSION_SELECTED.toNegated())
|
|
802
|
+
))),
|
|
803
|
+
primary: 20 ,
|
|
804
|
+
mac: { primary: 2048 | 1 },
|
|
805
|
+
handler: (accessor, expression) => {
|
|
806
|
+
const debugService = accessor.get(IDebugService);
|
|
807
|
+
if (expression instanceof Expression) {
|
|
808
|
+
debugService.removeWatchExpressions(expression.getId());
|
|
809
|
+
return;
|
|
810
|
+
}
|
|
811
|
+
const listService = accessor.get(IListService);
|
|
812
|
+
const focused = listService.lastFocusedList;
|
|
813
|
+
if (focused) {
|
|
814
|
+
let elements = focused.getFocus();
|
|
815
|
+
if (Array.isArray(elements) && elements[0] instanceof Expression) {
|
|
816
|
+
const selection = focused.getSelection();
|
|
817
|
+
if (selection && selection.indexOf(elements[0]) >= 0) {
|
|
818
|
+
elements = selection;
|
|
819
|
+
}
|
|
820
|
+
elements.forEach((e) => debugService.removeWatchExpressions(e.getId()));
|
|
821
|
+
}
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
826
|
+
id: 'debug.removeBreakpoint',
|
|
827
|
+
weight: 200 ,
|
|
828
|
+
when: ( (ContextKeyExpr.and(
|
|
829
|
+
CONTEXT_BREAKPOINTS_FOCUSED,
|
|
830
|
+
(CONTEXT_BREAKPOINT_INPUT_FOCUSED.toNegated())
|
|
831
|
+
))),
|
|
832
|
+
primary: 20 ,
|
|
833
|
+
mac: { primary: 2048 | 1 },
|
|
834
|
+
handler: (accessor) => {
|
|
835
|
+
const listService = accessor.get(IListService);
|
|
836
|
+
const debugService = accessor.get(IDebugService);
|
|
837
|
+
const list = listService.lastFocusedList;
|
|
838
|
+
if (list instanceof List) {
|
|
839
|
+
const focused = list.getFocusedElements();
|
|
840
|
+
const element = focused.length ? focused[0] : undefined;
|
|
841
|
+
if (element instanceof Breakpoint) {
|
|
842
|
+
debugService.removeBreakpoints(element.getId());
|
|
843
|
+
}
|
|
844
|
+
else if (element instanceof FunctionBreakpoint) {
|
|
845
|
+
debugService.removeFunctionBreakpoints(element.getId());
|
|
846
|
+
}
|
|
847
|
+
else if (element instanceof DataBreakpoint) {
|
|
848
|
+
debugService.removeDataBreakpoints(element.getId());
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
});
|
|
853
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
854
|
+
id: 'debug.installAdditionalDebuggers',
|
|
855
|
+
weight: 200 ,
|
|
856
|
+
when: undefined,
|
|
857
|
+
primary: undefined,
|
|
858
|
+
handler: async (accessor, query) => {
|
|
859
|
+
const paneCompositeService = accessor.get(IPaneCompositePartService);
|
|
860
|
+
const viewlet = (await paneCompositeService.openPaneComposite(VIEWLET_ID, 0 , true))?.getViewPaneContainer();
|
|
861
|
+
let searchFor = `@category:debuggers`;
|
|
862
|
+
if (typeof query === 'string') {
|
|
863
|
+
searchFor += ` ${query}`;
|
|
864
|
+
}
|
|
865
|
+
viewlet.search(searchFor);
|
|
866
|
+
viewlet.focus();
|
|
867
|
+
}
|
|
868
|
+
});
|
|
869
|
+
registerAction2(class AddConfigurationAction extends Action2 {
|
|
870
|
+
constructor() {
|
|
871
|
+
super({
|
|
872
|
+
id: ADD_CONFIGURATION_ID,
|
|
873
|
+
title: ( localize2WithPath(_moduleId, 32, "Add Configuration...")),
|
|
874
|
+
category: DEBUG_COMMAND_CATEGORY,
|
|
875
|
+
f1: true,
|
|
876
|
+
menu: {
|
|
877
|
+
id: MenuId.EditorContent,
|
|
878
|
+
when: ( (ContextKeyExpr.and(
|
|
879
|
+
(ContextKeyExpr.regex(ResourceContextKey.Path.key, /\.vscode[/\\]launch\.json$/)),
|
|
880
|
+
(ActiveEditorContext.isEqualTo(TEXT_FILE_EDITOR_ID))
|
|
881
|
+
)))
|
|
882
|
+
}
|
|
883
|
+
});
|
|
884
|
+
}
|
|
885
|
+
async run(accessor, launchUri) {
|
|
886
|
+
const manager = accessor.get(IDebugService).getConfigurationManager();
|
|
887
|
+
const launch = manager.getLaunches().find(l => ( (l.uri.toString())) === launchUri) || manager.selectedConfiguration.launch;
|
|
888
|
+
if (launch) {
|
|
889
|
+
const { editor, created } = await launch.openConfigFile({ preserveFocus: false });
|
|
890
|
+
if (editor && !created) {
|
|
891
|
+
const codeEditor = editor.getControl();
|
|
892
|
+
if (codeEditor) {
|
|
893
|
+
await codeEditor.getContribution(EDITOR_CONTRIBUTION_ID)?.addLaunchConfiguration();
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
});
|
|
899
|
+
const inlineBreakpointHandler = (accessor) => {
|
|
900
|
+
const debugService = accessor.get(IDebugService);
|
|
901
|
+
const editorService = accessor.get(IEditorService);
|
|
902
|
+
const control = editorService.activeTextEditorControl;
|
|
903
|
+
if (isCodeEditor(control)) {
|
|
904
|
+
const position = control.getPosition();
|
|
905
|
+
if (position && control.hasModel() && debugService.canSetBreakpointsIn(control.getModel())) {
|
|
906
|
+
const modelUri = control.getModel().uri;
|
|
907
|
+
const breakpointAlreadySet = ( (debugService.getModel().getBreakpoints({ lineNumber: position.lineNumber, uri: modelUri })
|
|
908
|
+
.some(
|
|
909
|
+
bp => (bp.sessionAgnosticData.column === position.column || (!bp.column && position.column <= 1))
|
|
910
|
+
)));
|
|
911
|
+
if (!breakpointAlreadySet) {
|
|
912
|
+
debugService.addBreakpoints(modelUri, [{ lineNumber: position.lineNumber, column: position.column > 1 ? position.column : undefined }]);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
};
|
|
917
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
918
|
+
weight: 200 ,
|
|
919
|
+
primary: 1024 | 67 ,
|
|
920
|
+
when: EditorContextKeys.editorTextFocus,
|
|
921
|
+
id: TOGGLE_INLINE_BREAKPOINT_ID,
|
|
922
|
+
handler: inlineBreakpointHandler
|
|
923
|
+
});
|
|
924
|
+
MenuRegistry.appendMenuItem(MenuId.EditorContext, {
|
|
925
|
+
command: {
|
|
926
|
+
id: TOGGLE_INLINE_BREAKPOINT_ID,
|
|
927
|
+
title: ( localizeWithPath(_moduleId, 33, "Add Inline Breakpoint")),
|
|
928
|
+
category: DEBUG_COMMAND_CATEGORY
|
|
929
|
+
},
|
|
930
|
+
when: ( (ContextKeyExpr.and(
|
|
931
|
+
CONTEXT_IN_DEBUG_MODE,
|
|
932
|
+
(PanelFocusContext.toNegated()),
|
|
933
|
+
EditorContextKeys.editorTextFocus
|
|
934
|
+
))),
|
|
935
|
+
group: 'debug',
|
|
936
|
+
order: 1
|
|
937
|
+
});
|
|
938
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
939
|
+
id: 'debug.openBreakpointToSide',
|
|
940
|
+
weight: 200 ,
|
|
941
|
+
when: CONTEXT_BREAKPOINTS_FOCUSED,
|
|
942
|
+
primary: 2048 | 3 ,
|
|
943
|
+
secondary: [512 | 3 ],
|
|
944
|
+
handler: (accessor) => {
|
|
945
|
+
const listService = accessor.get(IListService);
|
|
946
|
+
const list = listService.lastFocusedList;
|
|
947
|
+
if (list instanceof List) {
|
|
948
|
+
const focus = list.getFocusedElements();
|
|
949
|
+
if (focus.length && focus[0] instanceof Breakpoint) {
|
|
950
|
+
return openBreakpointSource(focus[0], true, false, true, accessor.get(IDebugService), accessor.get(IEditorService));
|
|
951
|
+
}
|
|
952
|
+
}
|
|
953
|
+
return undefined;
|
|
954
|
+
}
|
|
955
|
+
});
|
|
956
|
+
KeybindingsRegistry.registerCommandAndKeybindingRule({
|
|
957
|
+
id: 'debug.openView',
|
|
958
|
+
weight: 200 ,
|
|
959
|
+
when: ( (CONTEXT_DEBUGGERS_AVAILABLE.toNegated())),
|
|
960
|
+
primary: 63 ,
|
|
961
|
+
secondary: [2048 | 63 ],
|
|
962
|
+
handler: async (accessor) => {
|
|
963
|
+
const paneCompositeService = accessor.get(IPaneCompositePartService);
|
|
964
|
+
await paneCompositeService.openPaneComposite(VIEWLET_ID$1, 0 , true);
|
|
965
|
+
}
|
|
966
|
+
});
|
|
967
|
+
export { ADD_CONFIGURATION_ID, ADD_TO_WATCH_ID, ADD_TO_WATCH_LABEL, CALLSTACK_BOTTOM_ID, CALLSTACK_BOTTOM_LABEL, CALLSTACK_DOWN_ID, CALLSTACK_DOWN_LABEL, CALLSTACK_TOP_ID, CALLSTACK_TOP_LABEL, CALLSTACK_UP_ID, CALLSTACK_UP_LABEL, CONTINUE_ID, CONTINUE_LABEL, COPY_EVALUATE_PATH_ID, COPY_EVALUATE_PATH_LABEL, COPY_STACK_TRACE_ID, COPY_VALUE_ID, COPY_VALUE_LABEL, DEBUG_COMMAND_CATEGORY, DEBUG_CONFIGURE_COMMAND_ID, DEBUG_CONFIGURE_LABEL, DEBUG_CONSOLE_QUICK_ACCESS_PREFIX, DEBUG_QUICK_ACCESS_PREFIX, DEBUG_RUN_COMMAND_ID, DEBUG_RUN_LABEL, DEBUG_START_COMMAND_ID, DEBUG_START_LABEL, DISCONNECT_AND_SUSPEND_ID, DISCONNECT_AND_SUSPEND_LABEL, DISCONNECT_ID, DISCONNECT_LABEL, EDIT_EXPRESSION_COMMAND_ID, FOCUS_REPL_ID, FOCUS_SESSION_ID, FOCUS_SESSION_LABEL, JUMP_TO_CURSOR_ID, NEXT_DEBUG_CONSOLE_ID, NEXT_DEBUG_CONSOLE_LABEL, OPEN_LOADED_SCRIPTS_LABEL, PAUSE_ID, PAUSE_LABEL, PREV_DEBUG_CONSOLE_ID, PREV_DEBUG_CONSOLE_LABEL, REMOVE_EXPRESSION_COMMAND_ID, RESTART_FRAME_ID, RESTART_LABEL, RESTART_SESSION_ID, REVERSE_CONTINUE_ID, SELECT_AND_START_ID, SELECT_AND_START_LABEL, SELECT_DEBUG_CONSOLE_ID, SELECT_DEBUG_CONSOLE_LABEL, SELECT_DEBUG_SESSION_ID, SELECT_DEBUG_SESSION_LABEL, SET_EXPRESSION_COMMAND_ID, SHOW_LOADED_SCRIPTS_ID, STEP_BACK_ID, STEP_INTO_ID, STEP_INTO_LABEL, STEP_INTO_TARGET_ID, STEP_INTO_TARGET_LABEL, STEP_OUT_ID, STEP_OUT_LABEL, STEP_OVER_ID, STEP_OVER_LABEL, STOP_ID, STOP_LABEL, TERMINATE_THREAD_ID, TOGGLE_INLINE_BREAKPOINT_ID };
|