Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing Debug Symbols? #12

Open
drandall-microsoft opened this issue May 3, 2024 · 4 comments
Open

Missing Debug Symbols? #12

drandall-microsoft opened this issue May 3, 2024 · 4 comments

Comments

@drandall-microsoft
Copy link

I've been trying to debug a native-activity sample project. As far as I can tell, the debugger attaches, but I can't hit any breakpoints. Here is a copy of my launch configuration

    {
        "name" : "Android Launch",
        "type": "android-debug",
        "request": "launch",
        "target": "last-selected",
        "mode" : "native",
        "apkPath": "${workspaceFolder}/Minimalist/build/outputs/apk/debug/Minimalist-debug.apk",
        "launchActivity": "android.app.NativeActivity",
        "native" : {
            "symbolSearchPaths": [
                "${workspaceFolder}/Minimalist/build/outputs/native-debug-symbols/debug/x86_64/",
            ],
        }

The symbolSearchPath example lists "${workspaceFolder}/app/build/intermediates/cmake/debug/obj/${command:abi}/ but my intermediates folder doesn't contain a cmake folder. My outputs/native-debug-symbols/debug just contains a native-debug-symbols.zip. I tried unzipping that, which provided the ABI folders, and I just hard coded it to x86_64. The only file in that folder is libMinimalist.so.dbg which I don't know if that is supported.

Here is my Debug Console Log

Launching the app activity com.durandal.Minimalist/android.app.NativeActivity
Getting pid for the launched app
Attaching to process 16129 (com.durandal.Minimalist)
Starting Native debugger
Attached to process 16129
Resuming process by attaching Java debugger

And in the LogCat I can see that a debugger has connected

05-03 09:41:58.001 16129 16129 I System.out: Debugger has connected
05-03 09:41:59.413 16129 16129 I System.out: debugger has settled (1452)

Let me know what other information

@nisargjhaveri
Copy link
Owner

Are you using gcc to compile the native code for the app? This extension currently use lldb debugger, not sure how well it works with debug symbols in other formats.

@drandall-microsoft
Copy link
Author

Looks like it's using Clang++ in toolchains/llvm

@nisargjhaveri
Copy link
Owner

Did a quick search, and seems like lldb should support .so.dbg files as well. Need to debug further on why lldb is not resolving the symbols file.

You can enable lldb logs to see what lldb is doing, in case that can give any hints.

@drandall-microsoft
Copy link
Author

Apologies for the slow response. I'm not sure how to enable the lldb logs (I found this(https://github.com/vadimcn/codelldb/wiki/LLDB-Logging), but didn't see an obvious way to add it to the task). I have put up a minimal-ish repo with my setup (and .vs files in the readme) here: https://github.com/dstbstr/HelloAndroid/tree/main

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants