Stop “developer tools access needs to take control

2019-01-12 17:45发布

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:

Developer Tools Access needs to take control of another process for debugging to continue. Type your password to allow this.

gdb-i386-apple-darwin needs to take control of another process for debugging to continue. Type your password to allow this.

My user is an admin user. I never saw these alerts before. How do I get them to stop?

EDIT

I've verified that I'm a member of the _developer group using id -a.

8条回答
太酷不给撩
2楼-- · 2019-01-12 18:06

There's a much simpler solution for this. Try running the following command:

sudo /usr/sbin/DevToolsSecurity --enable
查看更多
相关推荐>>
3楼-- · 2019-01-12 18:07

no need code. no need reinstall xcode. Do these steps:

1.close xcode.

2.open Keychain access.

3.double click your Keychain(the key icon which create from keychain.p12)

4.go to access control panel(name maybe not right)

5.enable all app access this.

6.save.

7.run your xcode project.

8.it works well.

查看更多
ら.Afraid
4楼-- · 2019-01-12 18:11

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

查看更多
何必那么认真
5楼-- · 2019-01-12 18:11

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..

查看更多
我只想做你的唯一
6楼-- · 2019-01-12 18:12

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>
查看更多
We Are One
7楼-- · 2019-01-12 18:15

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>
查看更多
登录 后发表回答