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

Productivity extensions

In software development, developer productivity is an important concern. It is vital for the team to make sure that the developers are productive and complete tasks on time. There are various productivity extensions in VS Code that actually help developers make the most of their time to complete their tasks and reach their milestones.

In this section, we will talk about the following three productivity extensions that are useful in software development:

  • Visual Studio IntelliCode
  • Live Share
  • Prettier

Visual Studio IntelliCode

The Visual Studio IntelliCode extension provides AI-assisted recommendations as you write code in the Java, Python, JavaScript/TypeScript, and MS SQL languages.

Once this is installed, you can get IntelliSense suggestions as you type, and it helps you to write code faster.

Live Share

Peer programming is one the most challenging practices in software development. In peer programming, two programmers work together on one piece of code. There are also certain scenarios where we need our peers to review or debug/troubleshoot our application in the case of an error.

The Live Share extension developed by Microsoft allows developers to share their VS Code projects with other developers in real time. Both parties should have this extension installed, enabling them to join the session and see the code, start debugging sessions, and so on. To install it on your workspace or project, you can open the Extensions tab, search for Live Share, and hit Install.

Once the Live Share extension is installed and enabled, restart VS Code to complete the changes. You can then click on the Live Share icon from the bottom bar, as shown in the following screenshot, and click on the Share Now button:

Figure 2.12 – The Live Share icon, after it has been installed

It will ask you to log in with your email account and then, finally, it will show you the link that you can share with your teammate:

Figure 2.13 – Use the Invite page from Live Share to share the session

Prettier

The Prettier extension provides an easy way of formatting code. It supports many languages, such as JavaScript, TypeScript, JSON, CSS, HTML, and others. You can simply add this extension from the Extensions pane by searching for Prettier and installing it on your VS Code:

Figure 2.14 – Installing the Prettier Extension in VS Code

Once this extension is installed, you can open up the Settings tab from VS Code and search for Prettier to list all the configurable settings for Prettier:

Figure 2.15 – Explore the settings of the Prettier extension

To ensure that the formatting is applied every time you save a file, you can search for the Format On Save setting and click the checkbox, as shown in the following screenshot:

Figure 2.16 – Enabling the Format On Save checkbox to autoformat on saving

Now, once you write any code in a language that Prettier supports, it will perform reformatting when it saves.

主站蜘蛛池模板: 南宁市| 寿阳县| 鄂尔多斯市| 茂名市| 陆川县| 珠海市| 柏乡县| 攀枝花市| 宁海县| 安多县| 孟州市| 岱山县| 阿坝县| 镇沅| 安乡县| 海原县| 富裕县| 鸡泽县| 钟山县| 伊金霍洛旗| 民权县| 南开区| 五台县| 漳平市| 什邡市| 西和县| 肃宁县| 偃师市| 芦山县| 中宁县| 镇康县| 屏东县| 醴陵市| 宜春市| 余姚市| 正镶白旗| 仙居县| 金坛市| 大安市| 石景山区| 香格里拉县|