VScode在配置C/C++时,由于文件后缀不同(C为.c,C++为.cpp),导致编译运行时所需要的配置也有所不同;
其中运行C文件时,其配置文件launch.json中配置信息如下:
"
version": "0.2.0",
"configurations": [
{
"name": "gcc.exe - 生成和调试活动文件",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": []