'Specified argument was out of the range of valid values.(Parameter 'arch')

I am running vscode for c++ on lenovo legion 5, win 10, and when trying to run a cpp by f5, I get an error:

"Unable to start debugging. Specified argument was out of the range of valid values.(Parameter 'arch')"

The launch json is:


    "configurations": [
        {
            "name": "C++ Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${workspaceFolder}/main.cpp",
            "environment": [],
            "args": [],
            "stopAtEntry": false,
            "externalConsole": true,
            "MIMode": "gdb",
            "cwd": "${workspaceFolder}",
            "customLaunchSetupCommands": [
              { "text": "target-run", "description": "run target", "ignoreFailures": false }
            ],
            "launchCompleteCommand": "exec-run",
            "linux": {
              "MIMode": "gdb",
              "miDebuggerPath": "C:\\msys64\\mingw64\\bin\\gdb.exe"
            },
            "osx": {
              "MIMode": "lldb"
            },
            "windows": {
              "MIMode": "gdb",
              "miDebuggerPath": "C:/MinGw/bin/gdb.exe"
            }
          }
        
    ]
}```

I'm a beginner so I don't really know why this is happening.


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source