This is just a very very thin wrapper which emulates the web worker API inside the page: no concurrency, but it lets you debug your web worker script with <insert your web debugger here>.
Just include the script before you invoke the Worker constructor. That's it.
Grab it here: lazyworker.js
Probably you could fix both the aforementioned issues using an iframe: here's a broken implementation