JavaScript:如何将错误信息打印到错误控制台? [英] JavaScript: How do I print a message to the error console?

查看:114
本文介绍了JavaScript:如何将错误信息打印到错误控制台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将消息打印到错误控制台,最好包括一个变量?

How can I print a message to the error console, preferably including a variable?

例如,

print('x=%d', x);


推荐答案

安装 Firebug ,然后你可以使用 console.log(...) console.debug(...)等(请参阅文档更多)。

Install Firebug and then you can use console.log(...) and console.debug(...), etc. (see the documentation for more).

这篇关于JavaScript:如何将错误信息打印到错误控制台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆