vscode-firefox-debug
vscode-firefox-debug copied to clipboard
Can't Debug WebWorker in Firefox from VS Code
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");
};
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?
No longer using WebWorkers. Sorry if someone else hits this.