How to debug a Web Worker
Pretty much immediately I hit a problem, as Web Workers do not have access to the window (or document) property of the calling document, both
alert() are undefined. Nightmare! Apparently access to these properties is not thread safe.
The best solution in my opinion is console4Worker on GitHub.
Simply include the library as the first line in your WebWorker script
console.group() etc. etc. away as you normally would. Perfect!