VSCode的安装就不讲了,可以参考这个(http://www.cnblogs.com/dunitian/p/6661644.html)
写一个简单的C,然后F5运行,根据提示来配置文件

删掉前面的内容

运行发现还是不行,Ctrl+Shift+B,输入Task

选择Others

把command和args配置一下,${file}代表当前打开文件

Ctrl+Shift+B生成一下

F5运行调试

官方文档:https://code.visualstudio.com/docs/languages/cpp


参考:
https://code.visualstudio.com/docs/editor/tasks
https://code.visualstudio.com/docs/editor/debugging
原文:http://www.cnblogs.com/dotnetcrazy/p/6661921.html