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

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.

主站蜘蛛池模板: 东台市| 徐汇区| 岢岚县| 安阳市| 南昌县| 合作市| 罗平县| 桓台县| 水城县| 斗六市| 渑池县| 枣强县| 荆州市| 扬中市| 德昌县| 邹城市| 万荣县| 天门市| 长武县| 六枝特区| 阳泉市| 锦州市| 沅江市| 犍为县| 铜山县| 梨树县| 九龙坡区| 泸西县| 天镇县| 嘉峪关市| 威远县| 九江市| 家居| 木里| 仙游县| 调兵山市| 长白| 平顺县| 天峨县| 寿光市| 湘西|