[webkit-dev] Reporting exceptions from worker context to users

Patrick Mueller pmuellr at muellerware.org
Mon Aug 3 09:35:44 PDT 2009

Drew Wilson wrote:
> OK, I really wanted to gloss over this, but now Jeremy's going to make me
> elaborate :)
> There are a few things I think we will eventually need to support worker
> development:
> 1) Some way to print out the values of things in a worker's global scope.
> 2) Similar debugging support for workers that we have for page script
> (breakpoints, etc).
> 3) When the user is selecting a worker for #1/#2, it might be useful to
> indicate what the parent(s) of the worker are to help developers select the
> right worker (in case there are nested workers). Or maybe it's not very
> useful - perhaps just having the URL of the worker base script is
> sufficient. We don't know yet.

What immediately comes to mind here is the Eclipse Java debugger. 
Single "window" that shows a list of connected VMs.  Each VM contains a 
list of threads.

In the Web Browser World, "thread" might correspond to worker, and 
perhaps would be a tree of workers instead of list of threads, to 
indicate nesting.

The current story with Web Inspector is that a Web Inspector is 
associated with a window object.  So the concept of supporting muliple 
windows like Eclipse supports multiple processes wouldn't make sense. 
Doesn't rule out supporting it in the future though - a single Web 
Inspector window instead of multiple.  And someone might want to make a 
stand-alone JS debugger with the inspector code, that could somehow 
connect to multiple running JS engines simultaneously.

Then the rest of the Web Inspector story, as far as the Scripts panel, 
works the same.  Instead of just selecting a frame to operate on, you 
will also have a "worker" (or the main thread) to select on.  Selecting 
a new worker changes.

Presumably we'd change the "Call Stack" section, or add a new section 
above "Call Stack" called "Worker" (not a great name, but you know what 
I mean).

I suppose we should open an enhancement bug ...

Patrick Mueller - http://muellerware.org

More information about the webkit-dev mailing list