Browse Source

Correctly align printed information for debugging

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1344/head
Dimitar Dobrev 5 years ago
parent
commit
4e30a41ee8
  1. 7
      src/Generator/Generators/CodeGenerator.cs

7
src/Generator/Generators/CodeGenerator.cs

@ -96,11 +96,8 @@ namespace CppSharp.Generators @@ -96,11 +96,8 @@ namespace CppSharp.Generators
public virtual void GenerateDebug(Declaration decl)
{
if (Options.GenerateDebugOutput && !string.IsNullOrWhiteSpace(decl.DebugText))
{
var debugText = decl.DebugText;
debugText = Regex.Replace(debugText.Trim(), "\r?\n", "\n// DEBUG: ");
WriteLine($"// DEBUG: {debugText}");
}
foreach (var line in Regex.Split(decl.DebugText.Trim(), "\r?\n"))
WriteLine($"// DEBUG: {line}");
}
#endregion

Loading…
Cancel
Save