如何调试Chromium扩展? [英] How do I debug a Chromium extension?

查看:180
本文介绍了如何调试Chromium扩展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用 console.log()调试Chromium扩展名,但是我注意到我的JavaScript控制台中没有任何内容。我认为扩展名的控制台对象与文档有权访问不一样,所以我如何将一个变量放入JSON中,以便我可以看到结果。我正在寻找类似于 console.log()与Firebug。

I'm trying to debug a Chromium extension with console.log(), but I noticed that nothing is appearing in my JavaScript console. I assume the console object for the extension is not the same console that the document has access to, so how do I dumb a variable into JSON so I can see the result. I'm looking to get something like console.log() with Firebug.

推荐答案

默认的Javascript控制台不适用于扩展,为了查看扩展的控制台,您必须:

The default Javascript console does not work for extensions, in order to see the console for the extension, you have to:


  • 右键单击浏览器图标

  • Right click on the Browser icon

单击检查弹出窗口

该窗口具有您的分机的控制台。

That window has the Console for your extension.

这篇关于如何调试Chromium扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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