In Xcode go to Product > Edit Scheme (or Option-Click the Run button in the toolbar).
Under the Info tab change the Launch option to
- Wait for 'EXECUTABLE' to launch
You'll want to set an appropriate breakpoint in your application:openFile:
method,
then launch your app manually from the Finder by dropping a document file on the app icon.
To locate the built executable use 'Show in Finder' for your .app in Xcode's Project Navigator (or CMD+1).
The Xcode debugger should attach and break in your method.