First steps with VSCode (again)

Till now I did not use Visual Studio Code on a regular bases. Why? I always started using it for debugging my scripts, because I’ve been told, it is outstanding for debugging.
But it did not work for me. Each time something happend and I switched back to ISE.
Last week I open sourced my ISE profile – and than it happend, that I got a message from Tyler Leonhardt.


So now I simply have to have a better look on vs code. I did not have immediatly. Because now it is possible to position the powershell window on the right side (very important for me).

So I’ve had a look at Mike Robbins hints and the hints of Timothy Warner.

What I wanted

  • PowerShell like behavior – to start a script and code while the script runs
  • command window on the right side (for the second screen)
  • Nice icons
  • Autosave (I like that)
  • Wanted to try some autoformating

Now I started with the following mix:

The Extensions

  • Powershell (of course)
  • vscode-icons (nicer icons)
  • Markdown All In One (always good – with preview)
  • Azure Tools (I did not try this till now – but it looks impressing)

The Settings

I did a new mix of settings I like most. “powershell.integratedConsole.focusConsoleOnExecute” is the most relevant setting for me.

"workbench.iconTheme": "vscode-icons",
"window.zoomLevel": 0,
"editor.renderWhitespace": "all",
"editor.renderControlCharacters": true,
"files.trimTrailingWhitespace": true,
"files.defaultLanguage": "powershell",
"files.autoSave": "afterDelay",
"files.autoSaveDelay": 1000,
"editor.formatOnType": true,
"editor.formatOnPaste": true,
"powershell.integratedConsole.focusConsoleOnExecute": false,
"editor.mouseWheelZoom": true

Hope that helps you – this will be continued.

[Update 2018-10-30]
I got an advice, I’d like to mention here:
You may want to revise format on type format on paste and format on save. All good options but most of my issues resolve around those. I have reported them all. I use format on save only but i consider to disable it and even use format manually on request only.
See here
[Update 2018-11-21]
I followed the advice, because the VSCode broke really often. Now it is better.

[Update 2018-12-12 – Encoding]

The German Umlaute are mistyped in VSCode out of the box. For example when opening  a script, a ‘�’  appears instead of an ‘ä’.

The issue is closed on Github (see here). I tried the hint and set “files.autoGuessEncoding”: true – works for me now.

Did not set “files.encoding”: “windows1252” – because I never used this encoding before (till now it was UTF-8-BOM).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s