61

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.

3
  • 1
    Are you running in Release mode?
    – Anurag
    Apr 30, 2013 at 5:41
  • Nope it's Debug. As I said, all debugging tools are working fine. Apr 30, 2013 at 7:23
  • guys you'd better check out both answers - I've struggle with each of them at different times
    – nrx
    Feb 2, 2021 at 14:40

2 Answers 2

224

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.

4
  • 4
    Just hit the same issue in XCode5. I truly believe that there is some shortcut which switch those tabs! Jan 28, 2014 at 9:59
  • 2
    D'oh! Thanks (for the hint and not letting me feel super-stupid that I'm the only one doing the exact same thing…)
    – Jay
    Nov 28, 2015 at 10:31
  • 3
    I have been fighting this issue for so long. Like 3 months have gone by and I've been trying to make do without lldb. Thank you for saving my sanity.
    – goose
    Jan 12 at 0:23
  • 1
    This answer is STILL correct after 9 years — thank you!
    – David Gish
    Mar 28 at 1:26
37

enter image description here

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

0

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.