停止“开发人员工具访问需要控制另一个进程以进行调试以继续”警报

时间:2012-02-03 17:28:29

标签: ios ios-simulator osx-lion

我最近升级到10.7.3,当我尝试在登录后第一次在模拟器中调试我的iOS项目时,系统会提示我以下两个警告:

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.

我的用户是管理员用户。我之前从未见过这些警报。我怎么让他们停下来?​​

修改

我已使用_developer验证我是id -a群组的成员。

9 个答案:

答案 0 :(得分:146)

有一个更简单的解决方案。尝试运行以下命令:

sudo /usr/sbin/DevToolsSecurity --enable

答案 1 :(得分:13)

启用开发者模式: 在终端运行这个: DevToolsSecurity -enable

答案 2 :(得分:12)

Per Zev Eisenberg的回答,重新安装Xcode 4.2.1。但是,使用以下差异修补/etc/authorization文件可能更容易。

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

答案 3 :(得分:9)

升级到10.7.3后重新安装Xcode 4.2.1似乎已经为我修复了它。

答案 4 :(得分:8)

我修改了system.privilege.taskport的规则,警报不再出现了。

  1. 打开文件/etc/authorization
  2. 找到规则system.privilege.taskport。在<key>class</key>行下,将<string>rule</string>更改为<string>allow</string>

答案 5 :(得分:5)

我的mac 10.12.5&amp; Xcode9 运行此命令:

sudo security authorizationdb write system.privilege.taskport allow 

然后输入您的密码..检查它是否仍然提示您。 祝你好运..

答案 6 :(得分:0)

在/ etc / authorization文件上修改了一些东西,我是没有v10.7.3的Lion,它有以下代码

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

更新后,由于支持新语言,文件包含许多修改,但与调试授权相对应的行与上面显示的行不同

第7675-7676行

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

我无法将这些差异应用于我的10.7.3 Lion安装,因为它是一台生产机器,我无法冒险破坏它

我已经完成了所有必需的许可,如命令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)

答案 7 :(得分:0)

我只是在(编辑方案)->取消选中调试可执行文件中关闭了调试功能。 但是我也要在另一个控制台上进行所有调试,因此,如果您正在开发并且需要调试器,那么它将无济于事。我只在旧版本的Xcode 8.2.1上遇到此问题,因为我是在使用El Capitan的旧Mac上运行代码的。

较新的mac和Xcode版本10似乎没有此问题。

答案 8 :(得分:-3)

无需代码。无需重新安装xcode。执行以下步骤:

1.关闭xcode。

2.打开钥匙串访问。

3.双击您的钥匙串(从keychain.p12创建的钥匙图标)

4.go访问控制面板(名称可能不对)

5.启用所有应用访问此功能。

6.save。

7.运行你的xcode项目。

8.运作良好。