VS Code Integrated Terminal with Visual Studio Command Prompt

It is quite convenient to use visual studio developer command prompt from VS Code integrated terminal.

  • You need to find the correct command line argument to start the visual studio command prompt. You can do that by checking properties of the shortcut icon. Configuring shortcut

  • Copy the shortcut link text

    %comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\VsDevCmd.bat""
    
  • Then go to user preferences of VS Code and update the ShellArgs property with correct parameters you copied from the step 2.
    "terminal.integrated.shellArgs.windows": ["/k", "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\Tools\\VsDevCmd.bat"]
    
  • If everything goes ok you should be able to use developer command prompt within VS Code integrated shell as follows Using command prompt

Troubleshooting

If you have trouble executing commands you can check if correct command parameters are passed into the integrated terminal by using the process explorer. Using process explorer

If you are running an older version of VS Code you may need to upgrade to the latest version due to this bug

Comments