简体   繁体   English

在本地机器上进行日食和远程调试的Java热交换

[英]Java Hotswap with Eclipses and Remote Debugging on Local Machine

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: 我有一个带有调试目标的Ant构建,如下所示:

<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. 然后我使用Eclipse中的远程调试选项连接到端口8000.调试工作正常,但我无法在使用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. 我知道有可能使用JBoss,Tomcat和其他情况进行hotswapping,但我只是在本地运行我的程序并使用JVM调用,如上所示。

Does anyone know if this is possible with my setup? 有谁知道我的设置是否可行?

Thanks! 谢谢!

Java Ant hotswap works rather well. Java Ant hotswap工作得很好。 There is no need to do it in Eclipse. 在Eclipse中没有必要这样做。

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

Get Ant out of your debugging workflow. 从调试工作流中获取Ant。 Use Ant for packaging final product or continuous integration, but for iterative development and debugging, compile and run code directly from Eclipse. 使用Ant打包最终产品或持续集成,但是对于迭代开发和调试,直接从Eclipse编译和运行代码。 You will get hotswapping, etc. that way. 你会得到hotswapping等等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM