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?
Asked
Active
Viewed 948 times
2
-
The Webkit nightlies have web worker debugging facilities if I recall correctly. – zneak Sep 12 '10 at 16:22
-
Exact duplicate of [How to debug web workers](http://stackoverflow.com/questions/2323778/how-to-debug-web-workers) – Dan Dascalescu Feb 16 '16 at 19:33
2 Answers
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
-
1This 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