Skip to content

Instantly share code, notes, and snippets.

@yenliangl
Created August 31, 2010 16:00
Show Gist options
  • Save yenliangl/559257 to your computer and use it in GitHub Desktop.
Save yenliangl/559257 to your computer and use it in GitHub Desktop.
Use jdb to debug Android application
# Use jdb to debug Android application
# Run ddms and select application to forward port.
ddms
# Execute jdb and attach to the listening application
jdb -attach localhost:8700
# Or in windows, need to specify connector explicitly
jdb -connect com.sun.jdi.SocketAttach:hostname=localhost,port=8700
@therustmonk
Copy link

jdb can conflicts with ddms. To forward adb also can be used:

adb -d forward tcp:8700 jdwp:$(adb jdwp | tail -1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment