简体   繁体   English

调试Webworker

[英]Debug a Webworker

What's the best way to debug a webworker? 调试Webworker的最佳方法是什么? My worker appears to be failing somewhere, but I don't appear to be able to log things to the console to figure out what's going on. 我的工作人员似乎在某处发生故障,但是我似乎无法将内容记录到控制台以了解发生了什么。 Is there a way using firebug, or webkit's inspector I can run javascript in the webworker context? 有没有一种方法可以使用Firebug或Webkit的检查器在Webworker上下文中运行javascript? Is there a better way of doing this? 有更好的方法吗?

Debugging workers is now available in chrome. chrome中现在提供了调试器。

look out the [article of chromium blog] 看看[铬博客的文章]

http://blog.chromium.org/2012/04/debugging-web-workers-with-chrome.html http://blog.chromium.org/2012/04/debugging-web-workers-with-chrome.html

At the moment no browser supports debugging of web workers. 目前,没有浏览器支持Web Worker的调试。 I've tested 我测试过

  • Chrome 7.0.517.24 dev Chrome 7.0.517.24开发
  • Firefox 3.6.10 Firefox 3.6.10
  • WebKit nightly r68636 WebKit每晚R68636

There is a nice article by Nicholas Zakas about debugging web workers. Nicholas Zakas有一篇不错的文章 ,介绍了调试Web Worker。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM