debugging Nvim-dap:Nvim适配器没有响应,OpenNgAD7.exe '正在等待stdin/stdout上的v8协议'

mlnl4t2r  于 2023-10-24  发布在  其他
关注(0)|答案(1)|浏览(200)

我已经为c++配置了nvim-dap,配置如下:

dap.adapters.cppdbg = {
     name = 'cppdbg',
    type = 'executable',
    command = vim.fn.stdpath('data') .. '/mason/bin/OpenDebugAD7.cmd',
}

dap.configurations.cpp = {
    {
      name = 'Debug Program',
      type = 'cppdbg',
      request = 'launch',
      MIMode = 'lldb',
      cwd = '${workspaceFolder}',
      stopAtEntry = true,
      program = function ()
        return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. '/', 'file')
      end,
    }
}

但是NVIM-DAP仍然不会启动。
Idk花了几天的时间试图弄清楚,但无济于事。当我运行nvim-dap时,过了一会儿出现以下消息Debug adapter didn't respond. Either the adapter is slow (then wait and ignore this) or there is a problem with your adapter or cppdbg configuration. Check the logs for errors (:help dap.set_log_level)。控制台也弹出说waiting for v8 protocol on stdin/stdout

pgx2nnw8

pgx2nnw81#

  • 您可以使用lldb-mi作为MIXlogger(通过附加条目MIDebuggerPath = '/path/to/lldb-mi'
  • 或者您可以使用lldb-vscode作为适配器,这样就不需要安装lldb-mi:https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation#ccrust-via-lldb-vscode

相关问题