Skip to content

runInTerminal not working when using lldb-dap from swiftly #1619

Closed
@svanimpe

Description

@svanimpe

Context
I teach programming to novices with no prior programming experience. My programming examples rely heavily on print and readLine as that is the only way novices can do input/output with code they can understand.

Problem
When debugging using the CodeLLDB extension, input and output goes through the integrated terminal, so print and readLine work fine. However, the new debug adapter uses the debug console, where I can see the output of print, but cannot provide any input to readLine.
I was told to use runInTerminal in launch.json, but unfortunately that's not working for me.

My launch configuration is as follows:

{
    "configurations": [
        {
            "type": "swift",
            "request": "launch",
            "args": [],
            "cwd": "${workspaceFolder:Greeter}",
            "name": "Debug Greeter",
            "program": "${workspaceFolder:Greeter}/.build/debug/Greeter",
            "preLaunchTask": "swift: Build Debug Greeter",
            "runInTerminal": true
        },
    ]
}

Launching this outputs the following error in the integrated terminal:

❯  /usr/bin/env /Users/steven/Developer/Greeter/lldb-dap --comm-file /var/folders/j2/lvq8vj0s6r5bzykn9_k7zp
q00000gn/T/lldb-dap-run-in-terminal-comm-4796cb --debugger-pid 1980 --launch-target /Users/steven/Developer
/Greeter/.build/debug/Greeter 
env: /Users/steven/Developer/Greeter/lldb-dap: No such file or directory

I get the same error on Ubuntu. On Windows, an error window pops up with the message "Unimplemented".

Environment

  • OS: macOS 15.5 and Ubuntu 24.04.2 and Windows 11 24H2
  • Swift verson: 6.1.2
  • Visual Studio Code version: 1.100.3
  • vscode-swift version: 2.4.0
  • lldb-dap version: 0.2.15

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions