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

Console application halts at end of the last line #89

Closed
mayankdedhia opened this issue Apr 30, 2015 · 8 comments
Closed

Console application halts at end of the last line #89

mayankdedhia opened this issue Apr 30, 2015 · 8 comments

Comments

@mayankdedhia
Copy link

Currently in my project when the whole code completes execution the console doesn't closes and I can view the output of it, but when same code is executed on other machines at the code completion the console closes so output couldn't be visible. I don't know what the behavior should be from out of this two, but I believe it should be consistent across systems.

At all systems the versions are -

  • Node - v0.12.0
  • VS - 2013 Express
@mousetraps
Copy link
Contributor

Agreed. This didn't used to happen, and it also looks like this issue only occurs when the debugger is attached, so maybe something has changed in V8 APIs recently.

@mayankdedhia
Copy link
Author

Is there a way to get consistent behavior across systems?

@mousetraps
Copy link
Contributor

Yes, by fixing the bug ;-) or calling process.exit at the end of the program (admittedly non-ideal)

Other issues are taking priority on our end at the moment, but feel free to play around with the code in the meantime.

@mousetraps
Copy link
Contributor

Investigating this now - are you sure you're running the same version of node on both systems? I see consistent experiences across systems using the same version of node.

@mayankdedhia
Copy link
Author

Now I don't have access to both the systems which I had checked earlier. So I've checked with the other available systems and I'm getting inconsistent experiences across systems with different version of node.

@mousetraps
Copy link
Contributor

Narrowed this down to an issue with recent versions of Node (after 0.10.36)... the debug process is not terminating properly, and we're not picking up any information that would let us hack around the issue by terminating the process some other way.

See the following issues for more detail:
nodejs/node-v0.x-archive#25358
nodejs/node#1788

Unfortunately this is also causing a bunch of test failures, so we'll have to look into disabling some of our debugging tests for the time being.

Marking this as external, but not closing so we can make sure to revisit it when everything is working and the issue is fixed in Node itself.

For the time being, if you want a "consistent" experience, your best bet is to turn on Wait for input when process exits abnormally and Wait for input when process exits normally in Options > Node.js Tools, and you can use Ctrl+C to close the window and end your debugging session.

@mousetraps mousetraps modified the milestones: July, June Jun 17, 2015
@mayankdedhia
Copy link
Author

Thanks for the in depth analysis. I'll try the work around you suggested.

@paulvanbrenk
Copy link
Contributor

Node 8 and later now only closes when you stop debugging... though not as flexible it's at least consistent.

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

No branches or pull requests

3 participants