Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-08

Runtime Error Source References

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mark Emerson

With all this discussion of using GDB (and the associated hassles) to get runtime error source references, I fondly remember my Turbo Pascal days, and the AMAZED delight the first time (about 1982) I encountered a runtime error and there was a choice to press "E" and be taken into the editor to the place in the source where the error occurred. And it WORKED!!

Are there any plans to implement the capability for an FPC program to output (via the exception system) not only the runtime error number, but also the source file name, line number and character number? Indeed, I would like to be able to capture this info and write it to a log file for QA purposes.

I respectfully request that it be considered. Thanks.

Mark

Unknown author
to Mark Emerson
Mark Emerson wrote 12 lines
With all this discussion of using GDB (and the associated hassles) to get runtime error source references, I fondly remember my Turbo Pascal days, and the AMAZED delight the first time (about 1982) I encountered a runtime error and there was a choice to press "E" and be taken into the editor to the place in the source where the error occurred. And it WORKED!! Are there any plans to implement the capability for an FPC program to output (via the exception system) not only the runtime error number, but also the source file name, line number and character number? Indeed, I would like to be able to capture this info and write it to a log file for QA purposes.

This is already possible. But it requires that you compile your application with the -gl option, AND that you use a RTL which is also compiled with the -gl option, because the standard RTL does not contain the debug information (for reasons of size). There exist plans to distribute a separate 'debug' RTL, but we haven't had time yet to do this.

Incidentally, if you use the FP ide, the same functionality as in the TP editor is available. I think Lazarus also provides this, but I am not sure.

Michael.