如何将Visual Studio Code编译器/调试器设置为GCC? [英] How does one set up the Visual Studio Code compiler/debugger to GCC?
问题描述
我正在Visual Studio Code中用C编程,但我无法编译,因为VSC仅提供了三个内置的编译器-Node.js,C#Mono和Extension开发.经过一番挖掘,我发现了 Visual Studio市场.这似乎是对的事情,但是那里只有四种不常见的语言.
I am programming in C in Visual Studio Code, but I can't compile, as VSC only offers three compilers built in - Node.js, C# Mono, and Extension development. After a little bit of digging I came across the Visual Studio Marketplace. This seemed like the right sort of thing, but only four uncommon languages were there.
我只能假定C调试支持是内置的,我只是找不到它,或者我做错了方法.我试图创建一个新的launch.json(似乎包含每个文件的编译/调试设置的清单),然后手动输入我拥有的GCC二进制文件,但最终没有起作用.我目前无法通过命令提示符手动编译正在处理的C源文件.
I can only assume that C debugging support is built in, I just can't find it or I am going the wrong way about doing it. I attempted to create a new launch.json (the manifest that seems to hold the compiling/debugging settings for each file) and manually entering the GCC binaries that I have, but that didn't end up working. I'm currently stuck manually compiling the C source file I am working on through command prompt.
如果有人可以向我指出正确的工作方向,将真的有帮助.
Would really help if someone could point me in the right direction on what to do.
tl; dr-任何在Visual Studio代码中调试C的人的帮助
Windows 8,如果重要的话
干杯!
推荐答案
Ctrl + P并键入"ext install cpptools",它将安装调试c和c ++所需的所有内容.
Ctrl+P and Type "ext install cpptools" it will install everything you need to debug c and c++.
VS代码中的调试非常完整,但是如果您只需要编译并运行: https: //code.visualstudio.com/docs/languages/cpp
Debugging in VS code is very complete, but if you just need to compile and run: https://code.visualstudio.com/docs/languages/cpp
查看调试部分,它将介绍所有内容
Look in the debugging section and it will explain everything
这篇关于如何将Visual Studio Code编译器/调试器设置为GCC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!