Is there an api to listen error messages? I do know error messages are displayed in debug console when debugging.
I'm trying to log possible errors in release build.
Is there an api to listen error messages? I do know error messages are displayed in debug console when debugging.
I'm trying to log possible errors in release build.
If you're running it on linux, you can just redirect the output to a file.
godot &> log.txt
With Android, you can use adb (Android Debug Bridge) to view output from the app. I don't know anything about iOS, but maybe there's a similar tool.
Make a habit of implementing assertions in your code.
https://docs.godotengine.org/en/stable/classes/class_@gdscript.html#class-gdscript-method-assert
I find a way by writing an iOS plugin. There is function void add_error_handler(ErrorHandlerList *p_handler)
in error_macros.h which can be accessed in iOS plugin. Define a custom ErrorHandler and add it. Then, all errors are listened.