简体   繁体   English

使用带鱼壳的调试NPM模块

[英]Using debug NPM module with fish shell

I am currently using the npm module titled debug during development of a Node.JS application. 我目前在开发Node.JS应用程序时使用名为debug的npm模块。 As I understand it, it outputs the debugging results through the use of the DEBUG environment variable (?) using the bash command: 据我了解,它通过使用bash命令使用DEBUG环境变量(?)输出调试结果:

DEBUG=* node index.js

This works as intended for bash, but I was wondering what the equivalent would be using the Fish shell, I've just started using it and I like it but it would be great if I could get this functionality as well. 这可以用于bash,但我想知道使用Fish Shell的效果如何,我刚刚开始使用它,我喜欢它,但是如果我也能获得此功能,那将是很好的。

Thanks 谢谢

For fish, to set an environment variable for a specific command, just use env 对于鱼,要为特定命令设置环境变量,只需使用env

env DEBUG="*" node index.js

You'll have to quote or escape the wildcard. 您必须引用或转义通配符。

This approach works for bash too. 这种方法也适用于bash。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM