Stop “developer tools access needs to take control of another process for debugging to continue” alert

后端 未结 9 2646
抹茶落季
抹茶落季 2020-12-02 04:24

I recently upgraded to 10.7.3, and when I try to debug my iOS project in the simulator for the first time after logging in, I\'m prompted with the following two alerts:

相关标签:
9条回答
  • 2020-12-02 04:41

    I modified the rule for system.privilege.taskport and the alert doesn't show up anymore.

    1. Open the file /etc/authorization.
    2. Find the rule system.privilege.taskport. Under the line <key>class</key>, change <string>rule</string> to <string>allow</string>
    0 讨论(0)
  • 2020-12-02 04:47

    I had same issue with my mac 10.12.5 & Xcode9 Run this command :

    sudo security authorizationdb write system.privilege.taskport allow 
    

    Then enter your password.. Check if it still prompt you. Good luck..

    0 讨论(0)
  • 2020-12-02 04:48

    Per Zev Eisenberg's answer, reinstalling Xcode 4.2.1 worked. However, it might be easier to just patch the /etc/authorization file with the following diff.

            <key>system.privilege.taskport.debug</key> 
            <dict>
                <key>allow-root</key>
                <false/>
                <key>class</key>
    -           <string>user</string>
    +           <string>rule</string>
                <key>comment</key>
                <string>For use by Apple.  WARNING: administrators are advised
                 not to modify this right.</string>
                <key>default-button</key>
                <dict>
                ...
                </dict>
                <key>default-prompt</key>
                <dict>
                ...
                </dict>
    -           <key>group</key>
    -           <string>_developer</string>
                <key>shared</key>
                <true/>
    -           <key>timeout</key>
    -           <integer>36000</integer>
    +           <key>k-of-n</key>
    +           <integer>1</integer>
    +           <key>rule</key>
    +           <array>
    +               <string>is-admin</string>
    +               <string>is-developer</string>
    +               <string>authenticate-developer</string>
    +           </array>
            </dict>
    
    0 讨论(0)
  • 2020-12-02 04:48

    Something has been modified on file /etc/authorization, I've a Lion without v10.7.3 and it has the following code

    Lines 5807-5814

        <key>k-of-n</key>
        <integer>1</integer>
        <key>rule</key>
        <array>
            <string>is-admin</string>
            <string>is-developer</string>
            <string>authenticate-developer</string>
        </array>
    

    After the update the file contains many modification due to new language supported but the lines corresponding to debugging authorization differ from the lines shown above in

    Lines 7675-7676

        <key>group</key>
        <string>_developer</string>
    

    I can't apply these differences to my 10.7.3 Lion installation because it's a production machine and I can't risk to corrupt it

    I've all necessasy permission as shown from command id -a

    uid=501(dave) gid=20(staff) groups=20(staff),
    401(com.apple.access_screensharing),
    402(com.apple.sharepoint.group.1),
    12(everyone),
    33(_appstore),
    61(localaccounts),
    79(_appserverusr),
    80(admin),
    81(_appserveradm),
    98(_lpadmin),
    100(_lpoperator),
    204(_developer)
    
    0 讨论(0)
  • 2020-12-02 04:55

    enable develoer mode: In Terminal run this: DevToolsSecurity -enable

    0 讨论(0)
  • 2020-12-02 04:57

    I just turned debugging off in (edit scheme) -> uncheck debug executable. But I also do all of my debugging on another console, so if you are developing and need the debugger then it wont help. I only have this issue with an old version of Xcode 8.2.1 since I am running the code on an old Mac using El Capitan.

    Newer mac and Xcode version 10 doesn't seem to have this issue.

    0 讨论(0)
提交回复
热议问题