Skip to content

line-buffer stdout to be nice to debug engines #91

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tlyu
Copy link

@tlyu tlyu commented Jun 6, 2022

Some IDE debug engines start up debug servers in pipes and look for
status messages to indicate the debug server is finished starting
up. The startup messages could be stuck in the stdio buffer,
causing the debug engine to time out.

Some IDE debug engines start up debug servers in pipes and look for
status messages to indicate the debug server is finished starting
up. The startup messages could be stuck in the stdio buffer,
causing the debug engine to time out.
@thierer
Copy link

thierer commented Jan 18, 2025

I can confirm this is useful to get debugging via avarice to work in vscode.

The patch doesn't work for me (linux, glibc 2.40) in its current form, though; I have to move the setvbuf() call all the way up before the first statusOut() in main(). (It does work in its current position with _IONBF instead of _IOLBF).

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

Successfully merging this pull request may close these issues.

2 participants