The lldb.debugger et al convenience variables are only available from the interactive script interpreter. In all other scenarios, they are None (since fc1fd6bf9fcfac412b10b4193805ec5de0e8df57) before that they were default initialized.
The crashlog script was hacking around that by setting the lldb.debugger to a newly created debugger instance when running outside of the script interpreter, which works fine until lldb creates a script interpreter instance under the hood and clears the variables. This was resulting in an AttributeError when invoking the script directly (from outside of lldb):
AttributeError: 'NoneType' object has no attribute 'GetSourceManager'
This patch fixes that by passing around the debugger instance.
rdar://64775776
Why does crashlog.Symbolicate accept a debugger parameter?