Sign in Join
Wiki copytemporary

Cocoa Debugging

(macOS only)

Having problems running a project compiled for Cocoa? Here are steps to try

Run from Terminal

text
 cd project1.app/Contents/MacOS

(for your project "project1.app" needs to be changed to your project's name)

text
./project1

See the output! The output might suggest what's going on. Any OS or error warning messages should be shown.

Console App

The log entries could also be acquired from Console utillity.

Run with lldb debugger

Repeat the same steps as in "Run from Terminal", but run the program as

text
lldb project1

(loading of lldb requires admin rights, and well as takes some time) once loaded enter command

text
r

and wait for it to stop or catch the application crash. See more here

Troubleshooting

Creating a Minimal Sample Project

It's likely you would encounter a problem when working with a big production project.

It's likely you might have some closed-source code that you're not allowed to share.

It's preferred to have a simple project demonstrating the problem. "Simple" meaning:

In order to get a simple project from the big production project you can do the following:

:* (i.e. if you're having problems with placement of a control, you might want to remove main menu, TActions, if any)

:* remove bigger pieces first (it might be much easier than you think)

At this point you should have small enough project to demonstrate the problem and bug report it.

See also


From the Free Pascal wiki, page "Cocoa Debugging", as it stood on 2020-08-06 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.

Revision 3, last changed by WikiArchive .

Talk about this page

Nobody has opened a bench for this page yet. Sign in to open one.