官术网_书友最值得收藏!

The Command and Immediate windows

The Command window is very similar to Command Prompt of the Windows operating system. You can execute commands using this tool. In the VS command line, you can execute commands on the project you are working on in. Commands are very handy and increase your productivity as you don't have to drag your mouse around to execute something. You can run a command to make this happen easily.

To open a Command window in VS, you can click on the View menu and then Windows. After this, select Command Window. Alternatively, you can use the keyboard shortcut, Ctrl + Alt + A, to open it. When you are in the Command window, you will see a > placed in front of every input. This is called a prompt. In the prompt, when you start typing, it will show an Intellisense menu for you. Start typing Build.Compile, at which point the project will be compiled for you as well. You can also use Debug.Start to start debugging the application. You can debug your application easily using commands. I will list some of the important commands that are used most often when debugging using the Command window:

  • ?: Tells you the value of a variable (you can also use Debug.Print to do the same)
  • ??: Sends the variable to the watch window
  • locals: Shows the locals window
  • autos: Shows the autos window
  • GotoLn: Sets the cursor to a specific line
  • Bp: Puts a breakpoint in the current line

Similar to the Command window, an Intermediate window lets you test code without having to run it.  An Intermediate window is used to evaluate, execute a statement, or even print variable values. To open the Immediate window, go to Debug | Windows and select Immediate.

主站蜘蛛池模板: 溆浦县| 天全县| 灵山县| 崇文区| 新巴尔虎右旗| 武隆县| 神农架林区| 孟津县| 岳西县| 金湖县| 大方县| 广德县| 岳普湖县| 华坪县| 伊春市| 淄博市| 鞍山市| 济阳县| 克拉玛依市| 监利县| 玛多县| 盖州市| 西华县| 铁岭市| 阿巴嘎旗| 泰安市| 昌都县| 徐水县| 依安县| 定南县| 准格尔旗| 青田县| 东阿县| 虹口区| 鹿邑县| 岳西县| 河间市| 甘德县| 新丰县| 岱山县| 海淀区|