I want to create a plugin for PyCharm that allows me save the console output in a file after the user clicked on the run button. I have tried creating an action but I can overwrite or simulate the action after the execution of the program and get the console output. I also tried to use ExternalSystem.AfterCompile from externalSystemActions.xml but I couldn't edit the function, could you please help me or give some tips.




I believe that this already exists.

In the Run/Debug Configurations for your configuration entry, the Logs tab has a "Save console output to file" option that lets you specify a file.


I could not find the "logs" tab in Run/Debug Configuration. Do I need to install any plugin to enable that?  

I am suing this version:

CLion 2018.3.2
Build #CL-183.4886.39, built on December 17, 2018
Licensed to +++++++++++++++++++
Subscription is active until September 18, 2019
JRE: 1.8.0_152-release-1343-b26 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 3.10.0-693.17.1.el7.x86_64


The same holds for me. My Run/Debug Configurations dialog looks like this. No LOG Tab anywhere. My application is C++, if this is relevant. 


To update this thread, has instructions about where to find the log files, but neither the "Old appearance", nor the "New appearance" match what I see in WebStorm:

"Old appearance" is closer, but "The Edit Log Files Aliases table" is named "Log files to be shown in the console". "The Edit Log Files Aliases table" is the name of the dialog to add an alias.

I wish for something simpler though: some keyboard shortcut to select everything and copy the entire Run output to the clipboard. Ctrl+A doesn't work. The context menu shows "Copy", but not "Select All". This would be useful for comparing logs to previous logs via "Compare with clipboard", saving to different filenames etc.

Can this be configured, or should I file a feature request?