Retrieve variables by name and add list_variable_names - #119
Merged
Conversation
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
✅ Extension Build Successful!📦 VSIX artifact is ready for download Scroll down to the "Artifacts" section and download To install: In VS Code, run |
…ion-and-targeted-variables
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
…et redaction details
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.
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).