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
Can't view locals in the watch window (or by hovering the mouse over them) #15
Comments
|
The issue is that we do not do any analysis of the C# source code and the debugger protocol does not provide it either. So the watch requests are are just passed directly to the Mono debugger and in this case there is no local variable named What you can do is right click on locals and select I will close this issue and I will add it as a feature for our backlog. |
|
Is there any ETA on this feature? It would be very useful. I suspect when Unity gets out of beta and more people start using VSCode this issue may get more popular. |
|
It is unlikely that we will support hovering over variables, based upon how the current debugger protocol works. I've looked into this feature and the debugger protocol just passes strings and substrings of the text you are hovering over to the debugger extension. This means you need to parse the string you get and guess whether the value is type, local, global, class member, etc. For an statement like this
If you hover over If the debugger protocol some day will work together with the C# parsing and just provide the exact expression that need to be evaluated, which would be the ideal solution, then we could very easily support this feature. |
|
Perhaps you could evaluate the expression and if it's a symbol (variable or method name) and it's not able to be evaluated then you append "this." to the string and evaluate it again? Maybe you're saying you have no direct control over the evaluation? |
Using version 1.0.3 with Unity 5.4.0f3, the watch window can't view member variables without "this" specified explicitly (see screenshot attached).

Stepping through in the debugger, it's hitting the case in UnityDebugSession.cs line 478 where the "Unknown" flag is set. Unfortunately I'm on a deadline so can't investigate further right now (my knowledge of the Mono runtime isn't good, so it'd probably take me a while!).
Rob.
The text was updated successfully, but these errors were encountered: