如何开启 Cocos2D CCLOG Debug 模式?

How to turn on Cocos2D CCLOG Debug mode?(如何开启 Cocos2D CCLOG Debug 模式?)

本文介绍了如何开启 Cocos2D CCLOG Debug 模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在网络上,我看到人们发布这样的内容:

Around the web I see people posting things like this:

2012-03-12 10:26:32.495 squirrels[330:707] cocos2d: OS version: 5.1 (0x05010000)
2012-03-12 10:26:32.498 squirrels[330:707] cocos2d: GL_VENDOR:   Imagination Technologies
2012-03-12 10:26:32.501 squirrels[330:707] cocos2d: GL_RENDERER: PowerVR SGX 543
2012-03-12 10:26:32.503 squirrels[330:707] cocos2d: GL_VERSION:  OpenGL ES 2.0 IMGSGX543-63.24
2012-03-12 10:26:32.505 squirrels[330:707] cocos2d: GL_MAX_TEXTURE_SIZE: 4096
2012-03-12 10:26:32.507 squirrels[330:707] cocos2d: GL_MAX_TEXTURE_UNITS: 8
2012-03-12 10:26:32.508 squirrels[330:707] cocos2d: GL_MAX_SAMPLES: 4
2012-03-12 10:26:32.510 squirrels[330:707] cocos2d: GL supports PVRTC: YES
2012-03-12 10:26:32.511 squirrels[330:707] cocos2d: GL supports BGRA8888 textures: YES
2012-03-12 10:26:32.513 squirrels[330:707] cocos2d: GL supports NPOT textures: YES
2012-03-12 10:26:32.515 squirrels[330:707] cocos2d: GL supports discard_framebuffer: YES
2012-03-12 10:26:32.516 squirrels[330:707] cocos2d: compiled with Profiling Support: NO
2012-03-12 10:26:32.519 squirrels[330:707] cocos2d: cocos2d v2.0.0-beta2
2012-03-12 10:26:32.522 squirrels[330:707] cocos2d: Using Director Type:CCDirectorDisplayLink

但是,当我在调试模式下运行我的应用程序时,我没有得到这样的日志.有没有办法使用 Cocos2D 2.0 打开它?如果有,怎么做?

However I do not get logs like this when I run my app in debug mode. Is there a way to turn this on using Cocos2D 2.0? And if so, how?

谢谢!

推荐答案

将此语句添加到您的 PCH 文件中:

Add this statement to your PCH file:

#define COCOS2D_DEBUG 1

这应该设置首选项以打开它.

That should set the preference to turn it on.

这篇关于如何开启 Cocos2D CCLOG Debug 模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:如何开启 Cocos2D CCLOG Debug 模式?