Q. Can I edit and debug PowerShell in VS Code?
A. Yes. VS Code is an open, free, very lightweight editor based on Visual Studio. It can be used to edit many different languages and is built on an extensible framework. An extension is available to add knowledge of PowerShell to VS Code.
The repository for the project is at https://github.com/PowerShell/vscode-powershell and instructions for its use at https://marketplace.visualstudio.com/items?itemName=ms-vscode.PowerShell.
To add PowerShell simply add the extension by pressing Ctrl + P and entering:
ext install PowerShell