Browse Source

Fixed debug information showing

Still only works with --mono-debug
pull/46/head
Anairkoen Schno 5 years ago
parent
commit
1ab990a5ba
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      IPA.Loader/Logging/StandardLogger.cs

+ 3
- 3
IPA.Loader/Logging/StandardLogger.cs View File

@ -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);
}


Loading…
Cancel
Save