mfussenegger / nvim-dap

Debug Adapter Protocol client implementation for Neovim
GNU General Public License v3.0
5.47k stars 194 forks source link

codelldb with remote debugging only starts in REPL. Integrated terminal or external terminal does not work anymore. #1018

Closed maikelmeyers closed 1 year ago

maikelmeyers commented 1 year ago

Debug adapter definition and debug configuration

This seems to be a regression. It did work some time ago that the stdio was in the integrated terminal, but now it only outputs to the REPL.

Installed the adapter via Mason (newest version available)

Configuration is as follow:

dap.adapters.codelldb = {
  type = 'server',
  host = '127.0.0.1',
  port = 13000,
  executable = {
    command = os.getenv("HOME") .. '/.local/share/nvim/mason/bin/codelldb',
    args = { "--port", "13000" },
  }
}
dap.configurations.cpp = {
  {
    name = "Remote Debug with LLDB (clang)",
    type = "codelldb",
    request = "launch",
    program = "/path/to/local/built/executable",
    initCommands = {
      "platform select remote-linux",
      "platform connect connect://169.254.234.195:13000",
      "platform settings -w /path/to/bin/on/target",
      "settings set target.inherit-env false",
    },
    stopOnEntry = false,
    terminal = "integrated"
  }
}

Debug adapter version

codelldb V1.92

Steps to Reproduce

Start a debug session in a cpp file

Expected Result

Output from stdout should be in the integrated terminal

Actual Result

Output is shown in the REPL

mfussenegger commented 1 year ago

If you believe this is a regression please also specify in which version it worked. You could even use git bisect to find the commit that broke it.

And please also provide complete reproduction steps. I need to be able to follow them. "Start a debug session in a cpp file" does not reproduce the issue.

The only recent change in this area was https://github.com/mfussenegger/nvim-dap/commit/2f28ea843bcdb378b171a66ddcd568516e431d55

If it also doesn't work before that, the change may have happened in codelldb.