llvm-project
87085a87 - [lldb-dap][windows] don't use the ConPTY in internalConsole mode (#186472)

Commit
27 days ago
[lldb-dap][windows] don't use the ConPTY in internalConsole mode (#186472) In `internalConsole` mode (especially in VSCode), lldb-dap should not use the ConPTY to read the process' output. This is because the internalConsole is not a real terminal, there is no reason to use terminal emulation, which will add arbitrary line returns to the output. Instead, this patch introduces the `eLaunchFlagUsePipes` flag in ProcessLaunchInfo which tells ProcessLaunchWindows to use regular pipes instead of a ConPTY to get the stdin and stdout of the debuggee. The result is that output which is supposed to be on a single line is properly rendered. --- The following example is when debugging a program through lldb-dap on Windows. The program prints the numbers 0 through 999 on a single line. # Before <img width="2214" height="672" alt="Screenshot 2026-03-13 at 17 07 35" src="https://github.com/user-attachments/assets/26292d11-2288-46ee-a6d2-0b66bfa41288" /> The line is split if it's longer than 80 characters (default terminal size). # After <img width="2215" height="689" alt="Screenshot 2026-03-13 at 17 12 39" src="https://github.com/user-attachments/assets/c9cad9af-b1ce-4c7b-91d5-f684e48e64ca" /> The line is correctly printed as a single line. rdar://172491166
Parents
Loading