feat: resolve VS Code variable placeholders in launch configurations#399
Merged
Conversation
Parse workspace folders array from .code-workspace files and use it to
correctly resolve ${workspaceFolder:name} variables. Resolve
${workspaceFolder}, ${workspaceFolder:name}, and ${env:VARNAME} across
all config fields (pathMappings, cwd, program, env, envFile, args).
Resolution happens automatically in load_from_path/load_all_from_path
so callers receive fully resolved absolute paths.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…olution Replace inherent resolve() methods on Debugpy, LLDB, and LaunchConfiguration with implementations of a shared Resolve trait. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a Delve struct for VS Code Go debug adapter configs ("type": "go")
with fields for program, args, env, envFile, cwd, host, port,
buildFlags, mode, and substitutePath. Implements the Resolve trait to
resolve VS Code variable placeholders across all string fields.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
foldersarray from.code-workspacefiles and resolve${workspaceFolder:name}to the correct absolute paths (previously just appended the name as a subpath)${workspaceFolder},${workspaceFolder:name}, and${env:VARNAME}across all config fields (pathMappings, cwd, program, env, envFile, args) — previously onlypathMappings.localRootwas handledload_from_path/load_all_from_pathso callers receive fully resolved absolute pathsResolvetrait implemented byDebugpy,LLDB, and the newDelve(Go) config typeDelvelaunch configuration struct for VS Code Go debug adapter ("type": "go") withsubstitutePathsupportTest plan
${workspaceFolder:...}strings${env:VARNAME}, cwd/env/envFile resolution, unsupported variables left as-iscargo check --all-targets --all-featurespassescargo xtask test && cargo xtask doctest— all 400 tests pass🤖 Generated with Claude Code