“Failed to attach to the remote VM” connecting jdb to the android emulator on Windows

后端 未结 4 1747
粉色の甜心
粉色の甜心 2020-12-29 10:26

I’ve been trying to connect jdb to the android emulator for a little while, and have been met repeatedly with:

jdb -sourcepath ./src -attach localhost:8700

java.         


        
4条回答
  •  暖寄归人
    2020-12-29 10:46

    Currently this is working for me -- making a socket rather than a shared memory connection.

    >jdb –sourcepath .\src -connect com.sun.jdi.SocketAttach:hostname=localhost,port=8700

    Beforehand you need to do some setup -- for example, see this set of useful details on setting up a non-eclipse debugger. It includes a good tip for setting your initial breakpoint -- create or edit a jdb.ini file in your home directory, with content like:

    stop at com.mine.of.package.some.AClassIn:14

    and they'll get loaded and deferred until connection.

    edit: forgot to reference Herong Yang's page.

提交回复
热议问题