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

If node is started with --debug a space appears on the following line #7755

Closed
pke opened this issue Jul 15, 2016 · 6 comments
Closed

If node is started with --debug a space appears on the following line #7755

pke opened this issue Jul 15, 2016 · 6 comments
Labels
windows Issues and PRs related to the Windows platform.

Comments

@pke
Copy link

pke commented Jul 15, 2016

  • Version: 6.2.1
  • Platform: Windows
  • Subsystem: 8.1

image

See the discussion over here

@addaleax addaleax added debugger windows Issues and PRs related to the Windows platform. labels Jul 15, 2016
@bnoordhuis
Copy link
Member

FWIW, cannot reproduce on Linux with v4, v5, v6 and master, assuming exit.js looks like this:

console.log('line 1')
console.log('line 2')

A full test case would be appreciated.

@pke
Copy link
Author

pke commented Jul 16, 2016

well, that is Windows and I wouldn't know what a test case would look like other than what you already can see on the screenshot. And yes, its only those 2 lines you write in exit.js

@bnoordhuis
Copy link
Member

@nodejs/platform-windows Can someone confirm?

@seishun
Copy link
Contributor

seishun commented Jul 16, 2016

Same here.

C:\Users\Nikolai\Desktop>node --version
v6.3.0

C:\Users\Nikolai\Desktop>node --debug exit.js
Debugger listening on [::]:5858
 line 1
line 2

@seishun
Copy link
Contributor

seishun commented Jul 16, 2016

It seems this happens because WriteConsoleW is called with a string that has a null character at the end here, which the console turns into a space. For some reason the null character is omitted if stderr is piped to a file. Replacing n with n-1 fixes the issue.

@pke
Copy link
Author

pke commented Jul 16, 2016

Super, Thanks for the fix.

evanlucas pushed a commit that referenced this issue Aug 24, 2016
Fixes: #7755
PR-URL: #7764
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this issue Sep 30, 2016
Fixes: #7755
PR-URL: #7764
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this issue Sep 30, 2016
Fixes: #7755
PR-URL: #7764
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this issue Oct 10, 2016
Fixes: #7755
PR-URL: #7764
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
rvagg pushed a commit that referenced this issue Oct 18, 2016
Fixes: #7755
PR-URL: #7764
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this issue Oct 26, 2016
Fixes: #7755
PR-URL: #7764
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants