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()方法。这里是控制台对象的文档,因此您可以选择最适合您使用的方法。

更多相关文章

  1. contains和compareDocumentPosition 方法来确定是否HTML节点间的
  2. 利用javascript动态加载头部出现点击事件与hover事件无效解决方
  3. 类似jQuery的extend扩展方法的实现
  4. 如何在onchange()事件后调用的方法中将焦点设置为输入字段?
  5. jsPDF中使用.text()方法的字母间距
  6. javascript 截取字符串方法汇总
  7. 关于JavaScript方法,设置GridView中首项CheckBox勾选,整列全部勾选
  8. javascript的密封对象之seal(),isSealed()方法
  9. 1. 总是从ID选择器开始继承   在jquery中最快的选择器是ID选择

随机推荐

  1. 更新后-崩溃com.google.android.gms:play
  2. Android 进阶:Fragment 源码深入理解
  3. 显示操作栏和向上导航 - Android
  4. Android View事件传播机制
  5. 给讲讲它吧---AndroidManifest.xml
  6. 使用RelativeLayout动态添加View总结
  7. android技巧:把自己的app变成手机系统自
  8. Android获取明天日期
  9. ViewPager的循环滑动
  10. android中fragment和activity之间相互通