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

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you’ll learn about the Win32 Error “0x000019E5 – ERROR_COULD_NOT_RESIZE_LOG” that you get when debugging system erors in...
In this post, you’ll learn about the error “CO_E_DBERROR 0x8004E02B” that is returned when working with COM based APIs or...
In this post, you’ll learn about the Win32 Error “0x000019D0 – ERROR_LOG_BLOCK_VERSION” that you get when debugging system erors in...