How to debug CocosSharp

I ran into this strange behavior with Android and my Cocossharp project. I have a class that inherits from CCNode. In the AddToScene() I'm adding a background image, labels and buttons. In iOS everything works fine. However, in Android, the app hangs and from what I can tell, there's no reason for it. No exception being thrown.

For example, the following causes the app to hang.

var background = new CCSprite("questionbackground.png");

The image is in the same folder as all the other images that work fine. If I tell it to load a very small image (12.3 KB), it works. The image I'm trying is only 53.2 KB. For a test I reduced the size of the image to 19.2 KB but still no success.

I also see a similar behavior with a CCLabel and the font.

questionLabel = new CCLabel(questionInfo.Question, "MAGNETOB.TTF", 30);

This eventually works but does hang for a while sometimes. The same line of code is in other parts of the game and it returns immediately.

Since I can't seem to find a solution, I'd like to debug the libs. I downloaded the source from Github, built CocosSharp.Android.sln and the PCL solution and added those assemblies in the debug folder to my project but I can't step into any of the calls.

Sign In or Register to comment.