“无法附加到远程VM”将jdb连接到Windows上的android仿真器

我一直在尝试将jdb连接到android仿真器一段时间,并反复遇到以下问题:

jdb -sourcepath ./src -attach本地主机:8700

java.io.IOException:shmemBase_attach失败:系统找不到指定的文件

在com.sun.tools.jdi.SharedMemoryTransportService.attach0(本机方法)上

在com.sun.tools.jdi.SharedMemoryTransportService.attach(SharedMemoryTransportService.java:90)

在com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingConnector.java:98)

在com.sun.tools.jdi.SharedMemoryAttachingConnector.attach(SharedMemoryAttachingConnector.java:45)

在com.sun.tools.example.debug.tty.VMConnection.attachTarget(VMConnection.java:358)

在com.sun.tools.example.debug.tty.VMConnection.open(VMConnection.java:168)

在com.sun.tools.example.debug.tty.Env.init(Env.java:64)

在com.sun.tools.example.debug.tty.TTY.main(TTY.java:1010)

致命错误:

无法连接到目标虚拟机。

不太好。解决这个问题的最佳方法是什么?我在Windows 7 64bit上运行。

回答:

目前,这对我来说是有效的-建立套接字而不是共享内存连接。

jdb –sourcepath。\ src -connect com.sun.jdi.SocketAttach:hostname =

localhost,port = 8700

事先需要进行一些设置-

例如,有关设置非蚀调试器的信息,请参见这套有用的详细信息。它包括设置初始断点的好技巧-在主目录中创建或编辑jdb.ini文件,其内容如下:

停在com.mine.of.package.some.AClassIn:14

他们将被加载并推迟到连接。

编辑:忘记了参考Herong Yang的页面。

以上是 “无法附加到远程VM”将jdb连接到Windows上的android仿真器 的全部内容, 来源链接: utcz.com/qa/433247.html

回到顶部