diff options
author | Sebastian Hartte <sebastian@hartte.de> | 2019-03-07 12:17:56 +0100 |
---|---|---|
committer | Sebastian Hartte <sebastian@hartte.de> | 2019-03-07 21:00:19 +0100 |
commit | 37d448fca7c212ecc48238cf295975165433c282 (patch) | |
tree | 61b3d923a2b4b3695ca4d3cb2a6bcb645c8c1a04 /modules/mono/glue/Managed/Files/DebuggingUtils.cs | |
parent | 69761816381f11536980441265345ba055ad1c26 (diff) |
Added a Godot TraceListener, which is automatically installed on startup. Fixes that Debug/Trace Assertions are simply swallowed by Godot.
Diffstat (limited to 'modules/mono/glue/Managed/Files/DebuggingUtils.cs')
-rw-r--r-- | modules/mono/glue/Managed/Files/DebuggingUtils.cs | 6 |
1 files changed, 6 insertions, 0 deletions
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(); |