Debugging on Android

How do people around here debug OF apps? I have worked with NDK-based apps in the past using GBD as the remote debugging tool on Eclipse and it’s a bit messy and underdeveloped for complex applications. Printf debugging is not an option either. I though of developing them on a desktop OS then testing them on the mobile but there’s still bound to be problems.

Any suggestions?

I do exactly what you described. Develop on desktop and then drag the source files into to the eclipse project and test on the device. Very rarely found any issues.
Also, at least with my setup, eclipse takes ages every time it builds an android OF project, so i wouldn’t want to debug/develop with it all the time anyway…

in linux and osx you can also setup a target to compile for the desktop and run from the same eclipse. in the project properties under c/c++ build. press manage configurations… add a new target, called for example desktop copying from debug or release and then select that target and in behaviour remove the TARGET_OS=ANDROID flag

then you can select to compile for android or desktop from the hammer button drop down. to run just add a new configuration as c/c++ application and select the correct binary

1 Like

also you can use the debug as native tool in eclipse to debug an OF app while it runs in the device but it’s kind of buggy

Debug as native never seemed to work for any of my projects, and there’s no real setup test case for it to be found anywhere.