The Python Logger sends information to a log file about each line in a script as it is executed. Even if a script creates instability in MotionBuilder, the last line of code executed before the crash is written to this log file. You can access this file through the Python Editor, or directly from the file system.
To create a log file for executed Python scripts:
The Python Logger loads with the current script displayed.
By default, the Logger is off, and no log file is written.
If MotionBuilder becomes unstable, restart it and open the Python Editor, then the Python Logger.
The log file is written to [MotionBuilder]\bin\lastexec.log.
The logger script is implemented as mbdebugger.py.