ProfessorAire/Evands.Pellucid-Crestron

Text written to debug with braces in it does not print

Closed this issue · 1 comments

If there are braces in a string that is printed to console, that string does not print. I'm assuming this has to do with string.Format interpreting those braces as arguments. This makes it difficult to print json to console.

string s = "{string in braces}";
Debug.WriteDebugLine(this, "Trying to write s to Debug");
Debug.WriteDebugLine(this, s);
Debug.WriteDebugLine(this, "Attempt 2: {0}", s);

image

You are correct. I should probably adjust the code to use string formatting only if the parameter array is not null or empty...