Cocoa Debugging

From Free Pascal wiki
Revision as of 22:44, 12 September 2018 by Skalogryz (talk | contribs) (debugging Cocoa)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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

Run from Terminal

  • open up Terminal (Applications -> Utilities -> Terminal).
  • cd to your project directory
  • cd to the bundle (a bundle is specialy structured directory, where binary resides. bundle directory extensions is ".app" )
 cd project1.app/Contents/MacOS

(for your project "project1.app" needs to be adjusted towards the name)

  • run the project
./project1

(for your project "project1" needs to be adjusted towards the executable name) See the output! The output might suggest what's going on. (any OS or error warning messages, would 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

lldb project1

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

r

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