Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Throwing error while debug and run PO command in Xcode 12

When I am running application on simulator or device and try to use PO command during debug. Xcode is throwing error instead of printing value. It is happening after I have updated Xcode 12.

error: virtual filesystem overlay file

/all-product-headers.yaml' not found

error: couldn't IRGen expression. Please check the above error messages for possible root causes.

enter image description here

What is the solution for this ? Any help would be appreciated.

like image 950
VRAwesome Avatar asked Nov 05 '20 05:11

VRAwesome


People also ask

What does po mean in Xcode?

"po" means something like "print object".

What is PO command?

The po command (a.k.a. expr --O -- ) does everything that p does, but instead of printing the result, if the result is a pointer to an ObjC object, it calls that object's "description" method, and prints the string returned by that method(*).

How do I run Xcode in debug mode?

When you run an application in Xcode, the debugger is automatically started and attached to the process of the application. Click the Run button in the top left or press Command + R. From the moment the application is up and running, we can start inspecting the process and, if necessary, debug it.

What is debug executable in Xcode?

The “Debug executable” checkbox specifies whether or not you want to run with the debugger enabled. Once running, you can use Debug > Attach to Process on a process that has been launched with debugging disabled if needed. It seems like all this does is start your app with the debugger attached.


1 Answers

Go to /Users/<YOUR_USER>/Library/Developer/Xcode/ and delete "DerivedData" folder.

If in the path of the missing file is the name of a framework e.g. Usabilla.build/Release-iphonesimulator/Usabilla.build/all-product-headers.yaml Try using an older version, using version 6.4.7 of Usabilla fixed the issue for me.

If the above fixes don't work, here are some info that might help: https://steipete.com/posts/couldnt-irgen-expression/

like image 59
Mihai Avatar answered Sep 28 '22 18:09

Mihai