Xcode 9 - 无法附加到框架单元测试的pid [英] Xcode 9 - Could not attach to pid for Frameworks unit tests

查看:554
本文介绍了Xcode 9 - 无法附加到框架单元测试的pid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用时间机器从一个mac迁移到另一个mac后出现以下错误。

I am getting the following error after migrating from one mac to another using time machine.


无法附加到pid

Could not attach to pid

确保项目标题尚未运行,
和系统用户名有权调试它。

Ensure "project title" is not already running, and "system username" has permission to debug it.

仅在运行(任何)Framework项目的单元测试时才会发生错误。在模拟器和设备上运行应用程序工作正常。

The error occurs only when running the unit tests for (any) Framework project. Running an application on simulator and device works fine.

运行应用程序的单元测试工作正常,但由于此错误,无法启动任何框架的运行。即使使用Alamofire或PromiseKit单元测试,我也会收到此错误。

Running unit tests for an application works, but running it for any framework can't be launched due to this error. I am getting this error even with Alamofire or PromiseKit unit tests.

我在Stackoverflow上测试了类似问题上建议的解决方案(我删除了派生数据,清理了所有内容,重新安装了Xcode,重新启动mac ..)到目前为止没有解决问题。

I tested the solutions suggested on similar questions on Stackoverflow (I deleted derived data, cleaned everything, reinstalled Xcode, restarted the mac ..) nothing solved the issue till now.

我正在使用Xcode 9.3并使用Xcode 9.4-beta进行测试。

I am using Xcode 9.3 and tested this with Xcode 9.4-beta also.

我在Mac OS High Sierra上运行 - 10.13.4(17E199)

I am running on Mac OS High Sierra - 10.13.4 (17E199)

欢迎任何帮助/建议!

推荐答案

在向Apple发布错误报告后,他们建议我:

After opening a bug report to Apple, they suggested me to:


  • 检查我的用户是否是管理员用户。情况确实如此。

  • groups 命令的输出中检查我是否有_developer组。情况就是这样。使用此命令: dscacheutil -q group

  • 使用命令 sudo / usr / sbin检查开发者模式权限/ DevToolsSecurity -status 。状态对我来说是未知的。

  • 如果需要,使用命令 sudo / usr / sbin / DevToolsSecurity -enable 启用开发者模式权限。这最终解决了我的问题!

  • Check if my user is an Admin user. It was the case.
  • Check if I have "_developer" group, in the output of groups command. it was the case. Use this command: dscacheutil -q group
  • Check developer mode rights using the command sudo /usr/sbin/DevToolsSecurity -status. The status was unknown for me.
  • Enable developer mode rights if needed, using the command sudo /usr/sbin/DevToolsSecurity -enable. This solved finally my issue!

这篇关于Xcode 9 - 无法附加到框架单元测试的pid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆