1 the way to output the log, of course, is cc.log 2 How to view the log?
A) If the applet can run on the browser first, for example with chrome, the output log can be seen in the console;
b) If you are debugging on a real machine, you need to use the log tool. Use Logcat on Android.
3 Android Debugging using Logcat method
Logcat Location: Android SDK Directory in D:\AndroidDevelopTools\sdk\platform-tools
To view the steps:
- Connect your phone
- CMD mode open Logcat:adb.exe Logcat
- This can see the log of the Cocos program, but in addition to the Cocos log, there are a variety of system program logs.
Logcat specific command line parameters, you can see the online description, you can also see Logcat own Help
I'm a bit clumsy, and I can't find the correct usage of filter. So, I was too lazy to toss, instead of using the CMD filter. Find "Cocos2d-x Debug Info"
Final command to enable Logcat:
Adb.exe logcat | find "cocos2d-x Debug Info"