Настройка файла launch.vs.json для внешнего исполняемого файла в подсистеме Windows для Linux - PullRequest
0 голосов
/ 10 июля 2019

В Visual Studio 2019 + WSL.У меня есть проект CMake, который создает библиотеку some.so.Я хочу отладить с помощью gdb на WSL, исполняемый файл, который находится в другом каталоге.Этот исполняемый файл использует встроенную библиотеку.

Я попытался установить цель проекта, cwd и свойства программы в файле launch.vs.json

'''{
  "type": "cppdbg",
  "name": "some",
  "project": "CMakeLists.txt",
  "projectTarget": "some",
  "cwd": "path/to/some/executable/directory",
  "program": "path/to/some/executable",
  "MIMode": "gdb",
  "externalConsole": true,
  "remoteMachineName": "${debugInfo.remoteMachineName}",
  "pipeTransport": {
    "pipeProgram": "${debugInfo.shellexecPath}",
    "pipeArgs": [
      "/s",
      "${debugInfo.remoteMachineId}",
      "/p",
      "${debugInfo.parentProcessId}",
      "/c",
      "${debuggerCommand}",
      "--tty=${debugInfo.tty}"
    ],
    "debuggerPath": "/usr/bin/gdb"
  },
  "setupCommands": [
    {
      "text": "-enable-pretty-printing",
      "ignoreFailures": true
    }
  ],
  "visualizerFile": "${debugInfo.linuxNatvisPath}",
  "showDisplayString": true
}

'' '*

Visual Studio 2019 просит меня выбрать элемент запуска и не видит исполняемый файл.

...