SAVE THE CONSOLE OUTPUT AFTER RUN

Hello,

 

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.

 

Thanks!!!

4 comments
Comment actions Permalink

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.

1
Comment actions Permalink

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

1
Comment actions Permalink

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. 

1
Comment actions Permalink

To update this thread, https://www.jetbrains.com/help/idea/setting-log-options.html 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?

0

Please sign in to leave a comment.