Jere's Techblog

Visual Studio Code

One of my favorite editors for editing Powershell scripts is Visual Studio Code. Mircosoft’s OpenSource Code Editor, launched in 2016, is a wonderful editor and the biggest advantage is that it works on Windows, Linux and Mac.

In this article I want to show some advantages why I prefer this editor to the classic Powershell_Ise, Atom Editor and Notepad++. I also show useful addons and editor settings.

Okay first of all i’ll show you why

At the beginning I will show you the advantages of the editor:

  • The editor is very fast (no lags) and it starts very fast
  • The editor is with approx. 180MB installation size relatively slim in contrast to Visual Studio
  • The editor supports various programming and scripting languages, which can be installed using extensions.
  • Many Addons/Extensions (Debugger, DebugConsole, ColorEditors, Autocorrection, Sourcecontrol, GIT, TFS Server, Docker, various Azure Tools and Connections)
  • Code can be executed within the editor.
  • Integrated Terminal Console
  • Many configuration options (autosave, color selection, editor behavior, code arrangement and much more).
  • Command Explorer
  • Various color themes for the editor itself (dark / light, much based on Visual Studio)
  • Configuration can be easily done using .json files or GUI
  • Has a very large user community and is strongly pushed by Microsoft.

Distinctive differences to Visual Studio Editor:

  • Visual Studio Code organizes itself according to folder structures (file system) and not like Visual Studio with “Projects”
  • No integrated editor for Windows WPF/Windows Form GUI’s.
  • No Enterprise Debugging (CPU Runtime)

Those are my prefferd Custom Settings:

I have made the following setting in the JSON file (User Settings) to make the scripten more pleasant.

“powershell.integratedConsole.focusConsoleOnExecute”: false,

“powershell.scriptAnalysis.enable”: true,

“powershell.codeFormatting.openBraceOnSameLine”: true

Continue reading...