"无法连接到远程VM" JDB连接到Windows上的Andr​​oid模拟器 [英] "Failed to attach to the remote VM" connecting jdb to the android emulator on Windows

查看:908
本文介绍了"无法连接到远程VM" JDB连接到Windows上的Andr​​oid模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图JDB连接到Android模拟器了一小会儿,并已与多次会见:

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.io.IOException: shmemBase_attach failed: The system cannot find the file specified
        at com.sun.tools.jdi.SharedMemoryTransportService.attach0(Native Method)
        at com.sun.tools.jdi.SharedMemoryTransportService.attach(SharedMemoryTransportService.java:90)
        at com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingConnector.java:98)
        at com.sun.tools.jdi.SharedMemoryAttachingConnector.attach(SharedMemoryAttachingConnector.java:45)
        at com.sun.tools.example.debug.tty.VMConnection.attachTarget(VMConnection.java:358)
        at com.sun.tools.example.debug.tty.VMConnection.open(VMConnection.java:168)
        at com.sun.tools.example.debug.tty.Env.init(Env.java:64)
        at com.sun.tools.example.debug.tty.TTY.main(TTY.java:1010)

Fatal error:
Unable to attach to target VM.

没有那么大。是什么让这一轮的最好方法?我运行在Windows 7 64位。

Not so great. What's the best way of getting round this? I'm running on Windows 7 64bit.

推荐答案

目前这是为我工作 - 做一个插座,而不是共享内存连接

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

>加多宝-sourcepath的\\ src -connect com.sun.jdi.SocketAttach:主机名=本地主机,端口= 8700

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

在此之前你需要做一些设置 - 例如,看到这组<一个href=\"http://stackoverflow.com/questions/3913335/debugging-android-app-with-jdb-attach-or-jswat\">useful关于建立非Eclipse调试器细节。它包括一个很好的提示设置你的初始断点 - 创建或编辑你的主目录下的文件jdb.ini与内容,如:

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.

编辑:忘了参考和荣阳的页面

这篇关于&QUOT;无法连接到远程VM&QUOT; JDB连接到Windows上的Andr​​oid模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆