po command in Xcode does not generate output

IosXcodeGdbLldb

Ios Problem Overview


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.

Ios Solutions


Solution 1 - Ios

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.

Solution 2 - Ios

enter image description here

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

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestioncheesusView Question on Stackoverflow
Solution 1 - IoscheesusView Answer on Stackoverflow
Solution 2 - IosnefarianblackView Answer on Stackoverflow