Graeme Geldenhuys wrote 13 lines
Hi,
I sometimes hit a bug in my applications, but then there is no Stack
Trace information, or simply something like 3 entries that don't give
much information. See attached screenshot as an example. Apparently this
is caused by the fact that I'm using a Release build of the RTL and FCL
and the error was raised inside the RTL or FCL code.
So is there a recommended FPC setup having a Release and Debug RTL & FCL
side by side. Then in my IDE of choice (or build scripts) I can switch
between them as needed. I believe Delphi had a similar setup (or maybe
it was only for the VCL), but its been too long since I really used
Delphi to remember what Borland did.
There is none.
what you can do is create install debug versions of the RTL/package units under
/usr/local/lib/fpc/$fpcversion/units/debug/$fpctarget/
and then compile your program using -dDEBUGRTL, with in your .fpc.cfg
#ifdef DEBUGRTL
-Fu/usr/local/lib/fpc/$fpcversion//units/debug/$fpctarget/httpd22 -Fu/usr/local/lib/fpc/$fpcversion/units/debug/$fpctarget/* -Fu/usr/local/lib/fpc/$fpcversion/units/debug/$fpctarget/httpd22 #else
-Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget/httpd22 -Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget/* -Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget/httpd22 #endf
The compiler will then pick the debug versions of the RTL units.
Michael.