2

What's the best way to debug a 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? Is there a better way of doing this?

Michael
  • 1,380
  • 2
  • 10
  • 14

2 Answers2

4

Debugging workers is now available in chrome.

look out the [article of chromium blog]

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

kongaraju
  • 9,344
  • 11
  • 55
  • 78
2

At the moment no browser supports debugging of web workers. I've tested

  • Chrome 7.0.517.24 dev
  • Firefox 3.6.10
  • WebKit nightly r68636

There is a nice article by Nicholas Zakas about debugging web workers.

Fabian Jakobs
  • 28,815
  • 8
  • 42
  • 39
  • 1
    This is essentially what I already had. Chrome has a pseudo-debugger for webworkers, but it basically just puts them in an iframe and connects the onmessage/postMessage handlers properly. – Michael Oct 03 '10 at 19:08