我有这样一种情况:当我运行带有断点的项目时,编译器转到第一个断点,并像往常一样停止程序,直到我按下下一步按钮。但当我进入下一步时-他没有反应,然后我点击2-3次‘下一步’(单步进入)按钮-之后他运行程序到最后,没有任何反应。
我试着这样做:构建->清除所有目标-但它没有给出任何结果。已尝试重新启动计算机-效果相同。
调试器日志如下:
[Session started at 2010-11-11 12:51:11 +0200.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1472) (Wed Jul 21 10:53:12 UTC 2010)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 1032.
Pending breakpoint 1 - ""RootViewController.m":34" resolved
2010-11-11 12:51:14.542 PhoneBook[1032:207] ******* Accessibility Status Changed: On
2010-11-11 12:51:14.602 PhoneBook[1032:207] ********** Loading AX for: com.yourcompany.PhoneBook ************
The Debugger has exited due to signal 15 (SIGTERM).The Debugger has exited due to signal 15 (SIGTERM).经过进一步的检查,看起来这段代码就是原因:
NSArray *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [path objectAtIndex: 0];
NSString *fname = [documentsDirectory stringByAppendingPathComponent: @"phoneBook.sqlite3"];这段代码获取可执行文件的当前目录,然后在那里创建我的数据库文件。第一次都是好的,第二次是坏的。这可能是什么原因,以及我如何修复它?
发布于 2010-11-11 04:12:43
执行Cmd + Opt +B以显示所有断点。删除所有断点。现在,通过iPhone模拟器清除您的模拟器,并重新设置内容和设置,然后再试一次。
发布于 2010-11-11 09:58:51
检查您的程序日志。听起来这个应用程序已经崩溃了。
https://stackoverflow.com/questions/4147616
复制相似问题