10

While trying to debug my view hierarchy, I get the following error:

Error: Unable to capture view hierarchy. Details: No plist data for fetching view hierarchy: error evaluating expression “(id)[(Class)objc_getClass("DBGViewDebuggerSupport_iOS") fetchViewHierarchyWithOptions:(id)[(Class)objc_getClass("NSDictionary") dictionaryWithObjects:(id)[(id)[(id)[(Class)objc_getClass("NSArray") arrayWithObject:(id)[(Class)objc_getClass("NSNumber") numberWithBool:1]] arrayByAddingObject:(id)[(id)[(Class)objc_getClass("NSArray") arrayWithObject:@"_UIVisualEffectBackdropView"] arrayByAddingObject:@"_UIBackdropEffectView"]] arrayByAddingObject:(id)[(Class)objc_getClass("NSNumber") numberWithBool:0]] forKeys:(id)[(id)[(id)[(Class)objc_getClass("NSArray") arrayWithObject:@"DBGViewDebuggerUseLayersAsSnapshots"] arrayByAddingObject:@"DBGViewDebuggerEffectViewsToSnapshotAsImage"] arrayByAddingObject:@"DBGViewDebuggerAlwaysEncodeLayers"]]]”: error: Execution was interrupted, reason: signal SIGSTOP. The process has been returned to the state before expression evaluation. Method: -[DBGAbstractViewDescriber handleFetchedViewInfo:fetchError:resultHandler:] Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.

Does anyone have a clue?

Xcode Version 8.2.1 (8C1002)
Simulator: iPhone 6 (10.2)

2
  • 1
    The error message asks you to file a bug report with Apple. I suggest you do so. Commented Feb 22, 2017 at 2:34
  • I have the same issue starting with Xcode 26 — everything was fine before that. I’ve determined that the problem is specifically with AVPlayerLayer, or more precisely, that the debugger can’t render it. If it exists anywhere in the view hierarchy, even if it’s not currently on the visible screen, the view debugger still crashes. I submitted a bug report to Apple a while ago, but they haven’t responded yet. Commented Nov 19 at 12:04

4 Answers 4

2

Actually me also got the same type of error, but the truth is our app must in Running state. Because the "Debug View capture hierarchy" area appears only while the app is running.

See my screen shot

In Step 1: Select your app first

In Step 2: Now select Debug hierarchy button

enter image description here

If this doesn't work then go to Debug in menu on the top bar of Xcode

->Debug -> view debugging -> Capture View Hierarchy

I solved my problem like this.

Sign up to request clarification or add additional context in comments.

1 Comment

That also doesn't work for me. I get an error with both methods: Unable to capture the view hierarchy Domain: DBGViewDebuggerErrorDomain Code: 0 Failure Reason: "MyApp" encountered an unexpected error when processing the request for a view hierarchy snapshot. User Info: { DVTErrorCreationDateKey = "2023-01-09 20:30:43 +0000"; DVTRadarComponentKey = 547420; Environment = "Xcode 14.0 (14A309) debugging iPhone 13 Pro iOS 16.0 (20A362)."; }
2

Since Apple Silicon can run iOS apps natively, you want to debug its views too. If you use Xcode in fullscreen mode, your app will change state and become inactive when you switch focus. So as @iOS said, you can't get the snapshot.

Just keep Xcode and iOS app in the same workspace (or on desktop), so iOS app will be in focus. It is still laggy for me, but maybe it is current Xcode's fault.

2 Comments

That also doesn't work for me. I get an error with both methods: Unable to capture the view hierarchy Domain: DBGViewDebuggerErrorDomain Code: 0 Failure Reason: "MyApp" encountered an unexpected error when processing the request for a view hierarchy snapshot. User Info: { DVTErrorCreationDateKey = "2023-01-09 20:30:43 +0000"; DVTRadarComponentKey = 547420; Environment = "Xcode 14.0 (14A309) debugging iPhone 13 Pro iOS 16.0 (20A362)."; }
Removing xcode and simulator from fullscreen mode to normal mode fixed this issue for me.
0

For large projects , generally this issue happens , even in updated xcode version this issue still exists. For solution you can try below methods ,

  1. Instead on click on Debug View Hierarchy icon in xcode , Go Debug -> View Debugging -> Capture View Hierarchy
  2. Try to use xcode in maximized size.
  3. Minimize both left and right navigators window.

Comments

-1

In my experience, and I really didn't think my model was that large, Xcode basically waits for 60 seconds for the view hierarchy to be captured.

I get the notice on screen at 60 seconds, but the process takes (for me) an extra 30 seconds to complete the capture process. By that time the debugger has given up and the only way forward is to close the app.

What I have noticed though is that once the capture completes, I see a log like:

writing to file:///var/folders/1d/tsmxxnsx4ld8bjh28djdk66c0000gn/T/84A1D6DD-FB93-4AA1-96CD-113D056EE6B1-os.reality

If I then open that file from the finder, in Xcode, I can actually see my model. I can't access the nodes within it, but if all I want to do is look at the model this is fine.

It would be nice to be able to alter Xcodes timeout, but I've not found how to do that.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.