I'm using on error, aerror(), and astackinfo() to return error message, program info, line # and source line content.
This is my understanding of all the replies:
1. If the exe is built with Debug Info "checked" AND the source code files (scx/sct, prg, frx, vcx/vct) exist in the machine, functions such as lineno(), message(1) and astackinfo() can be used to return the line # and source line content.
2. If the exe is built with Debug Info "unchecked" OR the source code files (scx/sct, prg, frx, vcx/vct) do not exist in the machine, functions such as lineno() and astackinfo() will return 0 as line # and message(1) and astackinfo() will return nothing as source line content.
Note: Whether the source code of scx/sct and vcx/vct are stripped or not won't affect #1 and #2. Will refox the exe affect #1 and #2?
3. The exe built with Debug Info "checked" is larger than the one built with Debug Info "unchecked".
4. The final version of an exe should be built with Debug Info "unchecked".
I still don't understand the sentence "If this is not checked, you cannot view program execution in the Trace window." in the VFP help for the Debug Info. From what I have tried using an exe which is built with Debug Info "unchecked", I can view program execution in the Trace window if the source code files exist in the machine.
This is from VFP help:
Debug Info
Specifies whether debugging information is included with the compiled file. If this is not checked, you cannot view program execution in the Trace window. Corresponds to the NODEBUG argument in the COMPILE command.
Thank you.