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

Debug protocol needs 'full name' to properly support 'Add to watch' #73

Closed
gregg-miskelly opened this issue Oct 13, 2016 · 2 comments
Closed
Assignees
Milestone

Comments

@gregg-miskelly
Copy link
Member

Description of the problem.

VS Code currently implements the 'Add to Watch' feature by taking the name property of the Variable and trying to combine them together. But this is not necessarily the correct name to evaluate. This is wrong for C# for root items due to our type annotations, and it can be wrong for child items any time that '.' isn't the right way to combine elements together.

Suggested fix

Variable should have a new optional property for the evaluatable name. If that property is provided, Add to Watch should use this value instead. In VS, we call this value the 'full name'. For example, if p is a local pointer in C++, and m_example is a field, the full name for this would be p->m_example.

Steps to Reproduce:

  1. Install .NET Core, VS Code, and the C# extension (see http://aka.ms/vscclrdebugger for instruction)
  2. Create hello world with dotnet new
  3. Debug hello world and stop at the first line
  4. Look at the locals window
  5. Right click on args and invoke 'Add to Watch'

Result:
VS Code will add the name of the local (args [string[]]) which doesn't evaluate since we needed to add our type annotation.

@weinand
Copy link
Contributor

weinand commented Oct 19, 2016

@gregg-miskelly I propose to name this new attribute evaluateName.

@gregg-miskelly
Copy link
Member Author

@weinand sounds good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants