我试图调试Chrome扩展程序,但debugging tutorial对我不起作用。当我点击inspect popup
时,调试窗口会打开,并立即关闭。
我还尝试打开扩展程序的窗口,右键单击它,然后选择"检查元素,"但结果相同。
这是HTML文件。我删除了javascript文件,只是为了确保无法解决问题。
<!doctype html>
<html>
<head>
<title>Getting Started Extension's Popup</title>
<style>
body {
min-width: 357px;
overflow-x: hidden;
}
img {
margin: 5px;
border: 2px solid black;
vertical-align: middle;
width: 75px;
height: 75px;
}
</style>
<!--
- JavaScript and HTML must be in separate files: see our Content Security
- Policy documentation[1] for details and explanation.
-
- [1]: http://developer.chrome.com/extensions/contentSecurityPolicy.html
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="popup.js"></script>-->
</head>
<body>
<img id="kitty-pic" src="http://www.tehcute.com/pics/201109/kitten-bouquet-big.jpg" />
<img id="puppy-pic" src="https://c2.staticflickr.com/6/5347/7147821499_52ba051aaa_z.jpg" />
</body>
</html>
答案 0 :(得分:2)
我需要关闭并重新打开扩展开发模式的chrome才能实际激活。