I would like to be able to start debugger using process name and
launch the extension and be able to debug from first line of code in
extension.
Due to the way that sysexes are loaded — they are very different from apexes! — I would not expect to be able to attach
before the process is running. However, you wrote:
If the extension is already running, then I am able to attach by PID
but never by name.
and I would expect name and PID to work equally well here, that is, they both work or they both don’t. That fact that’s not the case is weird.
I have tried using target name as well as extension bundle identifier
and several other combinations.
Try this…
Run
lldb using
sudo.
Type in this command:
Code Block | (lldb) process attach -n *** |
but don’t press Return. In this context
*** is the name that you successfully attached with in the past.
Press Tab.
LLDB should print a list of candidates. Copy the full expansion of the sysex name.
Go to Xcode and enter that into Debug > Attach to Process by PID or Name.
Does that work?
Oh, and btw, if you want to debug from the start of your sysex, add a call to
pause at the beginning of
main. That’ll pause waiting for you to attach with the debugger (attaching delivers a signal which breaks you out of
pause).
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"