控制台在node . js中没有“debug”方法吗?
16lz
2021-01-22
The console.debug()
function can be invoked in the browser console.
可以在浏览器控制台中调用console.debug()函数。
However there is one error when console.debug()
is called in Nodejs.
然而,在node .debug()中调用时存在一个错误。
TypeError: Object #<Console> has no method 'debug'
at Object.<anonymous> (c:\share\node\receive.js:20:9)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:929:3
Why? Is there any way to replace console.debug
in Nodejs?
为什么?在node .debug中是否有替代console.debug的方法?
5 个解决方案
#1
17
There's no console.debug() method in NodeJS. Here is the documentation for the console object, so you can choose the best method for you to use.
NodeJS中没有console.debug()方法。这里是控制台对象的文档,因此您可以选择最适合您使用的方法。
更多相关文章
- contains和compareDocumentPosition 方法来确定是否HTML节点间的
- 利用javascript动态加载头部出现点击事件与hover事件无效解决方
- 类似jQuery的extend扩展方法的实现
- 如何在onchange()事件后调用的方法中将焦点设置为输入字段?
- jsPDF中使用.text()方法的字母间距
- javascript 截取字符串方法汇总
- 关于JavaScript方法,设置GridView中首项CheckBox勾选,整列全部勾选
- javascript的密封对象之seal(),isSealed()方法
- 1. 总是从ID选择器开始继承 在jquery中最快的选择器是ID选择