Permissions Issues with Cocoa App

Hi,

I have a solution with a cocoa app and a console app. I can debug the console app but when I try and debug the cocoa app I get whats below

Any ideas on what is going wrong ?

Cheers,
John

/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver -f16 --log-file /dev/stdout 0.0.0.0:31713 “/Users/JohnMoshakis/Documents/develop/Nougat/BindToIntegerCocoaApplication/bin/Debug/OS X/BindToIntegerCocoaApplication.app/Contents/MacOS/BindToIntegerCocoaApplication”

debugserver-310.2 for x86_64.

1 +0.000000 sec [07ad/0303]: error: ::posix_spawnp ( pid => 1966, path = ‘/Users/JohnMoshakis/Documents/develop/Nougat/BindToIntegerCocoaApplication/bin/Debug/OS X/BindToIntegerCocoaApplication.app/Contents/MacOS/BindToIntegerCocoaApplication’, file_actions = 0x7fff55729308, attr = 0x7fff55729328, argv = 0x7ffde2d07ef0, envp = 0x7ffde2d02770 ) err = Permission denied (0x0000000d)
2 +0.000124 sec [07ad/0303]: RNBRunLoopLaunchInferior DNBProcessLaunch() returned error: 'Permission denied’
error: failed to launch process /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver: Permission denied

I did a project clean and now Im getting this when I attempt to debug

/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver -f16 --log-file /dev/stdout 0.0.0.0:53473 “/Users/JohnMoshakis/Documents/develop/Nougat/BindToIntegerCocoaApplication/bin/Debug/OS X/BindToIntegerCocoaApplication.app/Contents/MacOS/BindToIntegerCocoaApplication”

debugserver-310.2 for x86_64.

Listening to port 53473 for a connection from 0.0.0.0…

Got a connection, launched process /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver.

Got a ‘k’ packet, killing the inferior process.
Sending ptrace PT_KILL to terminate inferior process.
1 +0.000000 sec [0877/0303]: error: ::ptrace (request = PT_THUPDATE, pid = 0x0878, tid = 0x1503, signal = 0) err = Resource busy (0x00000010)
2 +0.000259 sec [0877/0303]: error: ::task_info ( target_task = 0x1103, flavor = TASK_BASIC_INFO, task_info_out => 0x7fff51e8bcd0, task_info_outCnt => 10 ) err = (ipc/send) invalid destination port (0x10000003)
Waited 0 ms for process to be reaped (state = Exited)
Exiting.

And when I try and debug for a second time it works. I then stop the running application from the menu using file exit and I get this appearing in the build log

Got a connection, launched process /Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Versions/A/Resources/debugserver.

1 +0.000000 sec [0887/1a03]: error: ::read ( 7, 0x110298a40, 1024 ) => -1 err = Bad file descriptor (0x00000009)
Exiting.

Now repeated attempts to debug show this in the build log

Got a ‘k’ packet, killing the inferior process.
Sending ptrace PT_KILL to terminate inferior process.
1 +0.000000 sec [08c2/0303]: error: ::ptrace (request = PT_THUPDATE, pid = 0x08c3, tid = 0x1503, signal = 0) err = Resource busy (0x00000010)
2 +0.000222 sec [08c2/0303]: error: ::task_info ( target_task = 0x1103, flavor = TASK_BASIC_INFO, task_info_out => 0x7fff5ae2ccd0, task_info_outCnt => 10 ) err = (ipc/send) invalid destination port (0x10000003)
Waited 0 ms for process to be reaped (state = Exited)
Exiting.

curious. i had issues yesterday where i couldn’t launch an app in the debugger either. When i restarted Fire, if found it could no longer launch any new processes, not even the “adb” it runs in the background on startup, to look for Android devices. Reboot, and it “fixed itself”. can you try rebooting, as well?

of course this might also be totally unrelated.

oh, can you also check file access rights on /Users/JohnMoshakis/Documents/develop/Nougat/BindToIntegerCocoaApplication/bin/Debug/OS X/BindToIntegerCocoaApplication.app/Contents/MacOS/BindToIntegerCocoaApplication, and see if it is set to +x? Can you launch the app manually, or “without Debugging”?

Its set to +x and I can launch the app manually without debugging. I have another console app in the solution and I can debug that fine. It seems as if the debugger has a problem with cocoa apps.