-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
NodeJs Debug, add some default settings #69959
Comments
outputCapture just exists for some special scenarios, I wouldn't recommend it as a default. It might be good to show off skipFiles by default. I think not enabled by default, but included in new generated configurations by default. What do you think @auchenberg or @weinand? |
@roblourens I don't have strong opinions about |
I can't decide whether adding that as an internal default is too "opinionated" or not. Debugging inside node internal modules is a legitimate thing to do, but ending up in them by accident, especially the async ones, is annoying. So adding it to the autogenerated launch configs could be a way to advertise it without making people have to google for how to turn it off. But yeah it is counter to the goal of making the launch config minimal. So anyway I probably won't do anything about this right now. |
Hi @roblourens -- just wondering about Is there any downside to default |
|
So I'm trying to const { createLogger, format, transports } = require('winston');
const { combine, timestamp, prettyPrint } = format;
const logger = createLogger({
format: combine(
timestamp(),
prettyPrint()
),
transports: [new transports.Console()]
})
logger.info('hey');
console.log('hi'); I'd expect to see both messages on the console, but since winston's console transport writes directly to stdout, only I think I understand your point about the downside of |
Then in a normal case, logs will show up twice. It's not possible to dedupe them because they can be formatted differently. |
|
I think we should add the above Need to modify here: https://github.com/Microsoft/vscode-node-debug/blob/master/src/node/extension/configurationProvider.ts#L59 and the snippets here: https://github.com/Microsoft/vscode-node-debug/blob/master/package.json#L179 (@connor4312 note that this is in vscode-node-debug, not vscode-node-debug2) |
@connor4312 please make sure that there is a test item and an entry in the October 2019 release notes for this. |
When creating a launch.json with node, the following settings should be added by default: outputCapture and skipFiles.
This way when stepping in and out you dont find trapped in the async hooks, and so on.
If not possible both, at least skipFiles.
The text was updated successfully, but these errors were encountered: