How about

#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0)
CCTextureCache::sharedTextureCache()->dumpCachedTextureInfo();
#endif