How can I configure IntelliJ to capture the standard output of the application to a file, but still display it in the standard console window?
Save console output to a fileIn the run/debug configuration that will be used for launching the app, click Modify options. From the menu, select Save console output to file. Specify the path to the file. If the file does not exist, it will be created automatically upon the first write.
Run tool window The Run tool window displays output generated by your application. If you are running multiple applications, each one is displayed in a tab named after the run/debug configuration applied. If you re-run an application, the new output overwrites the contents of the tab.
In IDEA, you can type sout and press Tab to generate System. out. println automatically.
Opening a Terminal Window We can open the terminal window with ⌥F12 on macOS, or Alt+F12 on Windows and Linux. The terminal supports all the same commands that the operating system supports. and press enter.
This feature is available starting from IntelliJ IDEA 11:
This feature does work in IDEA 14.1.1. Also in Run/Debug configuration.
The writing occurs after the run finishes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With