Skip to content

Debug snippets

Grant Marvin edited this page Sep 1, 2017 · 2 revisions

Debugging workers

Sometimes code works in the foreground tab, but not in a worker. To debug, it's best to set workerCount to 1. I haven't figured out how to attach devtools to a running worker, which would be ideal.

http://localhost:3100/worker?id=0 lets you run in a visible chrome tab

Zen.workers[0].tab.Page.reload() from the server process will pick up code changes (console.log, etc) and rerun.

Clone this wiki locally