in Education by
I had a hard time finding any useful information about the Rust debugging story on iOS/Android. I guess I can somehow use the same mechanism that allows remote debugging for C++, but I don't know where to start. My first attempt was to use Android Studio with the Rust plugin by JetBrains, but it seems they see this issue as expected behavior. My next take will be to try bypass UI and set breakpoints via lldb/gdb directly, but I see it as a crutch. How can I debug Rust code on Android/iOS? It will be excellent if I could do it with some UI. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
Say you've built and deployed a Rust library on Android following these steps. In order to debug via rust-gdb or graphically with CLion do the following: Stop gradle from stripping your Rust .so files of debug symbols by adding packagingOptions.doNotStrip "**/*.so" to app/build.gradle Push the gdbserver binary from Android NDK's prebuild directory to the device: ~/Android/Sdk/ndk-bundle/prebuilt/android-x86_64/gdbserver$ ~/Android/Sdk/platform-tools/adb push gdbserver /data/local/tmp ~/Android/Sdk/platform-tools/adb shell "chmod 777 /data/local/tmp/gdbserver" Restart adbd as root: ~/Android/Sdk/platform-tools/adb root Forward a port that you will use for gdbserver: ~/Android/Sdk/platform-tools/adb forward tcp:1337 tcp:1337 Attach gdbserver to the process you wish to debug: ~/Android/Sdk/platform-tools/adb shell generic_x86_64:/ # su generic_x86_64:/ # set enforce 0 generic_x86_64:/ # /data/local/tmp/gdbserver :1337 --attach $(ps -A | grep your.android.application.id | awk '{print $2}') Either run rust-gdb or set up CLion's "Remote GDB" configuration with: target remote tcp:localhost:1337

Related questions

0 votes
    Want to build a debug tool to monitor the app, pause execution when bad things occur. Dev can continue ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 8, 2022 in Education by JackTerrance
0 votes
    Want to build a debug tool to monitor the app, pause execution when bad things occur. Dev can continue ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jun 30, 2022 in Education by JackTerrance
0 votes
    I want to calculate browser height without considering browser address bar and bottom navigation bar height. The ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    I want to calculate browser height without considering browser address bar and bottom navigation bar height. The ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 24, 2022 in Education by JackTerrance
0 votes
    Compare and contrast Android and IOS operating systems in terms of a variety of functions such as Management ... particular situation Select the correct answer from above options...
asked Dec 23, 2021 in Education by JackTerrance
0 votes
    I'm working in an FFI library and have encountered this pattern quite a few times that I don't ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    I write a tool, It can get device id through the dll, and copy the id to clipboard. extern crate ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 2, 2022 in Education by JackTerrance
0 votes
    I have a web/ios react-native project. On web this works without any issue, but on iOS I am getting an error ... user progress: writing string of >>${JSON.stringify(user.progress)}...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    So, I started learning to code in Python and later Django. The first time it was hard looking at tracebacks and ... your Django code? Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    How do we debug a script? (a) Use of JavaScript Validator (b) Use of JavaScript Debugger (c) Use ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 21, 2021 in Education by JackTerrance
0 votes
    Auto-configuration report can be logged to the console by enabling debug mode while starting the application. A. True B. False...
asked Nov 8, 2022 in Education by JackTerrance
0 votes
    I would like to debug a system framework running on an Android device. In particular, GpsLocationProvider sometimes ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 22, 2022 in Education by JackTerrance
0 votes
    I'm making a new Android project, with the standard 'app' module, as well as a library project ( ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I am having the following problem: I have an Enum that was originally declared with 5 elements. public enum ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 26, 2022 in Education by JackTerrance
0 votes
    Without changing anything in the view controller or updating to a new Xcode Version, displaying a UIAlertController ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 20, 2022 in Education by JackTerrance
...