Android debugging help

Hey there, my project was working correctly on Android but now it crashes on launch. I tweaked a few settings (removed Google Play ID and disabled level streaming) and now the game minimizes every time I open it (on Android). Anyway, I wanted to debug this using C++ (VS2015) but cannot for the life of me figure out how. Why is there no documentation or guides / hints on how to do this? I saw in the 4.16 patch notes it says:

“New: Added functionality to use the visual studio mobile projects for debugging. To generate them run “generateprojectfiles.bat -vsdebugandroid” from a command prompt”.

I don’t have that BAT file, do I need to compile from source? What are the steps to debugging with VS2015? Any hints or pointers in the right direction would be great, because I have no idea how to develop for a platform I can’t debug.

Hi,

If you have android studio, setup the device using android studio and there is a feature called logcat. This shows a bunch of messages from android app. Once your device is setup in Android Studio, start the app and look for messages in Android Studio’s logcat. This will start you off with debugging android app.

Also there are android’s console commands like adb and android, which are a bit harder than AndroidStudio.

Thanks

I had to reinstall VS 2015 and add “common tools” to the install. I also reinstalled Android Studio and my problem has been resolved.

I had to reinstall VS 2015 and add “common tools” to the install. I also reinstalled Android Studio and my problem has been resolved.

Hi PantherNZ, do you mind sharing how you got this to work? I likewise ran the -vsdebugandroid command and followed the instructions in the 4.16 release notes as well.

It said:

“Added functionality to use the visual
studio mobile projects for debugging.
To generate them run
“generateprojectfiles.bat
-vsdebugandroid” from a command prompt. After you have packaged your
game for Development and put it on the
device, you can set this new project
as the start up project and run/debug
the project in Visual Studio.”

However, when I attach the device and try to launch the debugger, I get the below error after building completes. “Unable to start program ‘C:/xxx/yyy/zzz/MyProject.so’ The system cannot find the file specified.”

I feel like I’m very close but could use some guidance getting past the last challenge. If you have any insight as to what I may be doing wrong, please let me know? Thank you tons.