A lot of processes in NetBeans display the output in the output window. The output window can be a source for debugging code by looking at for example logging statements. We can save the contents of the output window to a file. We right-click with the mouse and select the Save As... option or press the shortcut Ctrl+S (in Windows). We see a dialog where we can select the filename for the output. Once we press the OK button the contents of the output window is saved to the file.