undeclared variable in watch window

This forum is meant for questions about the Visual FoxPro Language support in X#.

Post Reply
User avatar
kevclark64
Posts: 127
Joined: Thu Aug 15, 2019 7:30 pm
Location: USA

undeclared variable in watch window

Post 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.
User avatar
robert
Posts: 4473
Joined: Fri Aug 21, 2015 10:57 am
Location: Netherlands

undeclared variable in watch window

Post 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
XSharp Development Team
The Netherlands
robert@xsharp.eu
Post Reply