If you are on Windows and facing the same problem, have a look at Inazense's answer,
Visual Studio Code - "Shell Command: Install 'code' command in PATH command.".
In Visual Studio Code I was not able to find “Shell Command: Install 'code' command in PATH command.” so I had to do this manually.
Open Environment Variables (System → Advanced system settings → Advanced tab → Environment variables). In system variables, click on Path and click Edit and add a new path named:
"C:UsersYour_UsernameAppDataLocalProgramsMicrosoft VS Codein"