Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debugger
Message
De
05/03/2006 19:57:48
 
 
À
05/03/2006 16:15:44
Mike Smith
Doncaster Office Services
Oakville, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01101549
Message ID:
01101603
Vues:
9
I'm unclear about which form has the buttons - the calling form or the form in which you activate the debugger in load. I would avoid run to cursor for now and use step into on the dodefault() line so you run can see the default load() run.

I'm a little fuzzy on where things would go from there as I never have used forms but rather use my framework's form classes so there is a lot of stuff going on in my apps that I don't really now how they parallel when using scx forms.

One thing you can do is put an object reference to the button in the watch window, then use step over to mover through the disable method ( or the method you expect to call it ) and see where the enabled property changes.

It can be maddening when things appear to behave differently in debug vs running flat out, but with the debugger you will at least have a fighting chance in figuring out what is going on.

BTW In my framework, we have a debugmode() we use in method which brings up a dialog that tells you where you are and asks if you want to go into debug. It only comes up if a text file called debug.txt is in the path. That way if you forget to take out the set step on it won't blow up in a compiled shipping app. We now have a further refinement where the dialog let's you snooze the debug call ( don't do it this time but ask again next time ) or remove ( completely remove debugmode() from the code with a project hook )

Let me know of your further adventures with debugger.


>Charles:
>
>This is reply number #2 to your helpful message about the debugger.
>
>I used the SET STEP ON feature and was able to get the debugger to come up in a good way so thank you for this.
>
>But what I found was really weird. When I have the debugger activate then RUN TO CURSOR, my code performs correctly. When I take out the SET STEP ON line, the code performs incorrectly.
>
>The issue was that the buttons on the previous form were not disabling. With SET STEP ON, I can watch the code go through the disable method and then RUN TO CURSOR shows the buttons disabling properly.
>
>So my code seems OK, but when I take out SET STEP ON, the method for disabling is ignored.
>
>Have you any idea what is causing this? I am using VFP 8.0 SP 1.
>
>Mike Smith


Charles Hankey

Though a good deal is too strange to be believed, nothing is too strange to have happened.
- Thomas Hardy

Half the harm that is done in this world is due to people who want to feel important. They don't mean to do harm-- but the harm does not interest them. Or they do not see it, or they justify it because they are absorbed in the endless struggle to think well of themselves.

-- T. S. Eliot
Democracy is two wolves and a sheep voting on what to have for lunch.
Liberty is a well-armed sheep contesting the vote.
- Ben Franklin

Pardon him, Theodotus. He is a barbarian, and thinks that the customs of his tribe and island are the laws of nature.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform