Skip to content

Add a custom TraceListener on Startup for Mono

Rafał Mikrut requested to merge github/fork/shartte/godot-trace-listener into master

Created by: shartte

Added a Godot TraceListener, which is automatically installed on startup. Fixes that Debug/Trace Assertions are simply swallowed by Godot.

Example:

Put a failing Debug.Assert or Trace.Assert somewhere into your Mono code and see that the assertion is never shown. If you attach Visual Studio to Godot, you'll see the assertion printed in the debugger output, but not in the Godot console / logfile.

It might be contentious to install the listener only when DEBUG_ENABLED is set, because Trace.Fail will also use this listener, and that class is intended for release builds as well.

Merge request reports