Xcode 5/6: View Debugging always grayed out?

2019-01-21 16:08发布

The "Debug / View Debugging" menu is always grayed out for me in Xcode 5 (and 6), even when the target is stopped at a breakpoint. How do I enable it?

Debug / View Debugging

标签: ios xcode xcode5
8条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-01-21 16:12

Another option for view debugging is iOS-Hierarchy-Viewer: https://github.com/glock45/iOS-Hierarchy-Viewer

查看更多
够拽才男人
3楼-- · 2019-01-21 16:15

I have the same issue as well, but I could see it enabled when I create a new project using Swift.

查看更多
成全新的幸福
4楼-- · 2019-01-21 16:17

Hmm.. people just guess it's targeted for iOS. On my OS X 10.8 MacBook pro with Xcode 5.1.1, sometimes the menu its always disabled for a project for Mac OS X.

On my OS X 10.9 Mac mini with Xcode 5.1.1, it is enabled.

Looks to me a bug..

查看更多
Explosion°爆炸
5楼-- · 2019-01-21 16:17
  1. Test environment : Xcode version 6.1 (6A1052d)

    Test project: My project ( support for 64- bit and iOS deployment target is iOS6)

    Test results: The View Debugging options are only enabled in iPhone5 with iOS8

  2. Test environment : Xcode Version 6.1 (6A1052d)

    Test project : Xcode-ViewDebugging ( supports 64- bit and iOS deployment target is iOS8)

    Test results : The View Debugging options are enabled in all simulators with iOS8

  3. So be sure that it must be iOS8, but still do not know the specific rules

查看更多
仙女界的扛把子
6楼-- · 2019-01-21 16:32

I believe that the Capture View Hierarchy feature is only available when the target is running iOS 8.

In Xcode 6 (beta 2) the schema popup on the toolbar lets you choose the type of simulated device. For me the fixed devices show up three times. This is because I have three environments available: iOS 7, iOS 7.1 and iOS 8. However, this information is missing from the popup, which appears to be an Xcode 6 bug. The bottom group of devices, including "Resizable iPhone" and "Resizable iPad", are running iOS 8. If you use one of these devices the View Debugging -> Capture View Hierarchy menu item becomes available.

However, iOS Simulator -> Hardware -> Device -> Manage Devices… lets you edit the device names to make them more informative.

Note that this crashes for me every time I try to view a hierarchy that is using a UIMapView.

查看更多
老娘就宠你
7楼-- · 2019-01-21 16:37

Also make sure that view debugging isn't disabled in your current scheme's run options:

Xcode settings for view debugging

Xcode 6.1 still has the limitations about view debugging only working on 32 bit devices (iPhone 5 or older) and on iOS 8, though.

查看更多
登录 后发表回答