Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
When debugging, I want a noise when I get an error
Message
De
02/02/2005 20:47:29
 
 
À
02/02/2005 20:36:06
Nancy Folsom
Pixel Dust Industries
Washington, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Divers
Thread ID:
00983171
Message ID:
00983321
Vues:
22
RE: Well, really and truly I suggest you use ASSERTs. It's what they're for, and they're non-invasive. If you leave SUSPEND in your program, your users will get an error. But, you do have to remember to SET ASSERT ON. But, that aside...

Nancy -- my ON ERROR is set differently for development, so I have no worry about my users encountering this code. I normally do use ASSERTs, altho in this case I see no particular value to doing so ...

Since I'm already using MESSAGEBOX to make a little noise (the original question in this thread), I decided to display some error information (presumably ASSERT could do the same) and I can achieve the same effect as ASSERT (debug, ignore, etc). (I wouldn't have bothered to go this way, though, if I could "SET NEXT STATEMENT" to work, as ASSERT would have been just fine).

As for "when you run the EXE in the IDE", this is unfamiliar terminology to me, so I can't really answer.

>Jim-
>>
>>I understood that about "Set Next Statement" -- except it's always disabled, so I can't use it, ever!
>
>Hm. I'll have to mull that over.
>
>>Currently my little program looks like this:
>>
   MESSAGEBOX(lcMsg,16)
>>   DEBUG
>>   SUSPEND
>>   RETRY
>>   RETURN
>>which halts on RETRY.
>
>Well, really and truly I suggest you use ASSERTs. It's what they're for, and they're non-invasive. If you leave SUSPEND in your program, your users will get an error. But, you do have to remember to SET ASSERT ON. But, that aside...
>
>> I would think I should be able to use "SET NEXT STATEMENT" to get to RETURN, if I wanted, but its always disabled. (Actually, I'm using MESSAGEBOX with Yes/No/Cancel, so that I can RETRY or CANCEL based on the choice selected, but the above code demonstrates my difficulty with "SET NEXT STATEMENT".)
>
>>
>>Now, is there something I'm doing to cause it to be disabled? I created a simple little PRG outside of my application (with whatever environmental stuff I've set up, and forgotten about), and it is enabled then.
>
>Can't think of anything off-hand. You have the problem when you run the EXE in the IDE? Have you tried DOing it from the Debugger DO command, which should step into the first executable line. You could then see if it's got this problem from the very start. Bit of a WAG, I admit. I just tried some things to break it and haven't been successful so far.
Jim Nelson
Newbury Park, CA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform