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

Exploring Visual Studio Code

With the successful installation of Visual Studio Code on your Ubuntu instance, you need to perform initial environment setup before you can begin writing code using the editor:

  1. Launch Visual Studio Code from the Start menu and install the C# extension to the editor from Visual Studio Marketplace. You can launch the extension by pressing Ctrl + Shift + X, through the View menu and clicking Extension, and by clicking directly on the Extension tab; this will load a list of available extensions, so click and install the C# extension.
  1. When the extension has been installed, click on the Reload button to activate the C# extension in the editor:
  1. Open the folder of the console application you earlier created; to do that, click on the File menu and select Open Folder or press Ctrl + K, Ctrl + O. This will open the file manager; browse to the path of the folder and click open. This will load the content of the project in Visual Studio Code. In the background, Visual Studio Code will attempt to download the required dependencies for the Linux platform, Omnisharp for Linux and .NET Core Debugger:
  1. To create a new project, you can use the Integrated Terminal of the editor without having to go through the system terminal. Click on the View menu and select Integrated Terminal. This will open the Terminal tab in the editor, where you can type the commands to create a new project:
  1. In the opened project, you will see a notification that requires assets to build and debug the applications that are missing. If you click Yes, in the Explorer tab, you can see a .vscode tree with launch.json and tasks.json files added. Click the Program.cs file to load the file into the editor. From the Debug menu select Start Debugging or press F5 to run the application; you should see Hello World! displayed on the editor's Debug Console:

When you launch Visual Studio Code, it loads with the state it was in when it was closed, opening the files and folders that you last accessed. The editor's layout is easy to navigate and work with, and comes with areas such as:

  • Status bar showing you information about the files you currently have opened.
  • Activity bar provides access to the Explorer view for viewing your project folders and files, and Source Control view for managing a project's source versioning. Debug view for watching variables, breakpoints and debugging-related activities, Search view allows you to search folders and files. Extension view allows you to see available extensions that can be installed into the editor.
  • Editor area for editing the project files, allowing you to open up to three files for editing simultaneously.
  • Panel regions show different panels for Output, Debug Console, Terminal, and Problems:
主站蜘蛛池模板: 东平县| 嘉义市| 阿城市| 乌拉特前旗| 阳江市| 河间市| 贞丰县| 庆安县| 日照市| 崇州市| 旬阳县| 左云县| 宁都县| 白沙| 富平县| 城市| 潞城市| 蒙阴县| 长春市| 泰宁县| 东山县| 博爱县| 许昌县| 常山县| 克拉玛依市| 墨玉县| 九龙县| 文昌市| 寿光市| 北碚区| 屏南县| 盐山县| 上林县| 扶余县| 高清| 偃师市| 南汇区| 大港区| 绥滨县| 宜川县| 洞口县|