Debugging stdin

56 views
Skip to first unread message

Ian Bruene

unread,
Jun 21, 2019, 8:29:59 PM6/21/19
to delve-dev

I maintain a library that handles REPL gruntwork. Among other things this means that any program which uses it reads data from standard input. When loaded into Delve os.Stdin always returns EOF. This includes even a basic test program that does the most basic read possible.

How can Delve be used with standard input attached to the running program?

Thanks.

Choudhary Sourya Vatsyayan

unread,
Apr 26, 2020, 2:47:21 PM4/26/20
to delve-dev

DerekP

unread,
Apr 27, 2020, 12:19:53 PM4/27/20
to delve-dev
If you build from master, you can also specify the TTY of the process Delve creates via the `--tty` flag. You can pair that with `ptyme` https://github.com/derekparker/ptyme to create a PTY pair for this kind of testing.
Reply all
Reply to author
Forward
0 new messages