XCode's po command has stopped working

核能气质少年 提交于 2019-12-03 14:23:18

问题


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.


回答1:


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

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




回答2:


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



来源:https://stackoverflow.com/questions/16287299/xcodes-po-command-has-stopped-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!