You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issuesverifiedVerification succeeded
Code pointer where output is recieved on the vscode side.
The text was updated successfully, but these errors were encountered:
isidorn
added
bug
Issue identified by VS Code Team member as probable bug
debug
Debug viewlet, configurations, breakpoints, adapter issues
labels
Nov 7, 2017
Running the program in VS Code results in this output on the debug console:
If you run the program from a terminal you get this:
This discrepancy is expected. Here is the explanation:
Node.js tries to detect whether its stdout and stderr streams are connect to a line-oriented device (like a terminal) or to a block oriented device (e.g a file).
In the former case it assumes that a user is running the node program interactively and node flushes buffered "log" or "error" data after one line. As a result the "log" or "error" output appears alternating.
For block oriented devices more data is buffered until it is flushed.
By default VS Code launches node.js programs for the "Debug Console" in a way that uses block oriented streams. That explains the multi-line buffering which results in the unexpected ordered output.
To fix this, you can set the console attribute of a launch configuration to either integratedTerminal or externalTerminal. In this case a line oriented output device is used which results in ordered output.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bugIssue identified by VS Code Team member as probable bugdebugDebug viewlet, configurations, breakpoints, adapter issuesverifiedVerification succeeded
Originaly reported by @good-bits
I can repro both with
node2
andnode
debug adapterI tried with node 7.9, os x
Have the following node program, notice how the output is coming wrongly ordered from the debug adapter:
Code pointer where output is recieved on the vscode side.
The text was updated successfully, but these errors were encountered: