nvim-dap-ui icon indicating copy to clipboard operation
nvim-dap-ui copied to clipboard

lua: print output into console window instead of REPL window?

Open qrockz opened this issue 1 year ago • 4 comments

Currently when I'm using lua the print() output goes into the REPL window. I don't want that. Instead I want the output to appear in the "DAP console" window.

qrockz avatar Nov 24 '23 02:11 qrockz

I have the same issue using the lldb-vscode debugging. any tips on how to set this up?

RobertLemmens avatar Jan 01 '24 20:01 RobertLemmens

Set console = "integratedTerminal" in your DAP configuration, e..g. for python

  {
    type = "python",
    request = "launch",
    name = "Launch file",
    program = "${file}",
    console = "integratedTerminal",
  }

rcarriga avatar Jan 03 '24 15:01 rcarriga

unfortunately that does not seem to work for me. I added it as followed, but still get my stdout and stderr output in repl window.

dap.adapters.lldb = {
  type = "executable",
  command = "lldb-vscode"
}

dap.configurations.c = {
  {
    name = "runtime",
    type = "lldb",
    request = "launch",
    program = "./runtime",
    cwd = "${workspaceFolder}",
    console = "integratedTerminal",
  }
}

RobertLemmens avatar Jan 05 '24 14:01 RobertLemmens

I am experiencing this in Python as well as C. I have never seen stdout in the console element, but it does consistently display in the repl.

aaharr avatar Jul 27 '24 14:07 aaharr