-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to read stdin input in debug mode #1274
Comments
So far the only supported way to debug a program like this is to start a headless instance in one terminal:
This will print something like this:
then in another terminal do:
Input for delve will go in the second terminal, input for your program will go in the first one. Duplicate of #65 |
firtst tab:
|
|
@aarzilli Please reopen this issue, thanks. |
It works, thanks, This treatment is not elegant, will it improve in the future? |
Highly unlikely. Debugging like this is of little practical use. |
Hello Delve Developers, Regards, |
The argument I've read on slack is not correct in my opinion.
What happens if a program you've made just has a bug and you want to do the same as the user did? |
I suggest you examine the number of downvotes this comment has gotten. As a programmer of 35-odd years, I can assure you that you are quite mistaken. Note that people write different types of programs. Maybe you may not find yourself writing such code, but this idiom is what UNIX was built upon: piping data from one program to another. In my case, I'm debugging a protocol buffers generator plugin that communicates via a pipe. |
You can do that with |
in my case I have a user-shell that I need to interact with, and now I'm having to add functionality to work around the debugger b/c delve doesn't support this. It's a basic feature supported by pretty much all other debuggers. (Using another language isn't an option due to a shared golang library with another part of the system.) |
This is very useful to debug when stdout ouput many logs. I can enter a blank line as an interval to view the log more clearly. Now,I can only Ctrl-C Ctrl-C Ctrl-C Ctrl-C ... ,and press 'C' 'Enter' |
I think we do need to fix this issue. It's really useful in some situations. |
it seems like i'm not the only one who has arrived here while trying to write a plugin for protoc. Would be great to have this functionality for this specific use-case. |
On OSX,Press Ctrl+Z,then input shell command "fg". Now,I can input anything,But os.Stdin can't receive this |
now delve has a DAP mode, and the input is still not working. Is this issue fixed by any chance? |
I am a go language enthusiast and I am just getting started.
Here is my question:
In debug mode, the program is blocked in stdin and cannot be entered.
dlv version
)?go version
)?What did you do?
In debug mode, the program is blocked in stdin and cannot be entered.
What did you expect to see?
The program receives input and the debug runs normally.
What did you see instead?
Here is my simple code :
Is this a bug?
The text was updated successfully, but these errors were encountered: