Trying using adb with jdb to debug my very first app on android.
I edit code in vim, compile by "ant debug" and install by "adb install ...".
Then I enable debugging for my app and choose "wait for debugger", then I run app - and it is waiting, so far so good.
Now I have to create forwarding rule, ok, "adb -d forward tcp:8700 jdwp:XXXX" and "jdb -sourcepath src/ -attach localhost:8700".
This "XXXX" is a pid which "adb jdwp" prints while my app is waiting or running. What is the problem here is that "adb jdwp" prints one number (I have just a single app with enabled debug, at all) and it does not exit - so I cannot really script it like:
adb -d forward tcp:8700 jdwp:$(adb jdwp) ; jdb -sourcepath src/ -attach localhost:8700
Any idea why is this happening? Android studio is not running, Eclipse is not installed, Fedora 20, x86_64; Motorola Moto G 1st gen, stock Lollipop firmware. Thanks!
I edit code in vim, compile by "ant debug" and install by "adb install ...".
Then I enable debugging for my app and choose "wait for debugger", then I run app - and it is waiting, so far so good.
Now I have to create forwarding rule, ok, "adb -d forward tcp:8700 jdwp:XXXX" and "jdb -sourcepath src/ -attach localhost:8700".
This "XXXX" is a pid which "adb jdwp" prints while my app is waiting or running. What is the problem here is that "adb jdwp" prints one number (I have just a single app with enabled debug, at all) and it does not exit - so I cannot really script it like:
adb -d forward tcp:8700 jdwp:$(adb jdwp) ; jdb -sourcepath src/ -attach localhost:8700
Any idea why is this happening? Android studio is not running, Eclipse is not installed, Fedora 20, x86_64; Motorola Moto G 1st gen, stock Lollipop firmware. Thanks!
Aucun commentaire:
Enregistrer un commentaire