Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
When debugging, I want a noise when I get an error
Message
From
02/02/2005 19:56:02
 
 
To
02/02/2005 18:38:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
00983171
Message ID:
00983311
Views:
15
That works just fine for me, as I end up halted at the correct statement, not the one after where the error occurred. This allows me to resume on the same statement, if desired.

Unfortunately, there must be something screwed up within my copy of VFP, as I never can use "Set Next Statement" -- it's always disabled.

Um, as for your book, (blush), time for me to order, eh?

Thanks so much,

Jim

>>Thanks. Unfortunately, there is still the problemn of what line I get parked on after whatever program is invoked by ON ERROR.
>
>Ha! I know you haven't looked at my book, then, ;-P
>
>First, I suggest you use ASSERT, not SET STEP ON. But here's a neat trick Calvin suggested to me.
>
>* Do your Bell thing here if you want, then
>ASSERT .F. MESSAGE MESSAGE()
>IF .F.
>  RETRY
>  RETURN
>ENDIF
>
>
>You can choose to debug at the Assert message and then use Set Next Statement on either the Retry or Return. In your example, you'd want to select retry. Then, step, and you'll be back the line that caused the error.
Jim Nelson
Newbury Park, CA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform