Вопрос

Intellij does not seem to be doing basic hot code swap on my installation.

For this code:

public class MainTest {
    public void method1() {
        System.out.println("Breakpoint here");
    }

    public void method2() {
        System.out.println("Line that will get 24 modified");
    }

    public static void main(String[] args) {
        System.out.println("First print here");
        MainTest mainTest = new MainTest();
        mainTest.method1();
        mainTest.method2();
        System.out.println("Line that I do not modify");
    }
}

I put a breakpoint on mainTest.method1(); then modify the string at method2(), hit ctrl+s and continue to step by step. Unfortunately the runtime is not updated, old string is being printed. Full stop - compile - run does print the new string. So my conclusion is hot-swap not working.

Is there any settings I need to set to enable hot code swap?

  • Ubuntu, JDK 1.6
  • Intellij 10.5 Ultimate (evaluation)

Нет правильного решения

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