Software Development

A journal for sharing all things software development related

Visual Studio Code (VSCode / VS Code)

Tue, 25 Jun 2019 08:49 UTC by garethbrown

Visual Studio Code


Debugging multiple projects at once

Create a "compound" configuration for the two apps in launch.json

"compounds": [
        "name": "App1AndApp2",
        "configurations": ["App1", "App2"]

Enable / Disable Git

Add this to settings.json:

// Whether git is enabled.
"git.enabled": false,

Some other commands related to Git execution:

// Path and filename of the git executable, e.g. `C:\Program Files\Git\bin\git.exe` (Windows).
"git.path": null,

// When enabled, commits will automatically be fetched from the default remote of the current Git repository.
"git.autofetch": false,

Save all open files

Note that next to 'Open editors' you will see the number of 'unsaved' files.

In visual studio code as of today you can press Ctrl + K + S to save all unsaved files currently opened in your editor.
Press Ctrl key + K.
Release the Ctrl and K both keys.
Press S key.

Format text / JSON etc


Find and Replace

NOTE: Had some problems with this on locked down UKSBS machine - seemed to only be able to search in open files - possibly because of running as admin while searchin in user account? Installed with VSCode system installer - variant that installs for all users and the problem was resolved.

Open settings


Find in file


Replace in file


Find in workspace / directory


Replace in workspace / directory


Regular expression replace with capture retention (Single capture).

Remember to check the regex option


Find: DateTime.SpecifyKind\((.+),\s?DateTimeKind.Utc\)

Replace: $1 


In left column, right click 'Select for compare' on first file, now find the second file, right click and click 'Compare with selected'

Keyboard shortcuts

Multiline select

Multiline select with keyboard only


Multiline select with mouse click. Drag down from current cursor position or mouse click end position.


My question - how to get a column / box selection rather than multiline select

I can achieve the desired behavior by starting a selection using:

shift + alt

... and then drag the mouse left or right to start a single line selection, AND THEN start dragging down ...

or by starting a selection using:

ctrl + shift + alt

Another useful question

Open command pallete



In file


In folder / workspace


Note: 2019/11/12 - only seems to be working in open files?

Open terminal


Open terminal at location

Find in left nav explorer, right click > Open in Terminal

Open explorer at location (reveal)

Find in left nav explorer, C-Alt-r

Open folder


Opening files / folders from context menu


.NET Core / Node JS - Creating configurations

In top menu > Debug > Add Configuration

This will create .vscode folder with launch.json and tasks.json

This .vscode directory may need to be duplicated in each folder for multiple startup projects.

Have not currently worked out how to set different ports for different start up projects.

The information on this site is provided “AS IS” and without warranties of any kind either
express or implied. To the fullest extent permissible pursuant to applicable laws, the author disclaims all warranties, express or implied, including, but not limited to, implied warranties of merchantability, non-infringement and suitability for a particular purpose.

UI block loader
One moment please ...