开发者

Xcode problems with debug mode and breakpoints

开发者 https://www.devze.com 2023-01-24 16:10 出处:网络
I have such a situation: when I\'m running my project with breakpoints, compiler goes to the first one and stops program as usual until I\'m press a next step button. But when I\'m going next - th开发

I have such a situation: when I'm running my project with breakpoints, compiler goes to the first one and stops program as usual until I'm press a next step button. But when I'm going next - th开发者_运维问答ere is no reaction from his side, then I clicking 2-3 times 'next step'(Step into) button - after that he run program to the end and have no reaction.

I tried to do: Build->Clear All Targets - but it gives no results. Tried to restart computer - the same effect.

The debugger log is as follows:

[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).

After further review, it looks like this code was the reason:

NSArray *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [path objectAtIndex: 0];
    NSString *fname = [documentsDirectory stringByAppendingPathComponent: @"phoneBook.sqlite3"];

This code takes current directory of the executable, and then I create my database file there. first time all good, second - bad. What could be the cause of this, and how can I fix it?


Do a Cmd + Opt + B to show all your breakpoints. Remove all breakpoints. Now clear your Simulator via iPhone Simulator -> Reset Content and Settings and give it another try.


Check your program log. It sounds like the app has crashed.

0

精彩评论

暂无评论...
验证码 换一张
取 消