Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
A really stupid question...
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00744534
Message ID:
00745531
Views:
22
Hi Mark,

For me ASSERT command are only for development (debug symbol) checks that I always leave in my code because that will trigger faults in (other parts of) my program.
When you need an assert to check if an encounterd bug is fixed, it is a good thing to check it always. Most bugs are a result of either stupid mistakes or code that is difficult to understand/develop. To make sure that the bug is not re-introduced it is always good to check (in development mode only).
When I need to suspend a program (temporarily) I normally use breakpoints but when those don't fire or the program is too slow with the debugger open I use the SET STEP ON command. That will suspend the program and open the debugger automaticly. Another benefit over SUSPEND is that SET STEP ON is ignored in the .EXE starting from VFP7.

But beware of the Breakpoint IDE bug. When you have a breakpoint set, with the debugger closed, the breakpoints get evaluated but not triggered. That results in a slowdown like the debugger is open (but isn't) so always make sure that all breakpoints are cleared when you are going to close the debugger.

>>We have just moved to VFP7 from 5.0. In trying to debug a program we have inserted the SUSPEND command into the program. But it does not work. Has this command changed?
>>
>>Any help would be appreciated.
>>
>>LG
>
>It should still work. Besides, do not use SUSPEND. Use ASSERT [see VFP Help for syntax] which is ignored under Runtime should you forget to remove it. Using SUSPEND is not very forgiving under runtime. Open the code, and double-click in the grey column to the left of the line where you want the debugger to break. When the debugger is open, code execution will break at this point.

Regards,
Frank Camp
Previous
Reply
Map
View

Click here to load this message in the networking platform