[Lazarus] IDE exceptions: how to get stack trace on Windows?

Alexander Klenin klenin at gmail.com
Fri Oct 10 13:41:02 CEST 2008


On Fri, Oct 10, 2008 at 21:05, Bogusław Brandys <brandys at o2.pl> wrote:
> Use command line switch like :
> lazarus.exe --debug-log=debug.log   (or other filename)
Already tried that. Unfortunately, backtrace is not written into the log file.

> Plenty of options.
Tried using GDB too, that of course works, but is very inconvenient.
I ended up with running
gdb --command=C:\lazarus\run.gdb C:\lazarus\lazarus.exe
where run.gdb contains:
cd c:\lazarus
break fpc_raiseexception
commands
bt
cont
end
set logging on
run

So when I get exception in lazarus, it does not freeze,
but displays usual exception dialog, while backtrace gets written silently
to C:\lazarus\gdb.txt file. Still I think integrated feature would be better.

> TApplication.OnException handler into lazarus IDE lpr and catch most of
> exceptions here.Nice idea.
Yes, I was hoping there is already some hidden option for that ;-)

-- 
Alexander S. Klenin
Insight Experts Ltd.




More information about the Lazarus mailing list