简体   繁体   English

调试Chrome扩展程序弹出脚本的最快方法

[英]Quickest way to debug Chrome Extension popup scripts

I have the Chrome Apps and Extensions developer tool installed to debug my Chrome Extension. 我已安装Chrome应用和扩展程序开发人员工具来调试我的Chrome扩展程序。 However, to debug the popup script running in the popup window, you have to perform the following steps: 但是,要调试在弹出窗口中运行的弹出脚本,您必须执行以下步骤:

  1. Refresh the Chrome Extension on the Extensions page 在“扩展程序”页面上刷新Chrome扩展程序
  2. Right click the icon next to the url bar 右键单击网址栏旁边的图标
  3. Select "Inspect Popup" 选择“检查弹出窗口”
  4. Set breakpoints 设置断点

The real annoying part about this is the popup window has to be re-opened every time a change happens. 真正令人讨厌的部分是每次发生更改时都必须重新打开弹出窗口。 Debugging background scripts I don't have as much of a problem with, because the background script debug page stays open after you refresh the chrome extension. 调试后台脚本我没有什么问题,因为刷新chrome扩展程序后,后台脚本调试页面保持打开状态。 But for popup scripts, the popup window along with the popup debug page keeps closing and it becomes a really tedious, repetitive task to re-open it when debugging a lot. 但是对于弹出脚本,弹出窗口以及弹出调试页面会一直关闭,并且在进行大量调试时重新打开它是一项非常繁琐且重复的任务。 Is there no other way to more easily start debugging Chrome Extensions popup scripts? 有没有其他方法可以更轻松地开始调试Chrome扩展程序弹出脚本?

As i understood you have a pop up while tapping the icon in the URL bar 据我了解,您在点击网址栏中的图标时会弹出一个窗口

In order to debug you can use weinre remote debugger ,Which may solve your problem 为了进行调试,您可以使用weinre远程调试器,这可以解决您的问题

apache weinre apache weinre

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在内容脚本中打开弹出窗口(Chrome 扩展) - Open popup in content scripts(Chrome extension) 调试 Chrome 扩展的 popup.html? - Debug popup.html of a Chrome Extension? 在内容脚本中定义但在弹出窗口中无法访问的脚本(Chrome扩展程序) - Scripts defined in content scripts but not accessible in popup (Chrome extension) 有没有一种方法可以请求访问Chrome扩展程序弹出窗口的麦克风? - Is there a way to request microphone access for a chrome extension popup? Chrome扩展程序和内容脚本只能以“检查弹出窗口”模式进行通信 - Chrome extension and content scripts can communicate only in “inspect popup” mode 有没有办法将.cshtml文件用作chrome扩展名中的弹出窗口? - Is there a way to use a .cshtml file as the popup in a chrome extension? Chrome扩展程序从后台脚本启动browser_action弹出窗口 - Chrome extension initiate browser_action popup from background scripts 如何配置chrome developer工具不调试所有扩展脚本 - how to configure chrome developer tool not to debug all extension scripts 当用户在单独的镀铬窗口上时,有没有办法关闭chrome扩展弹出窗口? - Is there a way to close a chrome extension popup, when the user is on a separate chrome window? 在 Chrome 扩展脚本之间共享功能的最佳方式是什么? - What is the best way to share functions between Chrome extension scripts?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM