-
-
Notifications
You must be signed in to change notification settings - Fork 8
Android
Bobby Galli edited this page Feb 22, 2025
·
2 revisions
This guide will help you attach the debugger in Android studio to the C++ code in bugsplatunitylib-release.aar.
- Clone and build the debug version of this project using Android Studio. Be sure to checkout the debug-info branch before building
- Copy
bugsplatunitylib-debug.aar
tomy-unreal-crasher/Plugins/BugSplat/Source/ThirdParty/Android
. - Replace
bugsplatunitylib-release.aar
withbugsplatunitylib-debug.aar
inBugsplat_Android_UPL.xml
- Trigger a full rebuild/package of Android in Unreal.
- Open the Unreal Android project in Android Studio
- 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 replaceCRASHPAD_WRAPPER_PROJECT_DIR
with the full path on your system. - Repeat step 6 with the other 2 ABI folders next to
arm64-v8a
- Set the Debugger Debug Type to Native Only
- Open the file
crashpad-wrapper-lib-android/bugsplatunitylib/src/main/cpp/native-lib.cpp
in Android Studio and set a breakpoint inJava_com_ninevastudios_bugsplatunitylib_BugSplatBridge_jniInitBugSplat
- Run the app connected to the debugger, step through the entire function, and let me know what it returns.
You can't step into the crashpad_handler process if the app is launched by the debugger. This used to work as the debugger could jump across forked processes, but that doesn't seem to be the case anymore. To debug a forked process the Android docs mention you need to either use an emulator or a rooted device.