Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Debugging a form
Message
From
27/01/2009 19:00:02
 
 
To
24/01/2009 10:13:57
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01376719
Message ID:
01377568
Views:
17
>When Tracing through a form, it is very annoying that when you put a breakpoint on a variable - like lcMyVar = 'MyVarValue' - and the variable goes out of scope (Expression could not be evaluated) that it breaks. Is there anyway to exclude that condition and only have it break if the value has a value and it is different than what you are looking for?

Hi Jay,

here's some sample code:
LOCAL myvar, x
myvar = "fred"
SET STEP ON 
x=4
DO test
x=5
myvar = "gina"

WAIT WINDOW "complete"


PROCEDURE test

x=6

RETURN
If I wanted to run until myvar changes and I set a breakpoint on Myvar, then when the code reaches the line "x=6" in procedure test, you'll get the "myvar has changed" dialog and see the "(Expression could not be evaluated)" in the watch window.

To get around this, I open the breakpoint dialog and set a breakpoint on "Break when expression is true" and set the expression to be: myvar # "fred"

This will always work.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform