From 161cd6b6284e526069fc42469708171210333387 Mon Sep 17 00:00:00 2001 From: Paula Date: Wed, 17 Jul 2024 20:58:49 -0700 Subject: [PATCH] Improve python debug welcome view (#389) * Add contribViewsWelcome api * Add when * Add context for dynamicConfigs * Update welcome view to run command to show dynamic configs for python * fix lint --- package.json | 10 +++++++++- src/extension/extensionInit.ts | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index b0309026..147b63a8 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "enabledApiProposals": [ "portsAttributes", "contribIssueReporter", - "debugVisualization" + "debugVisualization", + "contribViewsWelcome" ], "license": "MIT", "homepage": "https://github.com/Microsoft/vscode-python-debugger", @@ -521,6 +522,13 @@ "id": "inlineHexDecoder", "when": "debugConfigurationType == 'debugpy' && (variableType == 'float' || variableType == 'int')" } + ], + "viewsWelcome": [ + { + "view": "debug", + "contents": "\n[Show automatic Python configurations](command:workbench.action.debug.selectandstart?%5B%22debugpy%22%5D)\n", + "when": "dynamicPythonConfigAvailable" + } ] }, "extensionDependencies": [ diff --git a/src/extension/extensionInit.ts b/src/extension/extensionInit.ts index deb662b4..760644cb 100644 --- a/src/extension/extensionInit.ts +++ b/src/extension/extensionInit.ts @@ -206,5 +206,11 @@ export async function registerDebugger(context: IExtensionContext): Promise