I am testing an importer addon that still has bugs. Sometimes when I import a file, I get a large error all over my screen (and in the console.) I want to save this error log out to a text file so that I can send it to the addon maker to troubleshoot. How do I do this?
-
$\begingroup$ Probably easiest to start Blender from a terminal/command line and redirect all output to a file. If you're on windows, look at: stackoverflow.com/questions/1420965/… $\endgroup$ – someonewithpc Jul 15 '16 at 20:42
-
$\begingroup$ That's a nice idea, but might be too complex to setup for a Tester (IMO). I'd suggest ask the developer for implementing a debug system. Otherwise you can still copy the errors from the Terminal output with ease by selecting the lines and right-click to copy, which should work on linux, windows and osx. $\endgroup$ – p2or Jul 16 '16 at 12:37
-
$\begingroup$ I'm a little confused on the jargon, so can you tell me what the Terminal refers to? I see other people posting up their errors from blender for various things all the time, and I know they didn't go to any great lengths to get them. $\endgroup$ – Ascalon Jul 17 '16 at 4:40
As of version 2.77 there is a new built-in 'Reports to Text Block' operator, which basically copies all entries of the Report Console into a newly created text block per execution:
However, saving errors to a text file automatically is might be too complex for a tester to setup (IMO). I'd suggest ask the developer for implementing a debug system. Otherwise you can copy errors and warnings from the terminal output with ease by running Blender via command line.
Linux
1. Run Blender via Command Line
Open a Terminal (Ctl+Alt+T), navigate to the directory where Blender is installed, and run Blender.
cd <blender installation directory>
./blender
This will run Blender with the Terminal window:
Depending on your Window Manager (Gnome, Unity, KDE etc.) you can edit your Launcher or Starter to open up Blender with the command line automatically by setting the 'Terminal flag' to true:
blender.desktop (Ubuntu, Unity)
[Desktop Entry]
Name=Blender
Exec=/opt/blender-2.77a/blender %F
Icon=/opt/blender-2.77a/icons/scalable/apps/blender.svg
MimeType=application/x-blender
StartupNotify=true
Terminal=true
Type=Application
...
2. Copy the Output, Errors or Warnings
Switch to the Terminal, select the text, then RMB and select 'Copy':
Alternatively you can also redirect the output to a text file when using the command line:
./<blender installation directory>/blender &> ~/mylogfile.txt
Windows
1. Run Blender via Command Prompt
Open the Command Prompt (click Start or hit Win on the keyboard and then type cmd
), navigate to the directory where Blender is installed, and then run Blender:
cd c:\<blender installation directory>
blender.exe
This will run Blender with the Terminal window:
You can create a batch file, this opens up Blender via Command Prompt automatically:
A batch file is a kind of script file in DOS, OS/2 and Windows. It consists of a series of commands to be executed by the command line interpreter, stored in a plain text file
blender.bat
"c:\<blender installation directory>\blender.exe"
2. Copy the Output, Errors or Warnings
Switch to the Command Prompt. RMB > Mark to enable text selection, hit Enter to copy:
Alternatively you can you can also redirect the output to a text file when using the command line:
c:\<blender installation directory>\blender.exe > %homepath%\mylogfile.txt
Further reading: