HomeWindowsHow to write a string to the Output Window in Visual Studio?

How to write a string to the Output Window in Visual Studio?

How to write a string to the Output Window in Visual Studio?

Here’s a simple tip that lets you write the data / string to the output window when debugging a Windows Phone Application.

This is not specific just to the Windows Phone Development but works for other project types too in Visual Studio.

You can use the method used Debug.WriteLine defined in the System.Diagnostics namespace to write the string to the Output Window like the sample line given below.

Debug.WriteLine("This is a test message");

When this line is executed, you should see the string “This is a test message” in the Output Window.

Make sure that “Show Output from” is set to Debug in the Output Window.

Leave a Reply

You May Also Like

This blog post will guide you through several effective methods to troubleshoot and resolve the issue of Microsoft Edge not...
Windows 11 offers a range of audio enhancements that can enrich your listening experience. These enhancements include features like virtual...
Windows 11 brings a fresh and visually stunning design to your desktop, and one of the standout features is the...