Search code examples
javadebuggingintellij-ideastdinjetbrains-ide

How to send input in the debug mode of IDEA IntelliJ?


In IntelliJ IDEA, I couldn't send input while the debug mode reaches the line

String i = in.nextLine();

which is waiting for user input.

==============================================

The screenshot is as follows.

couldn't do anything while program block in waiting for stdin


Solution

  • Looks like your console is hidden in debug mode. See the right most icon with > symbol right next to profiler. click on it and it must open the console.

    enter image description here

    Another way is right click on Debugger and choose Layout and check mark Console.

    enter image description here