Tim*_*ass 11 java windows debugging jdb android-emulator
我一直试图将jdb连接到android模拟器一段时间,并且已经反复遇到:
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 64bit上运行.
Tim*_*ass 14
目前这对我有用 - 制作套接字而不是共享内存连接.
> jdb -sourcepath.\ src -connect com.sun.jdi.SocketAttach:hostname = localhost,port = 8700
在此之前,您需要进行一些设置 - 例如,请参阅有关设置非日食调试器的这组有用详细信息.它包含一个设置初始断点的好建议 - 在主目录中创建或编辑jdb.ini文件,内容如下:
stop at com.mine.of.package.some.AClassIn:14
并且它们将被加载并推迟到连接之前.
编辑:忘了参考Herong Yang的页面.