microsoft / vscode-mono-debug

A simple VS Code debug adapter for mono
Other
159 stars 173 forks source link

Same variable name in different scopes #19

Open kiwipxl opened 7 years ago

kiwipxl commented 7 years ago

Hey, I'm not sure if this is the right place to post this issue. It may be an issue with mono itself. Please close this if it is unrelated to this project.

You can reproduce the issue like so:

public enum TestEnum {
    A, 
    B, 
    C, 
};

{
    TestEnum test = TestEnum.B;
    Debug.LogWarning(test);
}
{
    TestEnum test = TestEnum.C;
    Debug.LogWarning(test);
}

When putting a breakpoint on the second test and reading its value, a value of B will be reported, when the correct value is C.

DavidKarlas commented 7 years ago

Fix for this will need newer version of Mono, 4.8 or newer, and debugger-libs that include https://github.com/mono/debugger-libs/commit/f6732039675317f6b3629f2a778b300620753594 notice that this commit has regression and you should bump to https://github.com/mono/debugger-libs/commit/21de57b0b4a426047fa58f03df0dbada8c43813b.