{
  "debugExtensions": {
    "cppdbg": {
      "vsDebugEngineGuid": "{ea6637c6-17df-45b5-a183-0951c54243bc}",
      "VsDebugTargetInfo4": {
        "bstrCurDir": "${workspaceRoot}",
        "bstrExe": "${debugInfo.target}",
        "bstrOptions": "*"
      },
      "templates": [
        {
          "templateId": "launch",
          "displayName": "C/C++ Launch for MinGW/Cygwin (gdb)",
          "description": "Debug launch configuration for C/C++ hosted in MinGW or Cygwin.",
          "fileExtensions": [
            "*.exe",
            "*.out",
            "makefile"
          ],
          "initialConfiguration": {
            "cwd": "${workspaceRoot}",
            "program": "${debugInfo.target}",
            "MIMode": "gdb",
            "miDebuggerPath": "${env.MINGW_PREFIX}\\bin\\gdb.exe",
            "externalConsole": true
          }
        },
        {
          "templateId": "attach",
          "displayName": "C/C++ Attach for MinGW/Cygwin (gdb)",
          "description": "Debug attach configuration for C/C++ hosted in MinGW or Cygwin.",
          "fileExtensions": [
            "*.exe",
            "*.out",
            "makefile"
          ],
          "initialConfiguration": {
            "cwd": "${workspaceRoot}",
            "program": "${debugInfo.target}",
            "processId": 0,
            "MIMode": "gdb",
            "miDebuggerPath": "${env.MINGW_PREFIX}\\bin\\gdb.exe",
            "externalConsole": true
          }
        }
      ],
      "schema": {
        "definitions": {
          "cpp_schema": {
            "type": "object",
            "properties": {
              "program": {
                "type": "string",
                "description": "Full path to program executable."
              },
              "processId": {
                "type": "integer",
                "description": "Optional process id to attach the debugger to."
              },
              "sourceFileMap": {
                "type": "object",
                "description": "Optional source file mappings passed to the debug engine. Format: '{ \"<Compiler source location>\": \"<Editor source location>\" }' OR '{ \"<Compiler source location>\": { \"editorPath\": \"<Editor source location>\", \"useForBreakpoints\": true } }'. \nExample: '{ \"/home/user/foo\": \"C:\\foo\" }' OR '{ \"/home/user/foo\": { \"editorPath\": \"c:\\foo\", \"useForBreakpoints\": true } }'.",
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "$ref": "#/definitions/cpp_schema/definitions/sourceFileMapOptions"
                    }
                  ]
                }
              },
              "MIMode": {
                "type": "string",
                "description": "Indicates the type of MI-enabled console debugger that the MIDebugEngine will connect to. \nAllowed values are \"gdb\", \"lldb\"."
              },
              "args": {
                "type": "array",
                "description": "Command line arguments passed to the program.",
                "items": {
                  "type": "string"
                }
              },
              "environment": {
                "type": "array",
                "description": "Environment variables to add to the environment for the program. \nExample: [ { \"name\": \"squid\", \"value\": \"clam\" } ].",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "value": {
                      "type": "string"
                    }
                  }
                }
              },
              "targetArchitecture": {
                "type": "string",
                "description": "The architecture of the debuggee. This will automatically be detected unless this parameter is set. \nAllowed values are x86, arm, arm64, mips, x64, amd64, x86_64."
              },
              "cwd": {
                "type": "string",
                "description": "The working directory of the target."
              },
              "miDebuggerPath": {
                "type": "string",
                "description": "The path to the MI-enabled debugger (such as gdb). When unspecified, it will search PATH first for the debugger."
              },
              "miDebuggerServerAddress": {
                "type": "string",
                "description": "Network address of the MI-enabled debugger server to connect to. \nExample: localhost:1234."
              },
              "useExtendedRemote": {
                "type": "boolean",
                "description": "If true, use gdb extended-remote mode to connect to gdbserver."
              },
              "setupCommands": {
                "type": "array",
                "description": "One or more GDB/LLDB commands to execute in order to setup the underlying debugger. \nExample: \"setupCommands\": [ { \"text\": \"-enable-pretty-printing\", \"description\": \"Enable GDB pretty printing\", \"ignoreFailures\": true }].",
                "items": {
                  "$ref": "#/definitions/cpp_schema/definitions/launchSetupCommands"
                }
              },
              "postRemoteConnectCommands": {
                "type": "array",
                "description": "One or more commands to execute after the connection has been made, in order to set up the remote connection."
              },
              "customLaunchSetupCommands": {
                "type": "array",
                "description": "If provided, this replaces the default commands used to launch a target with some other commands. \nFor example, this can be \"-target-attach\" in order to attach to a target process. \nAn empty command list replaces the launch commands with nothing, which can be useful if the debugger is being provided launch options as command line options. \nExample: \"customLaunchSetupCommands\": [ { \"text\": \"target-run\", \"description\": \"run target\", \"ignoreFailures\": false }].",
                "items": {
                  "$ref": "#/definitions/cpp_schema/definitions/launchSetupCommands"
                }
              },
              "launchCompleteCommand": {
                "type": "string",
                "enum": [
                  "exec-run",
                  "exec-continue",
                  "None"
                ],
                "description": "The command to execute after the debugger is fully setup in order to cause the target process to run. \nAllowed values are \"exec-run\", \"exec-continue\", \"None\". \nThe default value is \"exec-run\"."
              },
              "debugServerPath": {
                "type": "string",
                "description": "Optional full path to debug server to launch. \nDefaults to null."
              },
              "debugServerArgs": {
                "type": "string",
                "description": "Optional debug server args. \nDefaults to null."
              },
              "serverStarted": {
                "type": "string",
                "description": "Optional server-started pattern to look for in the debug server output. \nDefaults to null."
              },
              "filterStdout": {
                "type": "boolean",
                "description": "Search stdout stream for server-started pattern and log stdout to debug output. \nDefaults to true."
              },
              "filterStderr": {
                "type": "boolean",
                "description": "Search stderr stream for server-started pattern and log stderr to debug output. \nDefaults to false."
              },
              "serverLaunchTimeout": {
                "type": "integer",
                "description": "Optional time, in milliseconds, for the debugger to wait for the debugServer to start up. Default is 10000."
              },
              "coreDumpPath": {
                "type": "string",
                "description": "Optional full path to a core dump file for the specified program. \nDefaults to null."
              },
              "externalConsole": {
                "type": "boolean",
                "description": "If true, a console is launched for the debuggee. If false, no console is launched. \nDefaults to false. NOTE: This option is ignored in some cases for technical reasons."
              },
              "pipeTransport": {
                "$ref": "#/definitions/cpp_schema/definitions/pipeTransportOptions"
              },
              "stopAtConnect": {
                "type": "boolean",
                "description": "If true, the debugger should stop after connecting to the target. If false, the debugger will continue after connecting. \nDefaults to false."
              },
              "hardwareBreakpoints": {
                "$ref": "#/definitions/cpp_schema/definitions/hardwareBreakpointsOptions"
              },
              "unknownBreakpointHandling": {
                "type": "string",
                "enum": [
                  "throw",
                  "stop"
                ],
                "description": "Controls how breakpoints set externally (usually via raw GDB commands) are handled when hit.\nAllowed values are \"throw\", which acts as if an exception was thrown by the application, and \"stop\", which only pauses the debug session. The default value is \"throw\"."
              }
            },
            "definitions": {
              "launchSetupCommands": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "The debugger command to execute."
                  },
                  "description": {
                    "type": "string",
                    "description": "Optional description for the command."
                  },
                  "ignoreFailures": {
                    "type": "boolean",
                    "description": "If true, failures from the command should be ignored. \nDefaults to false."
                  }
                }
              },
              "pipeTransportOptions": {
                "type": "object",
                "description": "When present, this tells the debugger to connect to a remote computer using another executable as a pipe that will relay standard input/output between Visual Studio \nand the MI-enabled debugger (such as gdb).",
                "properties": {
                  "pipeCwd": {
                    "type": "string",
                    "description": "The fully qualified path to the working directory for the pipe program."
                  },
                  "pipeProgram": {
                    "type": "string",
                    "description": "The fully qualified pipe command to execute."
                  },
                  "pipeArgs": {
                    "type": "array",
                    "description": "Command line arguments passed to the pipe program to configure the connection.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "pipeCmd": {
                    "type": "array",
                    "description": "Arguments passed to the pipe executable to run a remote Unix (ex: bash or similar) shell command. This is used for running 'kill' on the remote system, or other commands that the debugger may need. If not specified, the debugger will do its best without the shell. But some features, such as setting breakpoints in run mode, may not work. This string should contain the string '{0}' which will be replaced with the command to execute.",
                    "items": {
                      "type": "string"
                    }
                  },
                  "debuggerPath": {
                    "type": "string",
                    "description": "The full path to the debugger on the target machine, for example /usr/bin/gdb."
                  },
                  "pipeEnv": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string"
                    },
                    "description": "Environment variables passed to the pipe program."
                  },
                  "quoteArgs": {
                    "type": "boolean",
                    "description": "If individual arguments contain characters (such as spaces or tabs), should it be quoted? If 'false', the debugger command will no longer be automatically quoted. \nDefault is 'true'."
                  }
                }
              },
              "sourceFileMapOptions": {
                "type": "object",
                "properties": {
                  "editorPath": {
                    "type": "string",
                    "description": "The location of the source code for the editor to locate."
                  },
                  "useForBreakpoints": {
                    "type": "boolean",
                    "description": "When setting breakpoints, this source mapping should be used. \nIf 'false', only the filename and line number is used for setting breakpoints. \nIf 'true', breakpoints will be set with the full path to the file and line number only when this source mapping is used. Otherwise just filename and line number will be used when setting breakpoints. \nDefault is 'true'."
                  }
                }
              },
              "hardwareBreakpointsOptions": {
                "type": "object",
                "properties": {
                  "require": {
                    "type": "boolean",
                    "description": "If true, always use hardware breakpoints. \nDefaults to false."
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Optional limit on the number of available hardware breakpoints to use. Only enforced when \"require\" is true and \"limit\" is greater than 0. \nDefaults to 0."
                  }
                }
              }
            }
          },
          "cppTemplateLayout": {
            "allOf": [
              {
                "$ref": "#/definitions/default"
              },
              {
                "$ref": "#/definitions/cpp_schema"
              }
            ]
          }
        },
        "configuration": "#/definitions/cppTemplateLayout"
      }
    }
  }
}