From 8c20aeba187261262a300d98ac5cb6f3ba341880 Mon Sep 17 00:00:00 2001 From: musicwei <975903356@qq.com> Date: Mon, 2 Feb 2026 16:45:58 +0800 Subject: [PATCH] add chipDescriptionPath support for probe-rs read chipDescriptionPath from flashercfg,import to dbgCfg --- src/extension.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/extension.ts b/src/extension.ts index 779c6dc..b246e59 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -2201,6 +2201,18 @@ class ExternalDebugConfigProvider implements vscode.DebugConfigurationProvider { if (m && m.length > 1) { dbgCfg['probe'] = m[1]; } + // parse '--chip-description-path ' (support quoted path) + // examples: + // --chip-description-path /path/to/desc.yaml + // --chip-description-path "/path/with spaces/desc.yaml" + m = /--chip-description-path\s+("[^"]+"|[^\s]+)/.exec(flasherCfg.otherOptions); + if (m && m.length > 1) { + let p = m[1]; + // strip surrounding quotes if present + if (p.startsWith('"') && p.endsWith('"')) + p = p.substring(1, p.length - 1); + dbgCfg['chipDescriptionPath'] = p; + } } result.push(dbgCfg); result.push(newAttachDebugCfg(dbgCfg));