diff --git a/src/Generator/Generators/CodeGenerator.cs b/src/Generator/Generators/CodeGenerator.cs index 29afbad6..d102055f 100644 --- a/src/Generator/Generators/CodeGenerator.cs +++ b/src/Generator/Generators/CodeGenerator.cs @@ -92,7 +92,14 @@ namespace CppSharp.Generators public virtual void GenerateDebug(Declaration decl) { if (Options.GenerateDebugOutput && !string.IsNullOrWhiteSpace(decl.DebugText)) - WriteLine("// DEBUG: " + decl.DebugText); + { + char[] newLineChars = {'\r', '\n'}; + var text = decl.DebugText; + var index = text.IndexOfAny(newLineChars); + if (index >= 0) + text = text.Substring(0, index); + WriteLine("// DEBUG: " + text); + } } #endregion