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即可。


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值