关于调试镀铬扩展 [英] About debugging chrome extension

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

问题描述

我正在学习chrome扩展名。以下是我目前正在学习的示例:


I am learning chrome extension by example. Here is the example I currently learning: http://www.chrome-extensions.net/extensions/mappy/

There are three JavaScript files in this sample project: background.js mappy_content_script.js popup.js.

"mappy_content_script.js" is shown in the Combo box of Scripts tab of Developer Tools.
"popup.js" can be found if I right click the extension icon and choose "Inspect popup".

The problem is I can't debug "background.js" or find it in the Developer Tools. I tried insert "debugger;" in this JavaScript file. I also tried use profiling tool to record the script execution. However, when I click the link of "background.js", a blank page shows up.

Is this a bug of chrome or did I miss something? Thanks

解决方案

background.js is loaded in the background. To inspect it visit chrome://extensions, find the loaded extension, and "inspect active views" for the background script.

Edit

Below is a screenshot of the chrome extensions page. A click on the link background page opens the background page for this extension.

Additional information

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

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