I have a finder sync extension app. While running an app the breakpoints and console is not working.
Asked
Active
Viewed 589 times
2
-
now you find any way to do this? – jignesh Vadadoriya Dec 12 '19 at 11:29
2 Answers
1
- create a new cocoa application and add the finder sync target.
- select the extension target by following steps Product -> Scheme -> FINDER_SYNC_EXT
- choose the xcode debuger for attaching finder sync extension Debug -> Attach to Process by PID or Name - > Attach
- xcode status will be updated to "Waiting to attach to FINDER_SYNC_EXT"
- set your breakpoints in init() method of extensions principle class and run your extension
- your breakpoints will be triggered by now.

Vikram Sinha
- 581
- 1
- 10
- 25
-
1Its worth noting you need to follow the step 3 - Debug->Attach to Process step every time you want to debug – Spanners May 14 '20 at 17:38
-
0
Firstly, you need to register your extension in Finder:
pluginkit -a <path you your debugging appex>
Then, you have to wait to attach to the running instance in Xcode: Debug menu, Attach to Process by PID or Name ... and then enter the name of your executable. Now Xcode is waiting for it to start.
Finally, tell Finder to enable your extension (or restart Finder):
pluginkit -e use -I <ID of you appex>

Liviu
- 1,859
- 2
- 22
- 48
-
can you please explain step by step in details? thanks in advance – jignesh Vadadoriya Dec 12 '19 at 11:28
-
I have no Mac anymore, so I cannot verify, I will try my best: 1. Build your appex and get the full path 2. in Terminal, register the appex with Finder 3. Attach to the appex "future process" in XCode 4. enable it in Terminal – Liviu Dec 12 '19 at 21:26