Json vs代码运行c代码

Json vs代码运行c代码,json,visual-studio-code,Json,Visual Studio Code,我有一个使用makefile构建的现有代码库,我想使用VisualStudio代码来运行它。 有my launch.json和tasks.json { "version": "0.2.0", "configurations": [{ "name": "C Launch (GDB)", "type": "cppdbg", "request": "launch", "launchOptionType": "Local", "targetArchitect

我有一个使用makefile构建的现有代码库,我想使用VisualStudio代码来运行它。 有my launch.json和tasks.json

{
"version": "0.2.0",
"configurations": [{
    "name": "C Launch (GDB)", 
    "type": "cppdbg", 
    "request": "launch",
    "launchOptionType": "Local", 
    "targetArchitecture": "x64",         
    "cwd": "${workspaceRoot}", 
    "program": "E:/code/c", 
    "miDebuggerPath": "E:/Program Files/TDM-GCC-64/bin/gdb64.exe", 
    "args": [""],
    "stopAtEntry": false, 
    "externalConsole": true, 
    "preLaunchTask": "gcc"   
}]
}   


{
"version": "0.1.0",
"command": "gcc", 
"args": ["${file}", "-o", "${fileBasenameNoExtension}.exe", "-g3", "-Og", "-Wall", "-static-libgcc", "-std=c11", "-fexec-charset=GBK", "-finput-charset=UTF-8"],  
"showOutput": "always",
"problemMatcher": {
    "owner": "c",
    "fileLocation": ["relative", "${workspaceRoot}"],
    "pattern": {
        "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
        "file": 1,
        "line": 2,
        "column": 3,
        "severity": 4,
        "message": 5
    } 
}
}
然后当我运行
Hello world
时,就会出现一些问题


尝试更改路径以在Windows上使用
\
而不是
/
。由于必须在json字符串中转义
\
,因此实际值为:

"program": "E:\\code\\c\\${fileBasenameNoExtension}.exe"

假设生成的可执行文件实际位于
E:\code\c

我得到了它。但问题似乎仍然存在。
launch:program'E:\code\c'不存在
如果查看磁盘,该路径是否有可执行文件?如果添加
.exe
,使其值为:
“E:\\code\\c.exe”
,该怎么办?