cocos2d-x 在simulator中运行闪退显示thread 1:breakpoint 1.1的解决方法

今天被这个问题困扰了很久很久(如图),用ios模拟器运行程序会闪退,但是用ipad做真机测试毫无问题,退出重启Xcode也无法解决问题。


在网上检索了很久相关信息,由于addChild方法确实可能会产生各种问题(内存不足导致crash之类的),以为是addChild方法存在的bug造成的(解决之后才知道一点关系都没有)。

后来在这里(http://www.raywenderlich.com/forums/viewtopic.php?f=5&t=2970)找到了解决方法:

Re: Chapter 2: Already stucked with sneakyJoystick
Postby dogwolf » Fri Jan 04, 2013 5:21 pm

I have come to understand what the problem was, I'm such a noob that I didn't realize I'd put a breakpoint at one of my CCLOG lines. I never really understood what those blue arrows meant but today when working on an other project I had the same problem, allthough this time it was easier to see what the "problem" was. So, to anyone having this problem, rightclick on the blue arrow on the left side of the code and select "Delete Breakpoint". I do believe you can also disable all the breakpoints by pressing the button next to where you choose what device to run your project from, conviniently named "Breakpoints".

Xcode竟然在我不知情的情况下私自在scene->addChild(layer);这句代码所在行添加了breakpoint(使程序执行到这一句自动break结束掉,一般是测试中会使用的)。。。。。

解决步骤如下:

在该行最左侧的蓝色矩形区域右键,选择delete breakpoint即可。

cocos2d-x 在simulator中运行闪退显示thread 1:breakpoint 1.1的解决方法_第1张图片

你可能感兴趣的:(ios,cocos2d-x)