Dela via


Output Window

This window can display status messages for various features in the integrated development environment (IDE). To display the Output window, select Output from the View menu. To close the Output window and shift focus back to the Editor, press the Escape (ESC) key.

Toolbar

  • Show output from
    Displays one or more output panes to view. Several panes of information might be available, depending upon which tools in the IDE have used the Output window to deliver messages to the user.

  • Find Messsage in Code Find Message in Code
    Moves the insertion point in the Code Editor to the line that contains the selected build error.

  • Go to Previous Message Go To Previous Message
    Changes the focus in the Output window to the previous build error and moves the insertion point in the Code Editor to the line that contains that build error.

  • Go to Next Message Go To Next Message
    Changes the focus in the Output window to the next build error and moves the insertion point in the Code Editor to the line that contains that build error.

  • Clear all Clear All
    Clears all text from the Output pane.

  • Toggle Word Wrap Toggle Word Wrap
    Turns the Word Wrap feature on and off in the Output pane. When Word Wrap is on, text in longer entries that extends beyond the viewing area is displayed on the following line.

Output Pane

The Output pane chosen in the Show output from list displays output from the source indicated.

Routing Messages to the Output Window

To display the Output window whenever you build a project, select the Show Output window when build starts option in the General, Projects and Solutions, Options Dialog Box. Then, with a code file open for editing, click the Go to Next Message and Go To Previous Message buttons on the Output window toolbar to select entries in the Output pane. As you do this, the insertion point in the code editor jumps to the line of code where the selected problem occurs.

Certain IDE features and commands invoked in the Command Window deliver their output to the Output window. Output from external tools such as .bat and .com files, normally displayed in the DOS window, is routed to an Output pane when you select the Use Output Window option in the External Tools Dialog Box. Many other types of messages can be displayed in Output panes as well. For example, when Transact-SQL syntax in a stored procedure is checked against a target database, the results are displayed in the Output window.

You can also program your own applications to write diagnostic messages at runtime to an Output pane. To do this, use members of the Debug class or Trace class in the System.Diagnostics namespace of the .NET Framework Class Library. Members of the Debug class display output when you build Debug configurations of your solution or project; members of the Trace class display output when you build either Debug or Release configurations. For further information, see Diagnostic Messages in the Output Window.

In Visual C++, you can create custom build steps and build events whose warnings and errors are displayed and counted in the Output pane. Pressing F1 on a line of output will display an appropriate help topic. For further information, see Formatting the Output of a Custom Build Step or Build Event.

See Also

Tasks

How to: Control the Output Window

How to: Launch Tools from Visual Studio

Concepts

Diagnostic Messages in the Output Window

Build Configurations

Reference

Configuration Manager Dialog Box

Other Resources

Building in Visual Studio