I am testing a script in Blender game engine. I can view the helpful message on the external system console when the script throws exception. Sometimes the bugs of the script cause the Blender to crash and close the console immediately.

Is there any way to view the message after the Blender crashes? How to write the message to a text file for later viewing? Any suggestion?


3 Answers 3

  • On windows just run blender from Command Prompt:

    Win Key+R

    In field type cmd and hit OK. Inside the console navigate to your blender.exe with command

    cd c:\Program Files\Blender Foundation\Blender\ (or whatever your path is)
    instead you can also navigate to the folder in the Explorer and SHIFT+Rightclick on the Folder and select Open Comand Promt here

    and then type blender.exe

    You can also use command line arguments.

    Now even if Blender crashes, you will still see the program output in the console.

  • On OSX use Terminal app and run it like

    cd /Applications/Blender
  • On Linux open terminal and run

    cd <blender installation directory>

You can start blender (or blender.exe) with the option --factory-startup attached to check if a addon or a setting caused the crash

  • $\begingroup$ thanks for the suggestion, it worked cd "c:\Program Files\Blender Foundation\Blender"<br> blender<br> $\endgroup$
    – ShungChing
    Jan 5, 2015 at 18:23
  • $\begingroup$ On vista and windows 7 you do not have to open the run window. You can type cmd in to the start menu and press enter. $\endgroup$
    – David
    Jan 6, 2015 at 17:16

Start blender from a console / cmd prompt in the first place and if it crashes, it will just return to the console and not close the console.

For windows i set up a bat file to load cmd.exe, with any of these variants:

start C:\Windows\System32\cmd.exe /k C:\blender_trunk\blender.exe --debug-all

start C:\Windows\System32\cmd.exe /k C:\blender_trunk\blender.exe --debug

start C:\Windows\System32\cmd.exe /k C:\blender_trunk\blender.exe

It will load the cmd prompt, then blender, and depending on how much info you want you add the debug flag. Make a shortcut to the bat file, and all you have to do is click it to start Blender + console

  • $\begingroup$ thanks for the suggestion, i tried and found that the quote should be as follows: start C:\Windows\System32\cmd.exe /k "c:\Program Files\Blender Foundation\Blender\blender.exe" --debug-all<br> it was a minor typo that may confuse others who may want to try your suggestion. $\endgroup$
    – ShungChing
    Jan 5, 2015 at 18:21
  • $\begingroup$ @ShungChing the quote in my post is exactly how I have it on my system, but it appears the quotes can be dropped entirely. $\endgroup$
    – zeffii
    Jan 6, 2015 at 11:57
  • 1
    $\begingroup$ If there is a space in the path, it must be wrapped in quotes. $\endgroup$
    – Greg Zaal
    Jan 7, 2015 at 5:22
  • $\begingroup$ yes, that's what I thought! my original path doesn't have spaces so the quotes aren't even needed, whereas @ShungChing's path is program<space>files $\endgroup$
    – zeffii
    Jan 7, 2015 at 12:11

Go to the Menu Bar > Windows and click on Toggle System Console

  • 2
    $\begingroup$ Please note the Toggle System Console menu item exists only for Microsoft Windows OS builds of blender. $\endgroup$
    – batFINGER
    Mar 25, 2020 at 1:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .