codelldb
codelldb copied to clipboard
Source map doesn't work when debugging Android from Windows host.
OS: Windows 10 Professional 1903 (18362.778) VSCode version: 1.14.1(system setup) Extension version: 1.5.0 Toolchain version: Build target: aarch64-unknown-linux-android
I'm set source-map like this:
"sourceMap": {
"/code": "E:\\workspace2.4\\video_sdk"
}
but got this:
settings show target.source-map
target.source-map (path-map) =
[0] "\code" -> "E:\workspace2.4\video_sdk"
on Android Studio is work:
(lldb) settings append target.source-map /code E:\workspace2.4\video_sdk
(lldb) settings show target.source-map
target.source-map (path-map) =
[0] "/code" -> "E:\workspace2.4\video_sdk"
Debug log
This is LLDB's built-in behavior on Windows. You'll get the same result if you use settings set target.source-map ...
Not sure how they avoid it in Android Studio.
I think you can still make it work, because LLDB will convert the remote path in a similar manner. Check in disassembly header, what LLDB thinks the remote path is. Probably something like "C:\code".