内存配置文件不适用于Xcode,仅显示"No Selection"(无选择). [英] Memory profiling doesn't work with Xcode, just displays "No Selection"

查看:354
本文介绍了内存配置文件不适用于Xcode,仅显示"No Selection"(无选择).的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用最新版本的Xcode 9和macOS 10.13.

I am using the latest version of Xcode 9 and macOS 10.13.

当我尝试从应用程序的当前状态制作内存图时,它会显示一个空屏幕,显示未选择.

When I try to make a memory graph from the current state of my application, it shows an empty screen that says No Selection.

我也尝试分析和使用Instruments,但是由于权限错误,它不允许我运行.

I also tried to profile and work with Instruments, but it did not allow me to run due to a permission error.

目标无法运行.

Target failed to run.

调试[应用名称]的权限被拒绝.

Permission to debug [app name] was denied.

意识到这些线程,并尝试了其中的可用建议,但它们似乎没有用:

I am aware of these threads and tried the suggestions available in them, but they didn't seem to work:

  • Reddit - Has instruments stopped working for you in Xcode 9 due to a permission denied error? Is there a workaround for this?
  • Apple Developer Forums - Xcode 9 - Instruments permission denied
  • Stack Overflow - Why do I get instruments - "Target failed to run"?
  • Stack Overflow - Can't launch my app in Instruments: At least one target failed to launch

我尝试过的事情:

  • 重新启动Xcode
  • 清空派生数据"文件夹
  • 清洁项目
  • 清洁Build文件夹
  • 将方案的应用程序环境修改为Debug而不是Release
  • 手动管理配置文件并选择用于调试和发布的开发配置文件
  • 尝试使用不同操作系统版本(iOS 11,iOS 10)的模拟器

这似乎是Xcode 9的一个特定问题.

Looks like it's a specific issue with Xcode 9.

有没有解决此问题的方法?

Are there any workarounds for this issue?

推荐答案

我尝试在物理设备上构建应用程序,但工作正常,但是内存图未显示我的Swift类(对于例如,我的控制器根本不在那儿).尽管如此,分配观察仍然可以在Instruments上正常工作.

I tried building the application on a physical device and it worked, hovever, the memory graph did not show my Swift classes (for e.g., my controllers were simply not there). Allocation observing worked fine with Instruments, nonetheless.

这似乎是模拟器引起的问题.

It seems like this is an issue caused by the simulator.

这篇关于内存配置文件不适用于Xcode,仅显示"No Selection"(无选择).的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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