Skip to content

stdin #557

Answered by mfussenegger
0rtz asked this question in Q&A
stdin #557
May 22, 2022 · 1 comment
Discussion options

You must be logged in to vote

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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by 0rtz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants