question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Step into worker broken on macOS

See original GitHub issue
  • Debug the web-worker-ts demo
  • Break on the new Worker line, press step in
  • It doesn’t break in the worker

Works on linux. This is why cross thread constructor source map is failing on mac.

On Linux there is an extra Debugger.paused event fired before the worker is loaded, which has the asyncCallStackTraceId that we need to pause when the worker is loaded. This isn’t sent on mac. Chrome bug right, or do you see anything else?

ww-mac.txt ww-linux.txt

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
connor4312commented, Jan 13, 2020

Chatting with @dgozman:

Connor Peet One kind of ugly idea I had was to stash the last call frame we saw before stepping in, and then looking for that frame in the async stack of pause events to see if we got here from an async step.

​Dmitry Gozman I see the problem, let me think a bit

Dmitry Gozman Your solution seems ok for now, but I’d suggest to compare all call frames up to asyncStackTraceId to be on the safe side.

Dmitry Gozman The right fix would be to change v8 to emit “ambiguous” pause reason with both “instrumentation” and “asyncStep”. I can do that soon-ish, but it will take time to reach stable Chrome version

This scenario is an edge case, and the call frame implementation would add a moderate amount of complexity to an already fairly complex scenario. Additionally, there is a workaround to manually set a breakpoint on the first line of the worker file. Therefore I would prefer to leave this as-is awaiting the upstream fix, unless we get user feedback that this is problematic for them.

0reactions
roblourenscommented, Jan 13, 2020

That’s fine with me. Debugging workers at all is totally new so we aren’t losing anything.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Worker terminates with error in Mac OS #44151 - nodejs/node
I am able to reproduce it almost consistently in Vitest core tests: Download Vitest repo (only node/reproduce branch is needed); run. pnpm ...
Read more >
If an error occurred while updating or installing macOS
Use Disk Utility to repair your startup disk. Then try updating or installing macOS again. Install from macOS Recovery. Install while your Mac ......
Read more >
MacBook Pro workers breaking out of plant – three reasons
The three reasons MacBook Pro workers broke out of plant and fought with guards. More details have emerged following eye-opening video footage ...
Read more >
[10 Ways] Fix MacBook Pro Won't Turn on/Start/Boot up
The issue that Mac won't turn on or start up toubles many. We'll show you 10 solutions on how to solve MacBook Pro...
Read more >
Set up macOS runners - GitLab Docs
To run a CI/CD job on a macOS runner, complete the following steps in order. ... Edit this page to fix an error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found