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

Enable debugpy to work with domain sockets #1607

Open
tinglongliao-db opened this issue Jun 21, 2024 · 2 comments
Open

Enable debugpy to work with domain sockets #1607

tinglongliao-db opened this issue Jun 21, 2024 · 2 comments

Comments

@tinglongliao-db
Copy link

If I understand correctly, the current version of debugpy only supports listening on network sockets. However, due to security limitations in our use case, we are unable to use network sockets. Could you add support for communication with debugpy via Unix domain sockets, or is this feature already available?

@karthiknadig
Copy link
Member

This is not available yet. I agree with adding another option for communication.

But my recommendation would be to use NamedPipes on windows, and fifo on linux/mac. Not UDS. UDS is not supported on WSL2, only in WSL1. So it blocks us from using it on WSL. Firewall can block UDS as well. So, I recommend fifo.

@holmanb
Copy link

holmanb commented Aug 9, 2024

If I understand correctly, the current version of debugpy only supports listening on network sockets. However, due to security limitations in our use case, we are unable to use network sockets. Could you add support for communication with debugpy via Unix domain sockets, or is this feature already available?

This would be useful for me as well. My use case is for debugging Python code in container and virtual machine environments that lack network access. My container use cases could be satisfied by either fifo or Unix domain sockets mounted into the container from the host, but for virtual machines I think that vsock is probably required (which should work for Windows and Linux).

Perhaps we could just implement multiple protocols to support all of the above listed use cases and then allow the user to specify a URI that tells debugpy which protocol to use:

--listen unix://path/to/sock
--listen vsock://<cid>:<port>
--listen file://path/to/named_pipe_or_fifo  # debugpy could identify which platform it is on to discern whether to use named pipe or fifo

@judej judej assigned debonte and unassigned debonte Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants