Answered by:
How do I run a program in Visual Studio Code?

Question
Answers
-
Basically, you cannot. VS Code is just an editor, not an integrated development environment.
Please read through this thread plus links:
http://stackoverflow.com/questions/32688441/how-to-run-a-program-c-on-visual-studio-code
- Proposed as answer by lake XiaoModerator Thursday, February 25, 2016 5:30 AM
- Marked as answer by lake XiaoModerator Friday, March 04, 2016 6:47 AM
All replies
-
Basically, you cannot. VS Code is just an editor, not an integrated development environment.
Please read through this thread plus links:
http://stackoverflow.com/questions/32688441/how-to-run-a-program-c-on-visual-studio-code
- Proposed as answer by lake XiaoModerator Thursday, February 25, 2016 5:30 AM
- Marked as answer by lake XiaoModerator Friday, March 04, 2016 6:47 AM
-
You could try Code Runner extension for Visual Studio Code. It is easier to run code, no any configuration needed. It now supports several languagse: JS, PHP, Python, Perl, Ruby, Go, Lua, Groovy, PowerShell, BAT/CMD, BASH/SH, F#, C#, VBScript, TypeScript, CoffeeScript, Scala, Swift, Julia, Crystal.
After the extension is installed, run the code as below:
Open code file or select code snippet in Text Editor, then use shortcut
Ctrl+Alt+N
, or pressF1
and then select/typeRun Code
, or right click the Text Editor and then clickRun Code
in context menu, the code will run and the output will be shown in the Output Window.
- Edited by formulahendryMicrosoft employee Tuesday, November 01, 2016 1:08 PM
- Proposed as answer by formulahendryMicrosoft employee Tuesday, November 01, 2016 1:18 PM
-
VS Code has a set of extensions to run a program. And its built-in Task Runner is also able to run a program. The answer of @pvdg42 should not be marked as an answer.
- Edited by formulahendryMicrosoft employee Tuesday, November 01, 2016 1:19 PM