You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/workflow/debugging/mono/android-debugging.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,25 +57,27 @@ Since you're debugging an optimized release build, it is likely the debugger wil
57
57
58
58
## Native debugging using a local debug build of Mono
59
59
60
-
Build the runtime for your android architecture: `ANDROID_NDK_ROOT=<path_to_android_ndk> ./build.sh --os android --arch x86 -c Debug`. See the instructions for [Testing Android](../../testing/libraries/testing-android.md) for details.
60
+
Ensure the prerequisites are met for [Testing Android](../../testing/libraries/testing-android.md#prerequisites).
61
61
62
+
Build the runtime for your android architecture `<ANDROID_ARCH>` and keep debug symbols in the binary:
62
63
63
-
In the source code for the C# project, add the following to the .csproj (replacing `<RUNTIME_GIT_ROOT>` by the appropriate location):
In the source code for the C# project, add the following to the .csproj (replacing `<RUNTIME_GIT_ROOT>` by the appropriate location and `<ANDROID_ARCH>` with the built android architecture):
Then rebuild and reinstall the project, open the apk in Android Studio, and debug. The
76
-
runtime native libraries will be stripped, so to make use of debug symbols, you
77
-
will need to follow the steps above (rename `*.so.dbg` in the artifacts to
78
-
`*.so.so` and add them to the APK project in Android Studio)
78
+
Then rebuild and reinstall the project, open the apk in Android Studio (File > Profile or Debug APK), and debug.
79
+
80
+
Note: If debugging in Android Studio stops at signals `SIGPWR` and `SIGXCPU` during startup, configure LLDB to not stop the process for those signals via `process handle -p true -s false -n true SIGPWR` and `process handle -p true -s false -n true SIGXCPU` in Android Studio's LLDB tab.
79
81
80
82
## Native and managed debugging or debugging the managed debugger
0 commit comments