2
$\begingroup$

I can't figure out how to view the DEBUG reports generated by calling self.report({'DEBUG'}, 'DEBUG') in an operator.

Steps to reproduce:

  1. Launch blender with the debug flag.

    blender --debug
    
  2. Confirm bpy.app.debug is True in the interactive console.

  3. Paste and run this addon script.

    import bpy
    
    class OPERATOR_REPORT_TEST(bpy.types.Operator):
        """Show all Wm Report Items"""
        bl_idname = "script.operator_report"
        bl_label = "Operator Report"
        bl_options = {'REGISTER'}
    
        def execute(self, context):
            self.report({'DEBUG'}, 'DEBUG')
            self.report({'INFO'}, 'INFO')
            self.report({'OPERATOR'}, 'OPERATOR')
            self.report({'PROPERTY'}, 'PROPERTY')
            self.report({'WARNING'}, 'WARNING')
            self.report({'ERROR'}, 'ERROR')
            self.report({'ERROR_INVALID_INPUT'}, 'ERROR_INVALID_INPUT')
            self.report({'ERROR_INVALID_CONTEXT'}, 'ERROR_INVALID_CONTEXT')
            self.report({'ERROR_OUT_OF_MEMORY'}, 'ERROR_OUT_OF_MEMORY')
            return {'FINISHED'}
    
    def register():
        bpy.utils.register_class(OPERATOR_REPORT_TEST)
    
    def unregister():
        bpy.utils.unregister_class(OPERATOR_REPORT_TEST)
    
    if __name__ == "__main__":
        register()
        bpy.ops.script.operator_report()
    
  4. There is on entry corresponding to the DEBUG report in the info console.

    Screenshot of the info panel in blender after running the script.

  5. There is also no log in the system console used to launch blender. All other reports are showing up.

    Screenshot of the system console after running the script.

$\endgroup$
5
  • $\begingroup$ I think DEBUG messages are intended for internal use, to be used only by the Blender developers, not for normal user-facing features. $\endgroup$ Commented Jan 30 at 16:58
  • 1
    $\begingroup$ Can you see the messages correctly if you open the internal console? Window > Toggle System Console. That's where they should show up in their entirety. $\endgroup$ Commented Jan 30 at 17:58
  • $\begingroup$ @Jakemoyo In my case I don't see the DEUBG reports. I tried opening in PowerShell using Start-Process "C:\Program Files\Blender Foundation\Blender 4.3\blender.exe" -ArgumentList '--debug' and I also tried creating a shortcut icon and changing the target to "C:\Program Files\Blender Foundation\Blender 4.3\blender.exe" --debug but self.report({'DEBUG'}, 'somedebug') will never show up in my case. Could you elaborate more on how exactly you got this to work? $\endgroup$ Commented Jan 31 at 10:24
  • $\begingroup$ I don't know if this is relevant, but Using the Windows Command Prompt as administrator and following the OP's method, I get a Python error: Error: Python: Traceback (most recent call last): File "\Text", line 29, in <module> File "C:\Program Files\Blender Foundation\Blender 4.3\4.3\scripts\modules\bpy\ops.py", line 109, in __call__ ret = _op_call(self.idname_py(), kw) $\endgroup$ Commented Jan 31 at 23:23
  • $\begingroup$ @curious_1The error is expected since we are reporting error in the operator $\endgroup$ Commented Feb 1 at 10:30

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.