android-dev-ext icon indicating copy to clipboard operation
android-dev-ext copied to clipboard

breakpoints don't work on jni layer

Open Soroorsh opened this issue 6 years ago • 4 comments

hi, I follow the instructions and I can debug my android studio app in the VS code. But I need to debug my .cpp files that they are in the jni layer. Can anybody help me?

Soroorsh avatar Aug 07 '18 15:08 Soroorsh

I think this requires going through ndk-gdb and I am not sure it is supported by this extension?

gtino avatar Dec 13 '18 18:12 gtino

After find many places, I found that this extension is the closest one that I can have. So please support adb-gdb or gdb for remote. or maybe connecting to cpp extension for only a wrapper for android processing connection.

gggin avatar Apr 08 '19 09:04 gggin

Hi, thank you for your response New version of android support debugging on jni layer ;)

Soroorsh avatar Apr 08 '19 09:04 Soroorsh

I appreciate your feedback and agree that it would be a nice feature, but adding native debugging is a huge task, equivalent to writing another debugger extension.

At the moment, the Android debugger extension works by providing an interface to JDWP running on the device - this is a high-level debug protocol that automatically handles a lot of internal functionality (setting breakpoints, stepping, etc). Native debugging is completely different. Android Studio uses a separate utility (lldb-server) to provide JNI debugging and using it requires additional components to be built directly into your app.

This is a completely open-source project and I'm happy to merge in a proposed PR with the new functionality, but unfortunately I don't have the spare time to research and implement this myself.

adelphes avatar Apr 14 '19 15:04 adelphes