获取'shmemBase_attach失败:系统找不到指定的文件'尝试附加到小程序来调试 [英] Getting 'shmemBase_attach failed: The system cannot find the file specified' when trying to attach to applet to debug

查看:730
本文介绍了获取'shmemBase_attach失败:系统找不到指定的文件'尝试附加到小程序来调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用netbeans 6.1。



我在java运行时设置中有以下内容:



-agentlib:jdwp = transport = dt_shmem,address = jdbconn,server = y,suspend = n



在netbeans中附加对话框:



调试器:JPDA调试器



连接器:共享内存连接(由共享内存附加到其他虚拟机)



传输:dt_shmem



名称:jdbconn



我从 FaqDebuggingAppletRemotely 页面上的netbeans维基。



该小程序在一个aspx页面(小程序,whcih被签名,是一种通过客户端浏览器与传统平台进行通信的方法,我是C#开发人员)。我设法得到安全警告,显示哪个让我有机会附加到小程序,但是每当我尝试附加我看到:



附加到jdbconn



shmemBase_attach失败:系统找不到指定的文件



在netbeans的输出窗口中。



任何帮助感谢!

解决方案>

使用共享内存选项(transport = dt_shmem)进行调试时,您正在使用Windows内部共享内存对象在调试器和jvm之间进行通信。



这意味着如果你是:



a。不从与jvm相同的物理机调试,或者



b。不能在Windows操作系统上工作,



您无法在此模式下进行调试。



我不确定如果您在Linux站上的虚拟机上运行一个窗口会发生什么事情...可能会工作,可能不会。



如果上述两者均正常,则需要进行更深入的调查才能找出问题,但同时您可以使用普通套接字来附加。 / p>

在Java运行时参数中指定:



-Xdebug -Xrunjdwp:transport = dt_socket,server = y, address = 8000,suspend = y



这将告诉您的jvm以调试模式运行,加载jdwp库,等待连接在端口8000中附加,并挂起执行,直到这样的连接到达。



在IDE中,相应地设置远程调试器。我不知道Netbeans,但它会像Connector = socket连接器,address = 8000。
当您启动网页时,小程序将冻结加载,直到您连接,当然,直到达到聆听阶段,您无法连接。




I'm using netbeans 6.1.

I've got the following in my java run time settings:

-agentlib:jdwp=transport=dt_shmem,address=jdbconn,server=y,suspend=n

and the following in the attach dialog in netbeans:

Debugger: JPDA Debugger

Connector: Shared Memory Attach (Attaches by shared memory to other VMs)

Transport: dt_shmem

Name: jdbconn

I got the above settings from the FaqDebuggingAppletRemotely page on the netbeans Wiki.

The applet is in an aspx page (the applet, whcih is signed, is a method of communicating via the client browser to a legacy platform, I'm a C# developer really). I've managed to get the security warning to display which gives me a chance to attach to the applet but whenever I try to attach I see:

Attaching to jdbconn

shmemBase_attach failed: The system cannot find the file specified

in the output window in netbeans.

Any help gratefully received!

解决方案

When you debug with the shared memory option (transport=dt_shmem), you're using Windows internal shared memory objects to communicate between the debugger and the jvm.

This means that if you're:

a. Not debugging from the same physical machine as your jvm, or

b. Not working on a Windows OS,

You can not debug in this mode.

I'm not sure what would happen if you ran a Window on a VM on a Linux station...Might work and might not.

If both of the above are fine, it would require a deeper investigation to find out the problem, but in the mean time, you could attach with a plain socket.

In the Java run time parameters specify:

-Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend=y

This tells your jvm to run in debug mode, load the jdwp library, wait for connection to attach in port 8000, and suspend execution until such a connection arrives.

In your IDE set the remote debugger accordingly. I don't know Netbeans, but it would be something like Connector = socket connector, address=8000. When you start your web page, the applet will freeze loading until you connect, and of course you can't connect until it has reached the listening stage.

Good luck!

这篇关于获取'shmemBase_attach失败:系统找不到指定的文件'尝试附加到小程序来调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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