[Lldb-commits] [lldb] [lldb-dap] Add stdio redirection (PR #158609)
Walter Erquinigo via lldb-commits
lldb-commits at lists.llvm.org
Mon Sep 15 08:42:07 PDT 2025
================
@@ -615,6 +615,14 @@
"description": "Specify where to launch the program: internal console, integrated terminal or external terminal.",
"default": "internalConsole"
},
+ "stdio": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Destination for program stdio streams (0 - stdin, 1 - stdout, 2 - stderr, ...). Using null value means no redirection.",
----------------
walter-erquinigo wrote:
Same here about
```
The stdio property is a list of redirection targets for each of the debuggee's stdio streams:
null value will cause redirect to the default debug session terminal (as specified by the terminal launch property),
"/some/path" will cause the stream to be redirected to the specified file, pipe or a TTY device*,
if you provide less than 3 values, the list will be padded to 3 entries using the last provided value,
you may specify more than three values, in which case additional file descriptors will be created (4, 5, etc.)
Examples:
"stdio": [null, "log.txt", null] - connect stdin and stderr to the default terminal, while sending stdout to "log.txt",
"stdio": ["input.txt", "log.txt"] - connect stdin to "input.txt", while sending both stdout and stderr to "log.txt",
"stdio": null - connect all three streams to the default terminal.
```
https://github.com/llvm/llvm-project/pull/158609
More information about the lldb-commits
mailing list