Where is RustRover Topic? I cannot remotely debug android app with RustRover LLDB Fails to Attach - No Stop Reply Packet Received
Hello!
When attempting to attach RustRover’s LLDB debugger to an Android process over a remote connection, the debugger disconnects immediately after connecting. LLDB reports that a process exists, but never receives the initial stop‑reply packet.
Process 1 was reported after connecting to 'connect://localhost:5039', but no stop reply packet was received
Debugger detached
#!/usr/bin/env bash
export APP=com.example.app
export ABI=i386
function start_adb() {
adb push "$HOME/Android/Sdk/ndk/28.2.13676358/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/19/lib/linux/$ABI"* /data/local/tmp/tools
adb shell "run-as ${APP} cp /data/local/tmp/lldb-server /data/data/${APP}/lldb-server"
adb forward tcp:5039 tcp:5039
adb shell "run-as ${APP} /data/data/${APP}/lldb-server platform --listen *:5039 --server"
}
start_adb
The following VS Code LLDB configuration successfully attaches to the same target:
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Android (LLDB)",
"type": "lldb",
"request": "attach",
"initCommands": [
"settings append target.exec-search-paths /AndroidStudioProjects/myapp/app/src/main/rust/Cargo.toml_83d54/i686-linux-android/debug/",
"platform select remote-android",
"platform connect connect://:5039",
],
"pid": 27072,
}
]
}
请先登录再写评论。
The RustRover topic or discussion for this issue is generally found in the JetBrains RustRover community channels—mainly their official issue tracker, support forum, or YouTrack. Problems like “LLDB fails to attach – No stop reply packet received” during remote debugging (especially with Android apps) are commonly reported there, since LLDB can struggle with attaching to remote processes due to misconfigured debug servers, incompatible NDK versions, or po
transunioncredit login
Hello Antqazw and Rita568mark
Here's a useful article that helps set up a remotely debuggable Android app with RustRover LLDB: SUPPORT-A-3988 How to remote-debug Android native code with RustRover (lldb-server gdbserver mode)
I hope this helps!
Hello Monica! Thank you for help
I followed the instructions
RustRover connects but, I cannot even set breakpoints in manual mode
here is /gdb-server.log for Android Studio and RustRover
https://github.com/antqazw/issue/tree/main
But I can do it in Android Studio (arm64, real device)
"APP_BIN="/data/data/$APP_ID/lldb-server"; adb run-as $APP_ID $ gdbserver *:$5090 --attach $SELECTED_PID"Hi Antqazw
I reviewed the info you shared, recreated the example in my environment, and I was able to hit the breakpoints.
It requires the configuration to match between the device and RustRover. So, I'm preparing an article that describes this case with a full example you will be able to follow step by step. I'll share the link here as soon as it's ready.
Please stay tuned for the next update of this post.
Hello Antqazw
Please find all the necessary configurations to set custom breakpoints in the [Guide]: Setup Remote-debugging Android native code with RustRover + lldb-server (gdbserver mode).
Thank you
I've prepared test project https://github.com/antqazw/issue/blob/master/app/src/main/cpp/CMakeLists.txt
Still could not debug it, after your instructions
Hi Antqazw
I set up and troubleshoot your project and found that the root cause of the problem is the binary file you are pointing to. Below is a more detailed explanation:
I verified that
libdummy.sois loaded in the process (the LLDB image list confirms this), but the finallibdummy.sothat CMake/Corrosion produced does not contain:JNI_OnLoad,Java_…), andlib.rs(or any.rsat all).Without any Rust source paths or function symbols in that
.so, LLDB has nothing it can tie yourlib.rsbreakpoints to. This is something you need to fix in your project, not a RustRover issue. Even Android Studio’s native debugger wouldn’t be able to stop on Rust source lines for this exactlibdummy.so, because there’s simply no Rust debug info to use.Just to confirm, could you please run the next in a terminal window when debug is attached and running and share the output:
libissue.so not libdummy.so (it is for linking purpose)
Update:
Somehow RustRover fails to find the correct address
Finally get it working in RustRover by manually setting correct address
Run this script in lldb prompt:
It will output:
Then use
l_addr="0x76e4814000"in following command, after -s:If I start RustRover with
$HOME/.lldbinitcontaininglog enable gdb-remote packetslldb prompt shows:But somehow RustRover fails to get and set appropriate address
Hi Antqazw
Thanks a lot for the project and extra details.
I was able to reproduce your setup with
libissue.soand confirm that RustRover + LLDB can see the correct module and symbols (includingJava_com_example_rustroverdebugissue_MainActivity_stringFromJNI), and that the remote attachment itself works. However, every attempt to insert a breakpoint into the Android process vialldb-server gdbserverfails witherror: 9 sending the breakpoint request, so no breakpoints actually resolve or hit even though the symbols and DWARF are present.This looks like a limitation/bug in the current
lldb-server gdbserverflow for this device combination. I’ve filed a new ticket with all the details for the debugger team to investigate support for this scenario. For now, the best workaround is to keep using your existing VS Code/Android Studio configuration for native debugging on this device, and we’ll follow up once we have guidance or fixes on the LLDB remote-debugging side.So, please subscribe to the ticket IJPL-246166 for further updates and upvote so we can see the real number of affected users.