vscode-firefox-debug icon indicating copy to clipboard operation
vscode-firefox-debug copied to clipboard

Can't Debug WebWorker in Firefox from VS Code

Open crazyjat opened this issue 1 year ago • 1 comments

I'm trying to debug a WebWorker I am running through Firefox. Set breakpoints in worker file don't get hit. I have searched online and found no help for how to do this.

Example:

Browser

const worker = new Worker(new URL("./worker", import.meta.url));
worker.onmessage = (e) => {
    console.log(e.data);
};

worker.postMessage("test");

Worker

self.onmessage = (e) => {
    self.postMessage("done");
};

crazyjat avatar Feb 15 '24 19:02 crazyjat

I just tried to debug a worker and I was able to set a breakpoint and get it to pause fine. Is your worker running? Can you see it in the threads panel?

nchevobbe avatar Feb 19 '24 15:02 nchevobbe

No longer using WebWorkers. Sorry if someone else hits this.

crazyjat avatar Apr 18 '24 23:04 crazyjat