The format of this function is WriteLine(string message,string category). This means that it will show your category and then, your message. For instance, category could be TRACE or DEBUG.
I think that what you are looking for is string.Format. You should have
Debug.WriteLine(String.Format("RefKey value was {0}", refKey))
solved Why Debug.Writeline is printing my message in reverse [closed]