Skip to content
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

Code-Debug(GDB) no longer stop when program asks for input, but there's no input #141

Closed
ZZYSonny opened this issue Mar 23, 2018 · 9 comments

Comments

@ZZYSonny
Copy link

Both my windows and mac have the problem.
image
In this situation, the program wants to read number for n. But I didn't write anything into the debug terminal. So instead of stopping at that scanf line and wait for input like it did in 0.21.0, code-debug just skip it. And after that, some strange value is given. (Causing my later part to RE)
However, everything is right when I've put freopen at the beginning and prepare for the input.

@WebFreak001
Copy link
Owner

uh wow this shouldn't happen, nothing even changed there, what's the input if you read a string %s?

@ZZYSonny
Copy link
Author

image
It is still some strange things

@WebFreak001
Copy link
Owner

that's a command the extension sends, I will look into it

@WebFreak001
Copy link
Owner

ref @LeszekSwirski

@LeszekSwirski
Copy link
Contributor

Looks like a weird interaction between gdb async and programs reading stdin maybe?

@WebFreak001
Copy link
Owner

well it should never write to the process stdin because of the special prefixes though, but that could be it

@LeszekSwirski
Copy link
Contributor

Maybe there's some unlucky stdin flushing?

@alianZhen
Copy link

It seems need set terminal argument like this "terminal": "".And then it can run in console

@GitMensch
Copy link
Collaborator

this is actually the same issue as #262, closing it in favor of it as it contains the "technical reasons for it". And yes: as long as the terminal gets an own pty instead of using GDB console everything works as expected (my personal preference would be to have all program input/output in a new "Terminal" within vscode be default).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants