Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

Debug.WriteLine Method (String, Object[])

Writes a formatted string followed by a line terminator to the debugger by using the OutputDebugString function.

Namespace:  System.Diagnostics
Assembly:  System (in System.dll)
[ConditionalAttribute("DEBUG")]
public static void WriteLine(
	string format,
	params Object[] args
)

Parameters

format
Type: System.String
A composite format string that contains text intermixed with zero or more format items, which correspond to objects in the args array.
args
Type: System.Object[]
An object array containing zero or more objects to format.

By default, the output is written to the debugger.

NoteNote:

The WriteLine method behaves differently in Silverlight-based applications than it does in desktop applications. There is no Listeners collection to specify the destination for debug output. In Windows, the .NET Framework for Silverlight sends debugging information to the OutputDebugString function and to the debugger, if one is attached. The Visual Studio debugger displays the information in the Output window. If a debugger is not attached, the output from OutputDebugString can be viewed by using a debug viewer. The Apple Macintosh OS X does not have an OutputDebugString function. Therefore, managed debugging can be done only through remote debugging on a Windows computer by using a Visual Studio plug-in.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.