Improve user experience for logging errors to promote bug reports (especially on Windows)

Is there a reason why Blender (2.8) doesn’t create console logs as e.g. .txt files by default? Especially in Windows this would help.

Background

I was using someone’s add-on and a combination of functions resulted in a bug. I want to report it to the developer (in my case as a GitHub issue), but this came along with many issues. Especially on Windows (7).

Issues (on Windows)

  1. First solution you find is to do: Window -> Toggle System Console. Problem is that if you do this after the error, the console shows only about 25 lines of error Traceback.
  2. Copying from the console is a horrible experience in Windows (right-mouse button on Blender logo on the console -> Edit -> Mark -> Select text -> Enter).
  3. Format of copied output with Mark is horrible.

Possible solutions

  1. Have the console window open before the error occurs.
  2. Start Blender with C:\Program Files\Blender Foundation\Blender\blender_debug_log.cmd, which creates logs in C:\Users\Stef\AppData\Local\Temp\blender\debug_logs.

Problems with solutions

  • Default for non-developers is to not have a System Console open, or start with .cmd option.
  • Information on how to get this console output in your clipboard is scarce and vague.
  • From a technical side this works if you know how to reproduce this bug, but from a human perspective you add a lot of extra effort.
    • You have to know that you have to right-click the Blender logo of the console (inside terminal doesn’t work)
    • You have to redo the bug after applying 1 of the solutions to get the error code.
    • It’s hard to explain how to do this for a not so technical user.

A semi-computer knowledgeable person who just quickly wants to help an add-on developer might not want to overcome all this trouble, meaning bugs can go long unreported.

Future

  1. Automatically log console output / errors (but with a check on file size)
  2. Create a menu entry to quickly get error traceback that can be explained in 1 screenshot.

Considerations

  • Ask permission before putting stuff on people’s hard drive (in splash screen?)
  • Defaults can get you into wars
  • Users don’t opt-in by default if they’re not aware that it is possible (improving the blender experience-®-™-©-2019 for the most amount of people with the least amount of resources )
  • Crash logs can help find more common bugs, which can help setting priorities.

Additional

Discussion about this issue (logs disappears in 30 days): blender.chat #blender-coders (https://blender.chat/channel/blender-coders?msg=3oMn8qaSeXCKrJn7M)

2 Likes

When I need console extended logging, I open Blender with something like:
C:\Program Files\Blender Foundation\Blender\blender.exe > C:\TMP\blender_log.log
This is basically what the “blender_debug_log.cmd” file is doing behind the scenes.

The “redirect output” syntax, foo > bar, is universal to Windows and most Unix based derivatives (Linux, BSD, MacOS, etc).

I do not think it would be desirable to have this kind of setting enabled by default though. Maybe there could be a “debug mode” option in the splash screen that would relaunch blender with the options in the “blender_debug_log.cmd” file enabled?