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

exception not displayed in console #34721

Closed
geogeim opened this issue Sep 20, 2017 · 5 comments
Closed

exception not displayed in console #34721

geogeim opened this issue Sep 20, 2017 · 5 comments
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)

Comments

@geogeim
Copy link

geogeim commented Sep 20, 2017

  • VSCode Version: Code 1.16.1 (27492b6, 2017-09-14T16:38:23.027Z)
  • OS Version: Windows_NT x64 10.0.14393
  • Extensions:
Extension Author (truncated) Version
debugger-for-chrome msj 3.3.0

require('async_hooks').createHook({
  init: () => {
    process._rawDebug("you won't see mee");
    a.b = c; // crash
  }
}).enable();

Promise.resolve().then(()=>{
  console.log("me neither");
});

I'm writing code using async_hooks magic and it seems that process._rawDebug does not appear in the console anymore. Worst, if a crash happens in a hook then you won't have any indication that it happened. I spent 4 hours debugging this :(

Reproduces without extensions: Yes

@vscodebot vscodebot bot added new release debug Debug viewlet, configurations, breakpoints, adapter issues labels Sep 20, 2017
@isidorn isidorn assigned roblourens and unassigned isidorn Sep 21, 2017
@roblourens
Copy link
Member

process._rawDebug goes directly to stderr and skips the debug protocol. I don't recommend using that in general. But you can also check out the insiders build and set "outputCapture": "std".

#19750

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Sep 21, 2017
@geogeim
Copy link
Author

geogeim commented Sep 21, 2017

It's not only that, the debugger does not catch the exceptions happening in hooks, the debugging session just exits without any indication that something has gone wrong.

@roblourens
Copy link
Member

Do you have the button checked to break on all exceptions? Does it work differently with chrome devtools?

@geogeim
Copy link
Author

geogeim commented Sep 21, 2017

Tried the sample code with chrome devtools and I get the same behavior. Node.js bug?

@roblourens
Copy link
Member

Thanks for trying that. Sounds like it could be a node bug, you can open an issue on https://github.com/nodejs/node

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

3 participants