2

When I use the terminal/console to print out a value by typing po object it prints blank for all objects. This only happens for my work project which is really big and my small demo projects work fine.

Also its not happening for any of my colleagues. I was using Xcode 10.2 and upgraded to Xcode 10.3 to see if it fixes the problem.

Xcode terminal with po isAppInForeground.stringValue written in the terminal

stringValue is an extension on bool that returns "true" or "false" however this happens for all objects so I don't think the code there is relevant.

Due to the huge compile time of our app its quite time consuming to always write print(object) or debugPrint(object) in the code.

Any ideas how to fix the issue?

Alladinian
  • 34,483
  • 6
  • 89
  • 91
user1898829
  • 3,437
  • 6
  • 34
  • 62

2 Answers2

3

Can you try to press on i it does the same, but sometimes it's work for me.

Also check this out: XCode's po command has stopped working

enter image description here

Let me know if this help you.

vpoltave
  • 1,612
  • 3
  • 14
  • 31
1

Try the v command.

From the XCode release notes

The LLDB debugger has a new command alias, v, for the “frame variable” command to print variables in the current stack frame. Because it bypasses the expression evaluator, v can be a lot faster and should be preferred over p or po. (40066460)

May Rest in Peace
  • 2,070
  • 2
  • 20
  • 34