So I’ve been working on an advanced web application for a while now. Using Google Gears and the advanced features it uses like client-side DB storage,Javascript worker threads, and offline storage. The first parts of the app, developing the server-side code in ASP.NET MVC, the basic UI design and how users interacted with the app for high-speed data input, went just fine. The problem specifically is Javascript worker threads, and the inability to debug them from any browser.
I spend most of my Thursday at work trying to figure out why the worker threads weren’t, well, working. It turns out that they’re incredibly hard to debug. Impossible actually, because they’re isolated from the browser process completely, there is no way to log events to the console, alert() or anything other than perhaps the DB connection. But if the DB doesn’t show the entries it was supposed to make, well, you’re out of luck.
I had managed to proceed a little further in my debugging using Firefox and Firebug (since it will show console log entries from the Google Gears plug-in but not from the JS), however as soon as I got a useful point, Firefox crashed. Repeatedly. At the same point. So that was of no use anymore.
The only way it seems is to build it all in a single thread, debug it, verify it, and then separate it out into a worker thread and hope that the worker thread executes properly. This is no way to develop HTML5 apps.

0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.