Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support vaguely named variables in VariableManager's cache #1272

Merged
merged 2 commits into from
Feb 4, 2022

Conversation

calgagi
Copy link
Contributor

@calgagi calgagi commented Feb 3, 2022

Better fix for microsoft/vscode-cpptools#8760

Improves on #1271 by storing duplicate variable names as "{name} #{uniqueNumber}".

So, if you have 2 variables named a, you would get a and a #2 in the variables window.

image

This also simplifies VariableManager's cache into one dictionary.


// NOTE: (Frame, Name) -> IDebugProperty2
private readonly Dictionary<Tuple<IDebugStackFrame2, string>, IDebugProperty2> m_framesVariables;
public static string VariableNameFormat = "{0} #{1}";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

static

const

Copy link
Member

@gregg-miskelly gregg-miskelly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me aside from that nit.

@calgagi calgagi force-pushed the dev/cagaglia/dupeVars branch from 6c63c9c to 01ff5e1 Compare February 3, 2022 23:47
@WardenGnaw WardenGnaw merged commit c208667 into microsoft:main Feb 4, 2022
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.

3 participants