We want to support debugging Swift application code running on Android using the existing developer experience in VS Code (F5 debug). LLDB's support for remote debugging is limited and platform-specific, so a better approach is to use Debug Server 2 aka DS2. The project was started at Meta and supported debugging Android, but may be a bit dusty at this point.
The end-to-end debugging setup would look like this:
VS Code starts debugging using a debug adapter provider
The debug adapter provider launches/talks to a local Android Debug Bridge (ADB) process to enumerate available Android devices and emulators, allowing the user to choose which one to use.
The debug adapter provider uses ADB to deploy and launch DS2 as needed on the selected Android device
The debug adapter starts lldb-dap.exe with command line parameters to connect it to the DS2 instance running on the Android device
lldb-dap.exe tells DS2 to start the target process to debug
The debugging chain is established: VSCode <-> lldb-dap.exe <--(ADB+TCP) --> DS2 <-> Process.exe
We want to support debugging Swift application code running on Android using the existing developer experience in VS Code (F5 debug). LLDB's support for remote debugging is limited and platform-specific, so a better approach is to use Debug Server 2 aka DS2. The project was started at Meta and supported debugging Android, but may be a bit dusty at this point.
The end-to-end debugging setup would look like this:
lldb-dap.exe
with command line parameters to connect it to the DS2 instance running on the Android devicelldb-dap.exe
tells DS2 to start the target process to debugPreliminary tasks, to be filed on https://github.com/compnerd/ds2: