From 37d448fca7c212ecc48238cf295975165433c282 Mon Sep 17 00:00:00 2001 From: Sebastian Hartte Date: Thu, 7 Mar 2019 12:17:56 +0100 Subject: Added a Godot TraceListener, which is automatically installed on startup. Fixes that Debug/Trace Assertions are simply swallowed by Godot. --- modules/mono/glue/Managed/Files/DebuggingUtils.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modules/mono/glue/Managed/Files/DebuggingUtils.cs') diff --git a/modules/mono/glue/Managed/Files/DebuggingUtils.cs b/modules/mono/glue/Managed/Files/DebuggingUtils.cs index b27816084e..edfe3464ec 100644 --- a/modules/mono/glue/Managed/Files/DebuggingUtils.cs +++ b/modules/mono/glue/Managed/Files/DebuggingUtils.cs @@ -19,6 +19,12 @@ namespace Godot sb.Append(" "); } + public static void InstallTraceListener() + { + Trace.Listeners.Clear(); + Trace.Listeners.Add(new GodotTraceListener()); + } + public static void GetStackFrameInfo(StackFrame frame, out string fileName, out int fileLineNumber, out string methodDecl) { fileName = frame.GetFileName(); -- cgit v1.2.3