From 1ab990a5baa74f16bd851a3aa9f86eb5a36b3133 Mon Sep 17 00:00:00 2001 From: Anairkoen Schno Date: Fri, 25 Jan 2019 17:50:59 -0600 Subject: [PATCH] Fixed debug information showing Still only works with --mono-debug --- IPA.Loader/Logging/StandardLogger.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/IPA.Loader/Logging/StandardLogger.cs b/IPA.Loader/Logging/StandardLogger.cs index 3ee2eb07..66e8d2f6 100644 --- a/IPA.Loader/Logging/StandardLogger.cs +++ b/IPA.Loader/Logging/StandardLogger.cs @@ -163,12 +163,12 @@ namespace IPA.Logging public override void Debug(string message) { // add source to message - var stackFrame = new StackTrace().GetFrame(1); + var stackFrame = new StackTrace(true).GetFrame(1); var method = stackFrame.GetMethod(); var lineNo = stackFrame.GetFileLineNumber(); - var lineOffs = stackFrame.GetFileColumnNumber(); + var paramString = string.Join(", ", method.GetParameters().Select(p => p.ParameterType.FullName)); base.Debug(showSourceClass - ? $"{{{method.DeclaringType?.FullName}::{method.Name}({lineNo}:{lineOffs})}} {message}" + ? $"{{{method.DeclaringType?.FullName}::{method.Name}({paramString}):{lineNo}}} {message}" : message); }