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

Debug console is not logging stdout and stderr immediately anymore, only once it encounters a newline #181785

Closed
rotemdan opened this issue May 8, 2023 · 0 comments · Fixed by microsoft/vscode-js-debug#1768
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues

Comments

@rotemdan
Copy link

rotemdan commented May 8, 2023

Does this issue occur when all extensions are disabled?: Yes

Version info:

Version: 1.79.0-insider (user setup)
Commit: 2c73d2651cc525b27fc697b820743098a204ec01
Date: 2023-05-04T22:11:08.187Z
Electron: 22.4.8
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.19045
Sandboxed: Yes

No extensions installed. Default settings.

Steps to Reproduce:

test.js:

process.stdout.write("Hello")

setTimeout(() => {
	process.stdout.write(" World!\n")
}, 5000)

.vscode/launch.json:

{
	"version": "0.2.0",
	"configurations": [
		{
			"type": "node",
			"request": "launch",
			"name": "Launch Program",
			"skipFiles": [
				"<node_internals>/**"
			],
			"program": "${workspaceFolder}\\test.js",
			"outputCapture": "std"
		}
	]
}

Expected behavior: The debug console should print "Hello" immediately, and after 5 seconds, print " World!".

Observed behavior: The entire string "Hello World!" is printed after a 5 second delay.

Immediate logging of stdout and stderr used to work in the debug console as long as I remember it. I suspect the problem started on the April 2023 release (or slightly earlier?). I don't know what caused this.

@roblourens roblourens assigned connor4312 and unassigned roblourens May 12, 2023
@connor4312 connor4312 added bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues labels May 12, 2023
connor4312 added a commit to microsoft/vscode-js-debug that referenced this issue Jul 31, 2023
Previously when supporting EXT we added per-line splitting and emitting,
but we actually should just reemit things immediately unless we see
an EXT.

Fixes microsoft/vscode#181785
connor4312 added a commit to microsoft/vscode-js-debug that referenced this issue Jul 31, 2023
Previously when supporting EXT we added per-line splitting and emitting,
but we actually should just reemit things immediately unless we see
an EXT.

Fixes microsoft/vscode#181785
@github-actions github-actions bot locked and limited conversation to collaborators Sep 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants