W
W
woodhead2019-09-07 08:14:10
Java
woodhead, 2019-09-07 08:14:10

How to break debugging without executing further code in Intellij Idea?

In Intellij Idea Ultimate, I run the following code in debug mode:

public class Main {

    public static void main(String[] args) {
        System.out.println("Это не должно отображаться");
    }
}

I put the breakpoint on the line . After running in debug mode, execution stops at the line with the breakpoint. If you now click the Stop button in the IDE (i.e., stop debugging), then the line "This should not be displayed" will appear in the console. Shouldn't further execution be interrupted when Stop is pressed? The problem is observed in versions 2017.3.5 and 2019.2.2 (currently current). System.out.println("Это не должно отображаться");

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anatoly, 2019-09-07
@TonyWrong

stop disables blocking of the thread(s) and debug stops monitoring application execution. Therefore, the program flow continues its execution as usual.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question