adobe-research / theseus

A pretty darn cool JavaScript debugger for Brackets
Other
1.34k stars 69 forks source link

Support for Web Workers #70

Open mateon1 opened 10 years ago

mateon1 commented 10 years ago

I'm requesting a support for Javascript Workers as they aren't supported yet and I haven't found any issue about this earlier.

Right now when you interact with a worker, the onmessage/onerror callbacks in the code creating the worker are logged, but nothing inside the worker itself is logged.

alltom commented 10 years ago

It's probably that fondue functions like traceFunCall assume that they have direct access to the trace data structure, but they don't in a worker. I'm not sure exactly how that works yet, but my guess is that those functions need to check whether they're in a worker and communicate differently with fondue. There is probably a constellation of problems this raises (ordering, etc). In addition, workers are typically used for CPU-intensive tasks where the overhead of fondue might not be acceptable... I guess we'll see!

I probably won't get to this in the near future, but thanks for opening a ticket so that we can track it! As with any issues, I welcome patches. :)