Thanks for the information.

I've used breakpoints before, but for this issue, it was happening on a 
computer where I did not have the compiler, so I wanted something compiled into 
the program that I could run on the computer with the issue and get the 
backtrace information.. it worked great.

Just in case anyone comes across this trying to do the same thing, the command 
I used was:
dump_stack(stdout,0); 
sending it to stdout as a way to get it to the console screen is not 
immediately obvious from the documentation at:
https://www.freepascal.org/docs-html/rtl/system/dump_stack.html
but it works great without needing to have my own file to write to.

I didn't know about setting a conditional breakpoint though, so thanks for 
pointing that out.. there are quite a few times I avoid breakpoints because 
they happen too often.. a conditional break could be handy.. I don't know if 
the FPC text mode IDE does that or not... unfortunately the main big project I 
work on all the time refuses to compile in Lazarus.  I don't remember why... it 
can't find some units or something.... I've tried several times to go in and 
address whatever it causing it to not work and I always hit a roadblock where I 
just don't know how to make it work... and then I need to get some real work 
done, so I just open the FPC Text IDE and everything is fine.

James

-----Original Message-----
From: fpc-pascal <fpc-pascal-boun...@lists.freepascal.org> On Behalf Of Graeme 
Geldenhuys via fpc-pascal
Sent: Monday, January 3, 2022 7:01 PM
To: fpc-pascal@lists.freepascal.org
Cc: Graeme Geldenhuys <mailingli...@geldenhuys.co.uk>
Subject: Re: [fpc-pascal] FPC Backtrace

On 2022-01-03 23:45, Graeme Geldenhuys wrote:
> On 2022-01-03 13:28, James Richters via fpc-pascal wrote:
>> I’m curious if there is some way, perhaps with some directive or 
>> something to force a debug backtrace to happen, but without an error.
> 
> Christo already offered you a solution, but to offer an alternative 
> solution... Most IDE debugging functionality (or even GDB directly) 
> allows you to set a Breakpoint with iteration count or some other 
> expression.


Here is the details for Lazarus breakpoint properties, if that might help.
 
https://wiki.freepascal.org/IDE_Window:_Breakpoints#Breakpoint_properties



Regards,
   Graeme


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org 
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to