console.log() 函数在 Electron 应用程序开发人员工具上停止工作
直到最近,我在 Electron 中广泛使用了 console.log,无论是在开发者工具控制台中的代码和监控结果,还是直接在开发者中输入 console.log("something or other")
工具控制台。
突然间它不再起作用了。从 JS 脚本运行 console.log() 时没有任何反应,如果我在开发人员工具控制台中键入 console.log("test") ,则响应为“未定义”。 console.log 本身(无括号)显示 f (){}
,而不是 function log() {[native code]}
,这也许可以解释功能的缺乏?
试图弄清楚这种情况是如何发生的以及如何解决它 - 我是否不小心点击了某些首选项或设置?失去这一点真是太可惜了。
Until recently I've used console.log extensively in Electron, both from code and monitoring results in the Developer Tools console, and also by typing console.log("something or other")
directly in the Developer Tools console.
All of a sudden it's no longer working. Nothing happens when running console.log() from a JS script, and if I type console.log("test") in the Developer Tools console the response is "undefined". console.log by itself (no parentheses) shows ƒ (){}
as opposed to function log() {[native code]}
, which perhaps explains the lack of functionality?
Trying to figure out how that might have happened and how to resolve it -- did I accidentally click on some preference or setting somewhere? Quite the PITA to lose that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
console.log() 停止工作的地方
console.context().log() 是迄今为止一直在工作的替代命令。
where console.log() stopped working
console.context().log() is the alternative command that so far has been working.