Welcome to MSDN Blogs Sign in | Join | Help

Visual Studio Tip: Examining long strings while debugging

Long strings can be a pain to examine in Visual Studio while you're debugging but in .NET projects you can easily write these to a file on the fly. If for example we want to examine the contents of string s, open up the Immediate Window (Ctrl+I) and type

System.IO.File.WriteAllText("C:\\Debug.txt", s);

Then open up C:\Debug.txt to see the entire string.

Published Tuesday, April 03, 2007 9:53 AM by Kristoffer
Filed under:

Comments

No Comments

New Comments to this post are disabled
 
Page view tracker