Skip to content
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

Can't enable debug messages when using client in a web worker #5104

Open
1 of 2 tasks
rosejn opened this issue Jun 25, 2020 · 1 comment
Open
1 of 2 tasks

Can't enable debug messages when using client in a web worker #5104

rosejn opened this issue Jun 25, 2020 · 1 comment
Labels
enhancement New feature or request package:socket.io-client This concerns the "socket.io-client" package

Comments

@rosejn
Copy link

rosejn commented Jun 25, 2020

You want to:

  • report a bug
  • request a feature

Current behavior

The documentation says to set localStorage.debug = '' in order to turn on debug messages, but when using socket.io-client from inside of a web worker we don't have access to localStorage. We tried explicitly calling debug.enable('') from the worker, but that doesn't seem to work either.

As doing more work in terms of I/O and processing (we are loading large datasets into the client) is moving to worker threads this is likely to become a more common issue. I'm not familiar enough with the setup to know whether this needs to be handled by socket-io.client or the debug library that it uses.

@darrachequesne
Copy link
Member

Yes, I think it should be handled by the debug dependency directly. Please see debug-js/debug#589.

@darrachequesne darrachequesne added the enhancement New feature or request label Sep 30, 2020
@darrachequesne darrachequesne transferred this issue from socketio/socket.io-client Jul 9, 2024
@darrachequesne darrachequesne added the package:socket.io-client This concerns the "socket.io-client" package label Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request package:socket.io-client This concerns the "socket.io-client" package
Projects
None yet
Development

No branches or pull requests

2 participants