Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

po command in Xcode does not generate output

Tags:

xcode

ios

gdb

lldb

At some point during my work, Xcode's po and p commands stopped working. No matter what I enter, it doesn't generate output:

(gdb) po self (gdb) po [self name] (gdb) po [UITableView class] (gdb) po @"Hello" (gdb) p indexPath.row (gdb) print indexPath.row (gdb) po fjkldsjflksdjklwjfkljfkldsjflk (gdb) 

When I enter any of these commands, the command line just goes to the next line, where it prints the blue (gdb), but no output.

I tried the following steps:

  • Restart Xcode, restart my Macbook
  • Tried while debugging in the simulator as well as on a iOS device
  • Switched to LLDB and restarted
  • Re-installed Xcode

The other debugging tools in Xcode seem to work okay: Breakpoints, step-by-step execution, the Auto variable examination window etc.

Any ideas?

EDIT: Doesn't work even after a re-install of Xcode.

like image 324
cheesus Avatar asked Apr 29 '13 20:04

cheesus


People also ask

What is PO command in XCode?

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(*).

What is the use of PO command?

The command = ( po-statistics ) computes the total number of entries in the PO file, the ordinal of the current entry (counted from 1), the number of untranslated entries, the number of obsolete entries, and displays all these numbers.


2 Answers

Silly me, I was in the 'Target Output' window instead of the 'Debugger Output' window.

enter image description here

Somehow I thought I checked the other console windows there, but apparently I didn't.

like image 95
cheesus Avatar answered Oct 01 '22 07:10

cheesus


enter image description here

I added filter in debugger which hid other logs. Removing the filter worked for me.

like image 37
nefarianblack Avatar answered Oct 01 '22 07:10

nefarianblack