Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debugging a form
Message
De
28/01/2009 15:51:49
 
 
À
28/01/2009 07:01:13
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01376719
Message ID:
01377852
Vues:
19
>>>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.
>
>I too have encountered this issue many times before. If this workaround works, you should post a FAQ article here for others in the future. The solution would save countless hours of debugging for many.

Let me know if it works for you and I'll do that.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform