我正在尝试在Visual Studio代码中为c编程环境设置调试器 . 我在代码中添加了一个断点但后来我点击了Start Debugging,没有任何反应 .

这是我的json文件看起来像:

{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

    {
        "name": "(gdb) Launch",
        "type": "cppdbg",
        "request": "launch",
        "program": "${workspaceFolder}/MyProgram.exe",
        "args": [],
        "stopAtEntry": false,
        "cwd": "${workspaceFolder}",
        "environment": [],
        "externalConsole": true,
        "MIMode": "gdb",
        "miDebuggerPath": "/usr/bin/gdb",
        "setupCommands": [
            {
                "description": "Enable pretty-printing for gdb",
                "text": "-enable-pretty-printing",
                "ignoreFailures": true
            }
        ]
    }
]
}

我的make文件如下所示:

all: MyProgram.exe

    MyProgram.exe: main.o array.o
        gcc -o MyProgram.exe main.o array.o

    main.o: main.c
        gcc -g -c main.c

    array.o: array.c
        gcc -g -c array.c

    clean:
        rm *.o *.exe

我可以使用相同的编译输出启动ddd但由于某种原因无法使VS Code调试器工作 . 我错过了什么吗?