6

I can't find the Debug View Hierarchy button in Xcode.

I've read this:

Xcode 6.1 can't find 'debug view hierarchy' button

and launched my app on the iOS8 simulator but still no luck. Something to do with the Architectures perhaps?

Here's what I'm using:

enter image description here

Community
  • 1
  • 1
Snowcrash
  • 80,579
  • 89
  • 266
  • 376

4 Answers4

9

Check to see if accidentally you have disables User Interface debugging. You can find this option in Edit scheme, check out the screenshot:

enter image description here

Then this button will be back:

enter image description here

Hope it helps someone.

Abhinav Dobhal
  • 598
  • 7
  • 12
4

In your scheme settings, accessible via Product>Scheme>Edit Scheme, there is an option called debug executable, Enable it to make the debug buttons available

enter image description here

Tibin Thomas
  • 1,365
  • 2
  • 16
  • 25
3

On the left side of the debugger, in the toolbar below:

Debug View hierarchy

It is the second icon from the right in the image. It might be black or greyed out depending on whether Xcode is in focus or not.

It works fine on device and simulator. Either click it to break or break using a breakpoint/debugger and use it.

Khaled Barazi
  • 8,681
  • 6
  • 42
  • 62
0

Thanks @Tibin Thomas and @Khaled Barazi. The Debug View Hierarchy button only appears if you have

  1. checked the Debug executable box and
  2. run your app on the simulator.

By the way, in Xcode 13.1, the button have already become as following icon

enter image description here

bfhaha
  • 401
  • 4
  • 6