From d9e961a758712c23fd21034fe418b92188221389 Mon Sep 17 00:00:00 2001 From: Paula Camargo Date: Thu, 11 Jul 2024 12:30:36 -0700 Subject: [PATCH 1/5] Add contribViewsWelcome api --- package.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3d1149d0..92a1ac11 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,15 @@ "id": "inlineHexDecoder", "when": "debugConfigurationType == 'debugpy' && (variableType == 'float' || variableType == 'int')" } + ], + "viewsWelcome": [ + { + "view": "debug", + "contents": "\n[Show all automatic configurations ](command:workbench.action.debug.selectandstart)\n", + "when": "true", + "order": 10, + "group": "4_debug" + } ] }, "extensionDependencies": [ From aeba6a626776fb35a14d6328a4f0cfa5d44dbd9f Mon Sep 17 00:00:00 2001 From: Paula Camargo Date: Thu, 11 Jul 2024 13:23:08 -0700 Subject: [PATCH 2/5] Add when --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 92a1ac11..ef0ab3f7 100644 --- a/package.json +++ b/package.json @@ -527,7 +527,7 @@ { "view": "debug", "contents": "\n[Show all automatic configurations ](command:workbench.action.debug.selectandstart)\n", - "when": "true", + "when": "debuggersAvailables", "order": 10, "group": "4_debug" } From ed3812d7439ed155a42d25cb0fde125b00da44b1 Mon Sep 17 00:00:00 2001 From: Paula Camargo Date: Wed, 17 Jul 2024 17:18:18 -0700 Subject: [PATCH 3/5] Add context for dynamicConfigs --- src/extension/extensionInit.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/extension/extensionInit.ts b/src/extension/extensionInit.ts index deb662b4..00e2d5d2 100644 --- a/src/extension/extensionInit.ts +++ b/src/extension/extensionInit.ts @@ -94,7 +94,7 @@ export async function registerDebugger(context: IExtensionContext): Promise { + registerCommand(Commands.Debug_Using_Launch_Config, async (file?: Uri) => { sendTelemetryEvent(EventName.DEBUG_USING_LAUNCH_CONFIG_BUTTON); const interpreter = await getInterpreterDetails(file); @@ -206,5 +206,7 @@ export async function registerDebugger(context: IExtensionContext): Promise Date: Wed, 17 Jul 2024 17:18:45 -0700 Subject: [PATCH 4/5] Update welcome view to run command to show dynamic configs for python --- package.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index ef0ab3f7..a05a4894 100644 --- a/package.json +++ b/package.json @@ -526,10 +526,8 @@ "viewsWelcome": [ { "view": "debug", - "contents": "\n[Show all automatic configurations ](command:workbench.action.debug.selectandstart)\n", - "when": "debuggersAvailables", - "order": 10, - "group": "4_debug" + "contents": "\n[Show automatic Python configurations](command:workbench.action.debug.selectandstart?%5B%22debugpy%22%5D)\n", + "when": "dynamicPythonConfigAvailable" } ] }, From de670be9a3c1d0ba680371be532f447fb778658c Mon Sep 17 00:00:00 2001 From: Paula Camargo Date: Wed, 17 Jul 2024 17:25:54 -0700 Subject: [PATCH 5/5] fix lint --- src/extension/extensionInit.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/extension/extensionInit.ts b/src/extension/extensionInit.ts index 00e2d5d2..760644cb 100644 --- a/src/extension/extensionInit.ts +++ b/src/extension/extensionInit.ts @@ -94,7 +94,7 @@ export async function registerDebugger(context: IExtensionContext): Promise { + registerCommand(Commands.Debug_Using_Launch_Config, async (file?: Uri) => { sendTelemetryEvent(EventName.DEBUG_USING_LAUNCH_CONFIG_BUTTON); const interpreter = await getInterpreterDetails(file); @@ -206,7 +206,11 @@ export async function registerDebugger(context: IExtensionContext): Promise