po command in Xcode does not generate output

cheesus picture cheesus · Apr 29, 2013 · Viewed 11.2k times · Source

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.

Answer

cheesus picture cheesus · Apr 30, 2013

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.