Java Hotswap 与 Eclipses 和本地机器上的远程调试 [英] Java Hotswap with Eclipses and Remote Debugging on Local Machine

查看:19
本文介绍了Java Hotswap 与 Eclipses 和本地机器上的远程调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试了解如何在使用我的构建系统进行调试时启用代码的热插拔,但我快要干掉了.

我有一个带有调试目标的 Ant 构建,如下所示:

<java classname="applet.TabHandler" fork="true" dir="build"><jvmarg value="-Xdebug"/><jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"/><classpath refid="compile_classpath"/></java></目标>

然后我使用 Eclipse 中的远程调试选项连接到端口 8000.调试工作正常,但我无法像使用 Ant 之前那样编辑代码.我知道可以在 JBoss、Tomcat 和其他情况下进行热交换,但我只是通过 JVM 调用在本地运行我的程序,如您所见.

有谁知道我的设置是否可以做到这一点?

谢谢!

解决方案

Java Ant 热插拔效果很好.在 Eclipse 中不需要这样做.

http://code.google.com/p/hotswap/>

I'm trying to find out how to enable hotswapping of code while debugging with my build system and am coming up dry.

I've got an Ant build with a debug target like so:

<target name="debug_dev" depends="compile"
    description="Runs development version with the debugger.">
    <java classname="applets.TabHandler" fork="true" dir="build">
      <jvmarg value="-Xdebug" />
      <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" />
        <classpath refid="compile_classpath" />
    </java>
</target>

I then use the remote debugging option in Eclipse to connect to port 8000. Debugging works fine, but I cannot edit code like I was able to before I was using Ant. I know that it is possible to get hotswapping working with JBoss, Tomcat, and other situations, but I am just running my program locally with a JVM call, as you can see from above.

Does anyone know if this is possible with my setup?

Thanks!

解决方案

Java Ant hotswap works rather well. There is no need to do it in Eclipse.

http://code.google.com/p/hotswap/

这篇关于Java Hotswap 与 Eclipses 和本地机器上的远程调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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