简体   繁体   English

如何在 vscode 扩展中检索 C/C++ 文件的编译命令

[英]How to retrieve compile command for C/C++ file in a vscode extension

I would like to build a visual studio code extension for include what you use.我想构建一个 Visual Studio 代码扩展来包含您使用的内容。 In order to properly invoke the tool I must find out which parameters are passed to the compiler.为了正确调用该工具,我必须找出传递给编译器的参数。 I know I can retrieve this data form the "compile_commands.json" file.我知道我可以从“compile_commands.json”文件中检索这些数据。

I was wondering if it is possible to retrieve this from the running vscode c/c++ plugin.我想知道是否可以从正在运行的 vscode c/c++ 插件中检索到它。

vscode c/c++ 插件需要这个文件本身提供更好的智能感知,否则它使用自己的标签解析器算法并且对​​特定文件的编译指令一无所知。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM