Hanton
Hanton

Reputation: 686

Xcode Debug View Hierarchy: Unable to capture view hierarchy

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.

Anyone got a clue?

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

Thanks!

Upvotes: 9

Views: 14346

Answers (3)

SAHIL AMRUT AGASHE
SAHIL AMRUT AGASHE

Reputation: 339

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.

Upvotes: 0

Damik Minnegalimov
Damik Minnegalimov

Reputation: 61

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.

Upvotes: 1

Naresh
Naresh

Reputation: 17872

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.

Upvotes: 2

Related Questions