Recent

Author Topic: Debugging App  (Read 1924 times)

JimKueneman

  • Full Member
  • ***
  • Posts: 157
Debugging App
« 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

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 5885
    • wiki
Re: Debugging App
« Reply #1 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.