我如何远程调试我的rcp应用程序? [英] How can I remote debug my rcp application?

查看:159
本文介绍了我如何远程调试我的rcp应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于我的RCP eclipse应用程序在eclipse之外运行时失败,而是在eclipse内部运行时正常运行,所以我试图使用eclipse远程调试我的应用程序,因为它在eclipse环境之外运行。



我在64位Windows 7机器上使用32位Eclipse 3.6.1。我使用32位Java 1.6更新37.我使用Eclipse产品导出向导来打包应用程序,最后我使用eclipse.exe。我创建了一个远程调试配置,并将其设置为使用端口8765(随机数)。为了调试目的,我使用这一行从命令行启动应用程序:

eclipse.exe -Xdebug -Xrunjdwp:transport = dt_socket,address = 127.0.0.1:8765



根据我是否通过我的Eclipse调试器附加或收听,我将在这个命令行中添加server = [y / n]选项,但似乎没有任何区别。



对于配置连接类型我已经尝试过Standard(Socket Listen)和Standard(Socket Attach)。当我尝试Socket Listen时,我的调试器将开始侦听 - 等待vm在端口8765连接,但是当我通过命令行启动我的应用程序时,应用程序开始正常,但调试器从不附加。



当我尝试Socket Attach时,首先使用命令行启动应用程序,然后当我尝试使用eclipse附加时,我收到消息Failed to connect to remote VM。Connection refused



我已尝试过地址:localhost,127.0.0.1和我的本地IP地址的各种组合。我每次都得到相同的结果。



感谢任何帮助!

解决方案

您缺少-vmargs参数。尝试eclipse.exe -vmargs -Xdebug -Xrunjdwp:transport = dt_socket,address = 127.0.0.1:8765



我正在寻找相同的东西,找到答案在这个有用的帖子中, http://blog.ankursharma.org/2010/05/remote-debugging- eclipse.html


Because my RCP eclipse application fails when run outside of eclipse, but works correctly when running inside of eclipse, I am attempting to use eclipse to remotely debug my application as it's running outside of the eclipse environment.

I am using 32 bit Eclipse 3.6.1 on a 64 bit Windows 7 machine. I am using 32 bit Java 1.6 update 37. I use the Eclipse Product export wizard to package the app, and I end up with an eclipse.exe. I have created a Remote Debug Configuration and set it to use port 8765 (random number). For debugging purposes, I start the app from the command line using this line:
eclipse.exe -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8765

Depending on whether I am attaching or listening via my Eclipse debugger, I will add the server=[y/n] option to this command line but it seems not to make any difference.

For the configuration Connection Type I have tried both Standard (Socket Listen) and Standard (Socket Attach). When I try Socket Listen, my debugger will start listening - "Waiting for vm to connect at port 8765", but when I start my app through the command line, the app starts fine but the debugger never attaches.

When I try Socket Attach, I start the app first using the command line, then when I attempt to attach using eclipse, I get the message "Failed to connect to remote VM. Connection refused"

I've tried all the various combinations of address: localhost, 127.0.0.1, and my local IP address. I get the same result each time.

Thanks for any help!

解决方案

You are missing the -vmargs parameter. Try "eclipse.exe -vmargs -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:8765"

I was searching for the same thing and found the answer in this helpful post http://blog.ankursharma.org/2010/05/remote-debugging-eclipse.html

这篇关于我如何远程调试我的rcp应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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