Command Window

The Command window can be used to execute commands directly in the Visual Studio IDE. To display the Command window, click the View menu, point to Other Windows, and then click Command Window. This window is available whether or not you are in break mode. For example, if you want to view the value of a variable, you can type the following code into the Command window and press the ENTER key:

Debug.Print myVariable

Visual Studio has a number of shortcuts, known as aliases, that you can use to enter a command into the Command window. When you use an alias, you can type

? myVariable in the Command window instead of typing Debug.Print myVariable and get the same results. To view a complete list of the aliases available, type the command

>alias in the Command window and press the ENTER key.

You can create your own aliases for use in the Command window by typing the following commands and then pressing the ENTER key. Be sure to replace <aliasName> with the name you want to assign to the command, and replace <commandName> with the name of the command.

>alias <aliasName> <commandName>

To delete the alias, type the following command and then press the ENTER key.

>alias <aliasName> /delete Output Window

The Output window displays status information in the Visual Studio IDE. When you build a solution, information about its success is displayed in the Output window as shown in Figure 2.37. If the build fails, an Error List window is displayed. To display the Output window, click Output on the View menu. Also, the Output window automatically opens whenever you build a VSTO solution.

,'lEiTOfLKtl TCUtf^t \

Figure 2.37. The Output window

,'lEiTOfLKtl TCUtf^t \

Figure 2.37. The Output window

The following windows are available only when the application is in break mode. To open these windows, click the Debug menu and then select Windows.

0 0

Post a comment