-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not possible to debug worker #13572
Comments
This is the
This is the
I also found this: Line 448 in 1fb5858
It seems to indicate, that the inspector will never stop in worker code. I launched Deno with VSCode was showing either the output of the main worker or the output of the worker in the debugger view. It seemed to choose either one indeterministically. |
@jonek that flag only indicates that debugger shouldn't break on the first line of worker code. I will verify how it works in VSCode, but in Chrome Devtools ( |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. |
@bartlomieju - Any updates on this? Is this a limitation of deno? Or, of the deno VS Code extension? I have only been able to get this to work if I use it with the Chrome Devtools ( |
This is something I will be tackling in October as I'm OOO for the next two weeks. |
FYI I'm investigating this issue - it turned out to be much more complex than I expected. The way it works for Node is by using a custom "NodeWorker" domain for Chrome Devtools Protocol that is not really standardized. I will try to get in touch with VSCode team to see if there's a way forward to make it work more like in browser, if that won't be possible we'll look into using the same mechanism as Node does. |
Anyone interested in working on this on a sponsored basis? This is a major annoyance, but I’m not at all familiar with the internals at this level so I’d be willing to fund this work. Let me know. |
I managed to trigger a breakpoint from code run in a worker.
|
To my surprise I found a workaround to get worker breakpoints to hit in VSCode.
Unfortunately this is still highly inconsistent, I think the debugger accidentally attaches to the same process twice a lot of the time. If anyone knows how to explicitly have the ports between main and workers be different or different ws addresses let me know. |
It seems the debugger in VSCode and Chrome never stops at breakpoints in worker code.
Are there any variables, specific Deno command line flags or worker options I have to use to be able to debug worker code?
The text was updated successfully, but these errors were encountered: