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 will learn about sync provider notifications in Windows 11 and how to disable or enable it...
In this tutorial, let’s learn how to enable or disable the startup sound in Windows 11. By default, when Windows...
The CameraCaptureTask allows the Windows Phone 7 App to launch the Camera Application . This will be useful when the...