Is there a comprehensive working set up for debugging Android?

Hi All,

I love Cocos2d-x. I seriously do. However, I have spent a ridiculous amount of hours trying to figure out how to debug C++ code on an Android device. Using sys out/println/CCLOG is not a viable option when a project gets to the size when a build takes 4+ minutes to compile.

I’ve looked through and tried dozens of answers on Stack Overflow (using Nvidia tools, trying on Windows with Visual Studio, etc) and nothing works.

What I need to be able to do is run my app on an Android device or in the simulator, be able to create break points and inspect variables/stack etc. I find it laughable that this ‘simple’ most basic requirement of software development is so damned hard with the Android/Cocos2d-x stack.

I don’t care what I use or what I need to set up to get this working, but I’m seriously looking to using Unity now due to this roadblock in software development. Does anyone have a working debugging-enabled setup with Cocos2d-x and Android? Windows/Mac/Linux, I don’t care. Eclipse/Android Studio/Visual Studio/vi I don’t care. I just need to get this working.

Thank you in advance for any help.

-K

PS: Running in Xcode and using its debugging tools is not an option: I need to be able to debug functionality (i.e.: SDKBox iAP) that is very different between the two platforms.

1 Like

I’m wondering this as well. I’ve started with using Xcode as you describe. Right now I can’t even get the sample code to build with Eclipse so…

Have you tried ndk-gdb-eclipse? There’s some information here but it’s a bit old: https://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-cc-debugging/

I am trying to figure this out too. But there seems to be no really good solution. VS 2015 supports IOs and Android devolepment but I haven’t figured out yet how to get it working with cocos2d-x. The funny thing is, Microsoft brags that they partnered with Chukong Technologies and Visual Studio will support cocos2d… http://blogs.msdn.com/b/somasegar/archive/2015/04/17/visual-studio-for-game-development-new-partnerships-with-unity-unreal-engine-and-cocos2d.aspx but you can’t find any useful information on the web. If you ask, you get simply no answer…

I have tried it, but I’m really reluctant to continue developing with anything Eclipse, as Google has stated that Android Studio is what they’re moving forward with. I still wasn’t able to get it to work satisfactorily.

I tried Android Studio but found it laughable because you can’t even edit the code in the Classes folder without monkeying around, and it seems that any information on NDK development with Android Studio is well and truly buried.