Running the Visual Studio code debugger on Windows

0

I tried to run the vscode debugger like on the link https://code.visualstudio.com/docs/cpp/config-mingw-> but the following error is showing. How to solve the problem?

=thread-group-added,id="i1" GNU gdb (GDB) 8.3.1 Copyright (C) 2019 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-w64-mingw32". Type "show configuration" for configuration details. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.

For help, type "help". Type "apropos word" to search for commands related to "word". Warning: Debuggee TargetArchitecture not detected, assuming x86_64. =cmd-param-changed,param="pagination",value="off" ERROR: Unable to start debugging. Unexpected GDB output from command "-exec-run". Error creating process C:\cf\a.out, (error 193). The program 'C:\cf\a.out' has exited with code 42 (0x0000002a).

launch.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}/a.out",
        "args": [],
        "stopAtEntry": true,
        "cwd": "${workspaceFolder}",
        "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
          }
        ]
      }
    ]
  }

tasks.json

{


 // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "type": "shell",
            "command": "gcc",
            "args": [],
            "group": {
                "kind": "build",
                "isDefault": true
        }
    }
    ]
}

settings.json

{
    "window.zoomLevel": 0,
    "terminal.integrated.shell.windows": "C:\\msys64\\usr\\bin\\bash.exe"
}

c_cpp_properties.json

{
    "configurations": [
        {
            "name": "Win32",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "cStandard": "c11",
            "intelliSenseMode": "gcc-x64",
            "cppStandard": "c++11",
            "compilerPath": "C:\\msys64\\mingw64\\bin\\gcc.exe"
        }
    ],
    "version": 4
}

halix@DESKTOP-5F5IFIL:/mnt/c/cf$ gcc -g ft_atoi.c

c++
c
gdb
mingw-w64
asked on Stack Overflow Nov 17, 2019 by HalimHamidov

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0