Answer the question
In order to leave comments, you need to log in
Is it possible to stop a project while running in idea and then continue??
The question is, is it possible and if so how, during the execution of the project, stop it not through the red circle (I don’t know how to say it differently) during debug. And in any place during execution????
Answer the question
In order to leave comments, you need to log in
The red circle is called a "break point" (break point, although point break is translated somewhat differently) in Visual Studio, Idea, Chrome DevTools, and indeed in any IDE. I don’t know why she has a red color, but it happened historically.
To stop the program at any point in multithreaded programs, use the sleep method. Usually the current thread is stopped by Thread.sleep( number of milliseconds ). Here is a Java example: https://docs.oracle.com/javase/tutorial/essential/... After the specified number of milliseconds has elapsed, the stream moves on.
PS
I somehow did this feature in development to speed up debugging. I knew where the program crashes, but if you just enter it into debug mode, then you have to wait 10 minutes until it reaches the breakpoint. Then I set a delay of 10 seconds. in sleep, after which there was a breakpoint and during these ten seconds I managed to put the program into debug mode and after sleep immediately got to the line with a failure. Saved myself 10 minutes. (Small hack).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question