【发布时间】:2011-08-29 16:16:46
【问题描述】:
当我在我的项目中设置断点并单击“评估所有操作后继续”复选框时,Xcode 不会继续。不仅如此,执行还经常出现挂起。不管我在断点上是否真的有任何动作,这都是真的。
我的非自动继续断点工作正常。
我尝试了一个全新的项目,但问题仍然存在。所以它必须与我的计算机或 Xcode 中的设置有关。我正在使用 Snow Leopard 和 Xcode 4.0.2。
怎么回事?
编辑:代码和控制台日志。
代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
[self.window makeKeyAndVisible];
int x = 5;
printf("%d", x); // breakpoint here with autocontinue checked and no action
x+=2;
printf("%d", x);
return YES;
}
控制台日志:
This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 87901.
Pending breakpoint 1 - ""AutocontinueTestAppDelegate.m":21" resolved
Current language: auto; currently objective-c
57
有趣的是,即使优化设置为无,两个 printf 语句都会触发。
【问题讨论】:
-
您的标题和描述似乎不一致。问题是“Xcode [is] 在自动继续断点处停止”还是“Xcode 没有停止”?如果是前者,我也有同样的问题,希望你能得到一个好的答案!
-
Xcode 4.1 中会出现这种情况吗?
-
我实际上认为@deanWombourne 可能是对的:可能是一个错误。这是我刚刚做的一个测试:1)在按钮操作的某处设置断点 2)编辑并设置播放声音+自动继续 3)运行应用程序:当我在模拟器中点击按钮时应用程序暂停。 4) 将断点向下拖动一行:应用程序继续,模拟器来到前台,随后的点击播放声音而不暂停。
标签: iphone ios xcode debugging breakpoints