The other standard setting is forcefully telling VS Code that all PS1XML files are XML.
This is because I do development on a Mac and since PowerShell is now open source and I'm continually updating the version, I explicitly state where the PowerShell exutable is located. You'll notice above that I'm specifying a non-standard attribute. Figure 2.Īdding specific settings is done not by overwriting the original Settings file but by adding your own settings in a custom Settings file.
Below are a few of the settings that I set every time I install VS Code. Although, inside of this file also contains general settings as well which are not language-specific and may affect editing in PowerShell. Figure 1.īy scrolling down, you'll see a PowerShell Configuration section that contains all the settings that can be tweaked that are specific to PowerShell. One way to open up the Settings file is by using the VS Code key binding Ctrl-Shift-P, typing Settings and opening up the User Settings file. Once you've got the extension installed, the next place to go is Settings. This provides numerous features specific just to the PowerShell language and is a must-have feature for any PowerShell developer. If developing with PowerShell, the first task to accomplish is downloading and installing the PowerShell extension developed by Microsoft. These are add-ons to its standard functionality that allow extension developers to extend the functionality of VS Code. Also, VS Code is cross-platform, which means you no longer have to be running Windows to enjoy the benefits of a great PowerShell IDE. With many developers maintaining heterogeneous languages, this is a big advantage to using VS Code. Unlike products specifically meant for PowerShell development like PowerShell Studio, PowerShell ISE and PowerGUI, VS Code "understands" lots of different languages. VS Code is a program capable of being a go-to editor for many languages. Although each has its advantages and disadvantages, the recently introduced VS Code brought to us by Microsoft has already attracted a large following in the PowerShell space.
In the PowerShell space, you've got a few choices of IDEs: you can use the built-in PowerShell ISE, Sapien's PowerShell Studio, Notepad++, Visual Studio, PowerGUI and Visual Studio Code (VS Code), among others. This time-saver comes in the form of an integrated development environment (IDE). But most people need some help that saves them time dealing with all that text. Writing PowerShell code can be done in notepad.