still can't trace into Lazarus DB code.
How did you try to trace Lazarus DB code? Debugging should work when you have built Lazarus with profile "Debug IDE".Just open the ide\lazarus.lpi project and debug it as any project. It is briefly explained here: http://wiki.freepascal.org/Extending_the_IDE#Debugging_the_IDE
It may be that your fpc is not built with debug info.To do that see, for example, this threadhttp://forum.lazarus.freepascal.org/index.php/topic,20335.msg117259.html#msg117259
D:\lazarus\fpc\3.0.0\source\packages>make OPT=-gMAKE Version 5.41 Copyright (c) 1987, 2014 Embarcadero Technologies, Inc.Error makefile 14: Command syntax error...
D:\lazarus\fpc\3.0.0\source\packages>d:\lazarus\fpc\3.0.0\bin\x86_64-win64\make OPT=-gd:/lazarus/fpc/3.0.0/bin/x86_64-win64/make -C fpmkunit bootstrapmake: Entering directory `D:/lazarus/fpc/3.0.0/source/packages/fpmkunit'd:/lazarus/fpc/3.0.0/bin/x86_64-win64/gmkdir.exe -p units_bs/x86_64-win64d:/lazarus/fpc/3.0.0/bin/x86_64-win64/ppcx64.exe src/fpmkunit.pp -n -Fu../../rtl -FUunits_bs/x86_64-win64 -Fu../paszlib/src -Fu../hash/src -Fi../paszlib/src -Fi../fcl-process/src/win -Fu../fcl-process/src -Fi../fcl-process/src/win64 -Fi../fcl-process/src/dummy -Fu../libtar/src -gFatal: Can't find unit system used by fpmkunitFatal: Compilation abortedmake: *** [bootstrap] Error 1make: Leaving directory `D:/lazarus/fpc/3.0.0/source/packages/fpmkunit'make: *** [fpmake.exe] Error 2
It is not clear for me is this profile "Debug IDE" to exactly debug IDE (environment) or is it as Delphi's compiler option "Use debug .dcus" that allows to step into Delphi sources. I guess this option to exactly debug IDE, not IDE environment that allows to debug Lazarus/FPC sources.