Skip to content

Android

Bobby Galli edited this page Nov 21, 2024 · 1 revision

Android Debugging

This guide will help you attach the debugger in Android studio to the C++ code in bugsplatunitylib-release.aar.

  1. Clone and build the debug version of this project using Android Studio. Be sure to checkout the debug-info branch before building ​
  2. Copy bugsplatunitylib-debug.aar to my-unreal-crasher/Plugins/BugSplat/Source/ThirdParty/Android. ​
  3. Replace bugsplatunitylib-release.aar with bugsplatunitylib-debug.aar in Bugsplat_Android_UPL.xml
  4. Trigger a full rebuild/package of Android in Unreal. ​
  5. Open the Unreal Android project in Android Studio ​
  6. Add CRASHPAD_WRAPPER_PROJECT_DIR/crashpad-wrapper-lib-android/bugsplatunitylib/build/intermediates/merged_native_libs/debug/out/lib/arm64-v8a in Edit Configuration > Debugger > Symbols, being sure to replace CRASHPAD_WRAPPER_PROJECT_DIR with the full path on your system. ​
  7. Repeat step 6 with the other 2 ABI folders next to arm64-v8a
  8. Set the Debugger Debug Type to Native Only
  9. Open the file crashpad-wrapper-lib-android/bugsplatunitylib/src/main/cpp/native-lib.cpp in Android Studio and set a breakpoint in Java_com_ninevastudios_bugsplatunitylib_BugSplatBridge_jniInitBugSplat
  10. Run the app connected to the debugger, step through the entire function, and let me know what it returns.
Clone this wiki locally