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 17:10:35
 
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:
00983248
Views:
16
OK, my handler looks like this
PROCEDURE DoSomePrg
   ?? CHR(7)
   SET STEP ON
   RETURN .F.
ENDPROC
which works fine, except after taking one step (to exit from DoSomePrg), I am parked at the line after the error. It doesn't happen often that I can repair the error and resume, but on that occasion, since I'd be on the wrong line of code, I'd be dead. (I am aware of "Set Next Statement" in the debugger, but it is never enabled anymore, so I'm unable to use it). This might also be a problem (assuming without testing) if the error happened on the last line of the PRG, as I might no longer be in the same PRG.

Thanks again,

Jim

>>Am still unclear here. I did the following:
>>
>>
ON ERROR DoSomePrg()
>>...
>>PROCEDURE DoSomePrg
>>   ?? CHR(7)
>>ENDPROC
>>
>>I do get the bell sound when I get an error, but execution continues. I'd like to be suspended like normal.
>
>You can put SET STEP ON command after the bell sound or whatever you want to help you troubleshoot the error. The reason your code continued to execute is an implicit .T. value is returned from any procedure that does not have a RETURN SomeValue command when procedure code execution is completed.
Jim Nelson
Newbury Park, CA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform