-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
node script file that extension name is '.njs' can't be debug,throw err:Cannot launch program setting the 'outFiles' attribute might help #33051
Comments
I've never heard of a file extension "njs". |
In /Microsoft VS Code/resources/app/extensions/javascript/package.json So I name my node script files to '*.njs', The above extension names will throw err except '.js' |
@purplestone note above the list of extensions includes I'm not sure if renaming your module to |
@weinand this looks to be an issue in https://github.com/microsoft/vscode-node-debug2 The javascript debugger only wants to debug files where if (utils.isJavaScript(programPath)) { is This test is only satisfied if the const NODE_SHEBANG_MATCHER = new RegExp('#! */usr/bin/env +node');
//...
if (name.endsWith('.js')) {
return true;
}
//...
if (NODE_SHEBANG_MATCHER.test(line)) { Adding
to the top of the affected The assumption seems to be that |
Hi, I can not debug node.js modules with the Thanks for your solution @MikeRalphson |
Fix for not beeing able to debug a ,mjs file in Code. See microsoft/vscode#33051 for more details.
Fix for not beeing able to debug a `.mjs` file in Code. See microsoft/vscode#33051 for more details.
I've added the extensions ".js", ".es6", ".jsx", ".mjs" to the list of recognised JavaScript extensions. |
Verify that you can debug a JavaScript program if the file extension is ".es6", ".jsx", ".mjs". |
@weinand It works with ".mjs" extension. |
launch.json:
Create a file name : go.njs:
press F5 to debug throw: Cannot launch program ”xxx\js\go.njs“ setting the 'outFiles' attribute might help
But I rename that file extension name '.njs' to '.js', It works well.
The text was updated successfully, but these errors were encountered: