Wie ändere ich Java-Code im Debug-Modus?

Wie kann ich dieses "Debugging in Runtime" aktivieren, von dem Notch in spricht?Dieses Video in Eclipse?

Als Test möchte ich die Ausgabe des folgenden Codes bearbeiten und in "Hello Runtime Debugging" ändern können, während er ausgeführt wird.

public class HelloWorld {
    public static void main(String[] args) throws InterruptedException {
        doIt();     
    }

    private static void doIt() throws InterruptedException {
        for (int i = 0; i < 1000; ++i) {
            System.out.println("Hello World " + i);
            Thread.currentThread().sleep(100);
        }
    }
}

BEARBEITEN: Ich habe den Code geändert und erhalte jetzt die gewünschten Ergebnisse. Suraj Chandrans Antwort unten erklärt es.

private static void doIt() throws InterruptedException {
    for (int i = 0; i < 1000; ++i) {
        print(i);
        Thread.currentThread().sleep(100);
    }
}

private static void print(int i) {
    System.out.println("Hello Sir " + i);
}

Antworten auf die Frage(4)

Ihre Antwort auf die Frage