Open
bgemmill
opened this issue 1 month ago
•
12 comments
OS: Ubuntu 24.04.3 LTS from dockerhub
VSCode version: 1.106.1
CodeLLDB version: 1.11.8
Compiler: Ubuntu clang version 21.1.6 from llvm apt repository
Debuggee: c++ with debug symbols
Up until this morning, CodeLLDB has been working splendidly for my project.
Now, when trying to start a debugging target, it looks like the process is started and runs ok (I see expected output in the debugger console) but codelldb doesn't seem to connect to it.
I tried downgrading CodeLLDB to 1.11.7 but see the same error.
Is there a way to get even more verbose output from the codelldb-launch process?
Console is in 'commands' mode, prefix expressions with '?'.
Failed to redirect stdio to a terminal. (Terminal agent did not respond within the allotted time.)
Debuggee output will appear here.
<expected binary output appears here>
Process exited with code 0.
Is there a way to get even more verbose output from the codelldb-launch process?
Not really.
The error is coming from the TCP layer and indicates that there's nobody listening on that port, which is pretty strange, since codelldb sends the port number only after starting listening on that port.
As of today it's happening every time I attempted to debug with LLDB; I actually just finished editing launch.json to move everything over to gdb until I can get to the bottom of this.
Since reproduction is pretty easy, is there anything you'd like me to do?
Well, no so easy - I could repro it only if I close all terminal panes in VSCode first.
Looks like there's a ~5 sec delay in launching codelldb-launch in this case. Which happens to be the same timeout that codelldb waits to hear back from it before proceeding.
I can increase the timeout, of course, but the underlying issue seems to be in VSCode.
In fact, this seems to be related to VSCode shell integration: when I disable it, the issue goes away.
Can you please confirm? "terminal.integrated.shellIntegration.enabled": false
@KucaKun Any idea why? Does it take this long in general to open a new terminal? Does codelldb-launch fail if you try again when the terminal is already open?
Something changed. I don't really know what's happening. I don't get the OS error anymore. With or without shell integration.
(EDIT: it was due to setting lldb.library to a release build of llvm lldblib liblldb: C:\Program Files\LLVM\bin\liblldb.dll)
In the meantime i disabled the windows firewall for your executables on localhost. Maybe this is why the error shows no more? EDIT: the rules do nothing in this error
Breakpoints work, but the output from my program (stdout and err) are nowhere to be found. I tried integrated, and external console. The terminal is empty.
EDIT: Also the lldb.library
I tried to redirect stdio and the file got filled with data.
Should I open a new issue?
Debug console log:
Console is in 'commands' mode, prefix expressions with '?'.
Launching: G:\rep\bevvy-rust\target\debug\maze.exe
Launched process 7192 from 'G:\rep\bevvy-rust\target\debug\maze.exe'
In the meantime i disabled the windows firewall for your executables on localhost. Maybe this is why the error shows no more?
Could be, though usually the Windows firewall does not interfere with local connections.
The log shows that CodeLLDB was able to spawn the terminal agent successfully and redirected the debuggee output to that terminal without any reported errors.
Should I open a new issue?
Maybe. However, since I don't know how to reproduce this problem, it won't be of much use, unless you are prepared to do some investigation of your end. Can you think of anything that is different about your machine compared to a vanilla Windows setup?
BTW, when reporting issues, it is always helpful to call out the OS being used. I had no idea you are on Windows - the original report was for Linux.