jdb
in PATH (from the JDK)adb
in PATH (from android debug tools)
for launching vscode lldb session:
code
in PATHvscode-lldb
extension
-
Copy
lldb-server
from the android NDK to the /data/local/tmp folder usingadb push <PATH> /data/local/tmp
-
Call
set_device_id <ID>
once with the output fromadb devices
.
This stores the ID in current working dir .android_debug folder. So run the other scripts from this same folder
Run the first time from a new working directory to set the device ID to debug on. Use the output from adb devices
Launches the package/activity in debug mode while waiting for the java debugger to attach
Attached the java debugger and signals the previously launched process to continue
Launches the package/activity without debugging and streams logcat output to console and logcat.log
file in the current working directory
Launches the package/activity in debug mode and attaches the vscode debugger from the vscode-lldb
extension. Does not require manual use of launch_jdb_continue
Receive process log output in stdout and the logcat.log
file in the current working directory
You can run:
launch_code_debug <PACKAGE_NAME> <ACTIVITY_NAME>
to directly launch a vscode debug session, assuming you have the vscode-lldb extension installed
Additionally this automatically runs:
logcat
which streams the current process log messages to stdout and to logcat.log
in the current working directory
- Make sure the app has
android:debuggable="true"
on the application tag inAndroidManifest.xml
- Make sure the app has the
android.permission.INTERNET
permission inAndroidManifest.xml