Recent

Author Topic: Debugging Carbon Application  (Read 14175 times)

abb

  • New Member
  • *
  • Posts: 40
Debugging Carbon Application
« on: March 21, 2007, 11:59:16 am »
Hi, All,

I'm trying to launch the project in debugger (using IDE), and my application appears on the screen, but all its controls are unavailable for mouse clicks, and the mouse cursor is "I" (as it is in the editor). I can press the Close/Minimize/Maximize buttons of my application window, so I can terminate it by such click as well as by IDE menu, but I just can't test my application because I can't click controls in its window. Therefore I can't debug it as I can't activate the piece of code with the breakpoint.  

May it so happen because it is just an executable but not the APP structure? If so, maybe it would be a solution to prepare APP structure with all nesessary files and assign the compiled application path in Lazarus settings to the Contents/macos/ subdirectory of this APP structure? Will IDE then be able to run my project correctly?

Is there anybody here, who ever tried to debug Carbon application? I understand that Carbon widgetset is yet under construction but may be there are any testers here?

Thanks.

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: Debugging Carbon Application
« Reply #1 on: March 21, 2007, 02:24:11 pm »
Quote from: "abb"
I'm trying to launch the project in debugger (using IDE), and my application appears on the screen, but all its controls are unavailable for mouse clicks


I don't think this has anything to do with the debugger, but that you're running the executable, not the application.

Debug the application:

 gdb project1.app/contents/macos/project1

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2584
RE: Re: Debugging Carbon Application
« Reply #2 on: March 21, 2007, 02:42:50 pm »
indeed, you need some basice .app structure like in  http://lazarus.dommelstein.net/examples/cursors/project1.app

inside MacOS, project1 is a symlink: project1 -> ../../../project1

when you specify in Run parameters -> host application : project1.app/contents/macos/project1
you can debug from lazarus
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

abb

  • New Member
  • *
  • Posts: 40
Re: RE: Re: Debugging Carbon Application
« Reply #3 on: March 21, 2007, 07:44:32 pm »
Quote from: "Marc"
specify in Run parameters -> host application : project1.app/contents/macos/project1
you can debug from lazarus

Yes! Now I can click buttons in my application... but breakpoint is not working.

Linking options are set:
- generate debug info for gdb
- generate debug info for dbx
- display line numbers
- use heaptrc unit
- generate code for valgrind
-generate code for gprof

Linking options are off:
- Strip symbols from executable is
- link smart
- win32 gui application

What I may do yet wrong?
Thanks.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2584
RE: Re: RE: Re: Debugging Carbon Application
« Reply #4 on: March 23, 2007, 05:23:10 pm »
Guessing, do you have an intel mac ?
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

abb

  • New Member
  • *
  • Posts: 40
Re: RE: Re: RE: Re: Debugging Carbon Application
« Reply #5 on: March 24, 2007, 12:45:17 pm »
Quote from: "Marc"
Guessing, do you have an intel mac ?

Yes. IC2D

Any ideas of how to configure debugger options?

Thanks.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2584
RE: Re: RE: Re: RE: Re: Debugging Carbon Application
« Reply #6 on: March 26, 2007, 11:43:29 am »
You're the second intel (*) mac where setting breakpoints doesn't work. I'm thinking of a testcase on how to check whats going on.

(*) I don't know if it is cpu related, I only know that it works on my powerPC mini (and I can't remember these problems reported before intel mac was available)
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

abb

  • New Member
  • *
  • Posts: 40
Re: RE: Re: RE: Re: RE: Re: Debugging Carbon Application
« Reply #7 on: March 26, 2007, 08:10:04 pm »
Quote from: "Marc"
You're the second intel (*) mac where setting breakpoints doesn't work. I'm thinking of a testcase on how to check whats going on.

Am looking forward to any ideas you may have! This problem really stops my further experimenting with Lazarus on Mac :(

Thanks.

abb

  • New Member
  • *
  • Posts: 40
Re: RE: Re: RE: Re: RE: Re: Debugging Carbon Application
« Reply #8 on: April 10, 2007, 04:17:20 am »
Quote from: "Marc"
You're the second intel (*) mac where setting breakpoints doesn't work. I'm thinking of a testcase on how to check whats going on.

Am still looking forward to any ideas!

Is there any location here, where I need to post a bugreport?

I see some debugging trace info, including some error messages in the X11 terminal window, and it is helpful information, but I can't really work with debugger without breakpoints.

Thanks.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2584
RE: Re: RE: Re: RE: Re: RE: Re: Debugging Carbon Application
« Reply #9 on: April 11, 2007, 04:59:37 pm »
A link to the bugrtacker is given on this page. Just look in the left column under the heading: Code & Coding -> Bug tracking
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

vaso

  • New member
  • *
  • Posts: 7
Re: RE: Re: RE: Re: RE: Re: RE: Re: Debugging Carbon Applica
« Reply #10 on: June 04, 2007, 10:02:55 am »
I have same issue:
Mac OS X Tiger Intel
and installed from daily snapshots
fpc-2.1.5-20070524-i386-macosx.dmg
fpcsrc-2.1.5-20070524-i386-macosx.dmg
lazarus-0.9.23-20070524-i386-macosx.dmg
and gdb installed frm sources (last release). in terminal typed ./configure
and after that ./make
Thank you.

 

TinyPortal © 2005-2018