codelldb icon indicating copy to clipboard operation
codelldb copied to clipboard

v1.7.0 remote debugging

Open tnagyzambo opened this issue 2 years ago • 3 comments

OS: macOS 12.2.1 VSCode version: 1.65.2 CodeLLDB version: 1.7.0 LLDB version: 10.0.0 Compiler: clang-14 Debuggee: ROS2 program running in remote devcontainer

Launching lldb-server with lldb-server platform --listen "*:3000" --server in the remote container and connecting using the launch file bellow used to work in 1.6.10.

{
    "name": "Remote launch",
    "type": "lldb",
    "request": "launch",
    "program": "${workspaceFolder}/binary",
    "initCommands": [
        "platform select remote-linux",
        "platform connect connect://localhost:3000",
        "settings set target.inherit-env true",
    ],
}

In 1.7.0 the LLDB extension fails to connect to the port:

Console is in 'commands' mode, prefix expressions with '?'.
Executing script: initCommands
  Platform: remote-linux
 Connected: no

error: Failed to connect port

tnagyzambo avatar Mar 14 '22 09:03 tnagyzambo

Same exact problem on RHEL8/lldb11, roll back to 1.6.10 and it works.

isaacsmead avatar Apr 19 '22 19:04 isaacsmead

I also had the same problem, rolled back to 1.6.10 (thanks @isaacsmead)

mcrajah avatar May 02 '22 22:05 mcrajah

Is port 3000 the only one exposed on the container? AFAIK, lldb-server needs more ports to create new debug sessions: https://lldb.llvm.org/man/lldb-server.html#gdb-server-connections. Not sure why this worked in 1.6.10, perhaps some change in LLDB 14...

vadimcn avatar May 04 '22 05:05 vadimcn