Вопрос

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/

Другие советы

Get Ant out of your debugging workflow. Use Ant for packaging final product or continuous integration, but for iterative development and debugging, compile and run code directly from Eclipse. You will get hotswapping, etc. that way.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top