samedi 16 septembre 2023

Mingw C++ Debugger skips all break points and inputs in vscode

I have an issue with debugging in vscode using mingw, first of all it runs with errors,which shows only in terminal, then doesnt fucntion as a debugger and just skips to the end

here is lauch.json file

{
    "version": "0.2.0",
    "configurations": [


        {
            "name": "(gdb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
            "args": [],
            "stopAtEntry": true,
            "cwd": "${fileDirname}",
            "environment": [],
            "externalConsole": true,
            "MIMode": "gdb",
            "miDebuggerPath": "C:\\msys64\\mingw64\\bin\\gdb.exe",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ],
            "preLaunchTask": "C/C++: g++.exe build active file"
        }  
    ]
}

Here is message in terminal:

Starting build... C:/MinGW/bin/g++.exe -fdiagnostics-color=always -g C:\KBTU\ADS23\lab1\test.cpp -o C:\KBTU\ADS23\lab1\test.exe spawn C:\WINDOWS\system32\cmd.exe ENOENTBuild finished with error(s).

  • The terminal process failed to launch (exit code: -1).
  • Terminal will be reused by tasks, press any key to close it.

I tried changing the launch.json file and path, but that didnt work out Uninstalling and changing the version of mingw didnt help as well

Aucun commentaire:

Enregistrer un commentaire