Page 1 of 1
undeclared variable in watch window
Posted: Mon Jan 27, 2020 3:01 pm
by kevclark64
In the Foxpro dialect if you set the flags properly then you can use a variable without declaring it, which works fine. However, I have not been able to display the value of an undeclared variable in the watch window, as it is reported that the variable does not exist in the current context. I'm wondering if there's a way to get that to work.
undeclared variable in watch window
Posted: Mon Jan 27, 2020 3:13 pm
by robert
Kevin,
This is not possible yet. The closest that you can do is to add the following code to the Watch window:
XSharp.RT.Functions.__MemVarGet("variableName")
or
XSharp.MemVar.Get("variableName")
But since these are function/method calls they are not automatically refreshed in the debugger. You have to refresh these manually (VS does not know if there are "side effects" of these method calls).
Robert