Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set as default the Developer Command Prompt of VS in Visual Studio Code

This trick seems very simple but I don't know how to set up,
What I did :
Go to Archive > Preferences > User Config.
and in the right panel I wrote this...

{
    "terminal.integrated.shell.windows": 
    "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\Tools\\VsDevCmd.bat"
}

works until suddenly disappears.
Thinking about a launch.json script just for the sake of not writing on the console and using a play button, I know cl is for calling the compiler but don't know how to deal with the parameters. Someone suggested to use Cmake.
All I want is to run scratch code with the VC/C++ compiler (not limited to the 2017 version, could be any) so any solution will be highly appreciated.

like image 424
Egon Stetmann. Avatar asked Feb 01 '17 17:02

Egon Stetmann.


1 Answers

Just updating the @K0j0 answer :)

Here is for Microsoft Visual Studio 2017 Community.

{
    // New shell with Developer Command Prompt
    "terminal.integrated.shell.windows": "C:\\Windows\\Sysnative\\cmd.exe",
    "terminal.integrated.shellArgs.windows": ["/k", "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\Common7\\Tools\\VsDevCmd.bat"]
}
like image 64
Luiz Felipe F M Costa Avatar answered Sep 27 '22 23:09

Luiz Felipe F M Costa