stdin #557
-
Might be a noob question, but didn't find explanations in docs. If I use lldb-vscode to launch and debug a program that requires user input through scanf, can I specify it somehow without running debugee in a terminal with |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Stdin support depends on the debug adapter. See microsoft/debug-adapter-protocol#216 Not sure if lldb-vscode (from the llvm/lldb project) supports it. codelldb supports stdio redirection via launch configuration: https://github.com/vadimcn/vscode-lldb/blob/master/MANUAL.md#stdio-redirection With debugpy you could launch the application in a normal terminal and use the "stopOnEntry" functionality. See also: #430 If the debug adapter does not provide an option you could consider restructuring your program so that you can pass the "stdin" content via a file or you create a testcase where you pass in the content. That usually has the additional benefit of a faster feedback loop. |
Beta Was this translation helpful? Give feedback.
Stdin support depends on the debug adapter. See microsoft/debug-adapter-protocol#216
Not sure if lldb-vscode (from the llvm/lldb project) supports it.
codelldb supports stdio redirection via launch configuration: https://github.com/vadimcn/vscode-lldb/blob/master/MANUAL.md#stdio-redirection
With debugpy you could launch the application in a normal terminal and use the "stopOnEntry" functionality. See also: #430
If the debug adapter does not provide an option you could consider restructuring your program so that you can pass the "stdin" content via a file or you create a testcase where you pass in the content. That usually has the additional benefit of a faster feedback loop.