Lazarus

Programming => Operating Systems => macOS / Mac OS X => Topic started by: JimKueneman on November 24, 2012, 01:26:23 am

Title: Debugging App
Post by: JimKueneman on November 24, 2012, 01:26:23 am
I have an app that uses SynEdit for com port support.  The problem is I get a random crash that I can't track down.  The main problem is I can't run the app in the debugger because when I do the com port will not connect and I can't run the app where the problem occurs.  Simple question:

1) Any thoughts why the com port won't work under the debugger
2) Is there any tricks to understanding where the app crashes when running stand along?

Thanks,
Jim
Title: Re: Debugging App
Post by: Martin_fr on November 24, 2012, 02:10:43 am
You can put lots of
Code: [Select]
debugln();
in there (essentially writeln)

Then you must start your app from console:
Code: [Select]
/path/to/yourapp/yourapp.app/Content/MacOS/yourapp

In project options check "display line numbers in run time error backtraces (-gl). This also prints to console


Make sure, that all used (or at least those that may be part of a stacktrace) packages, have debug info enabled.(open each package and check the options)

If you get a stacktrace, you can use "leak view" from tools menu.

TinyPortal © 2005-2018