Skip to content

Retrieve variables by name and add list_variable_names - #119

Merged
ozzafar merged 6 commits into
mainfrom
ozzafar/secret-redaction-and-targeted-variables
Jul 29, 2026
Merged

Retrieve variables by name and add list_variable_names#119
ozzafar merged 6 commits into
mainfrom
ozzafar/secret-redaction-and-targeted-variables

Conversation

@ozzafar

@ozzafar ozzafar commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

get_variables_values now takes an explicit variableNames array and returns only those variables, instead of dumping the whole scope. Names are matched against the DAP evaluateName, which is the canonical evaluatable name; the C#/vsdbg adapter decorates the display name with its type (config [Dictionary]), so matching on name alone made every C# local unreachable.

Add list_variable_names so a caller can discover what is in scope, by name and type only, and then request just what it needs.

Values that are returned pass through src/utils/secretRedaction.ts, which withholds credential-looking values by name or by content and is applied to evaluate_expression as well. The decision is made from the variable's own name and value; structures are not descended into. Null-ish values are kept so missing-credential bugs stay debuggable. Controlled by debugmcp.redactSecrets (default true).

get_variables_values now takes an explicit variableNames array and returns
only those variables, instead of dumping the whole scope. Names are matched
against the DAP evaluateName, which is the canonical evaluatable name; the
C#/vsdbg adapter decorates the display name with its type (`config
[Dictionary]`), so matching on name alone made every C# local unreachable.

Add list_variable_names so a caller can discover what is in scope, by name
and type only, and then request just what it needs.

Values that are returned pass through src/utils/secretRedaction.ts, which
withholds credential-looking values by name or by content and is applied to
evaluate_expression as well. The decision is made from the variable's own
name and value; structures are not descended into. Null-ish values are kept
so missing-credential bugs stay debuggable. Controlled by
debugmcp.redactSecrets (default true).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fc8b6b45-af91-4e45-8aa5-042f5290bb5b
@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown

✅ Extension Build Successful!

📦 VSIX artifact is ready for download

👉 View artifacts

Scroll down to the "Artifacts" section and download extension-vsix

To install: In VS Code, run Extensions: Install from VSIX... and select the downloaded file.

ozzafar and others added 5 commits July 29, 2026 12:31
Redaction was gated on a debugmcp.redactSecrets setting that let a caller
turn it off, which defeats the control: the agent reading the values is the
party the redaction protects against. Remove isSecretRedactionEnabled() and
apply redactVariableValue/redactExpressionResult on every path.

The setting was never declared in package.json contributes.configuration, so
it was undiscoverable in the settings UI and only settable by hand-editing
settings.json. Drop it from the README settings table, the architecture docs
and the redaction notice text.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fc8b6b45-af91-4e45-8aa5-042f5290bb5b
@ozzafar
ozzafar merged commit 2a16cbd into main Jul 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant