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

Any way to easily name the socket files? #1016

Closed
andyjeffries opened this issue Sep 12, 2023 · 2 comments
Closed

Any way to easily name the socket files? #1016

andyjeffries opened this issue Sep 12, 2023 · 2 comments

Comments

@andyjeffries
Copy link
Contributor

Your proposal
For our project we use a web process and a worker process (multiple of each in production, but as I'm in this repo, obviously only thinking development). With the current mechanism (as I understand it), each gets a socket created that is named after the pid of the running process, with no context of what process type it is and therefore in VS Code when it lists the sockets to connect to a) the most detailed part doesn't fit widthwise and is trimmed, and b) it then adds another step to go and look up the PID of the process to connect to. It would be nice if there was a way of naming the socket files and/or choosing their path so that users can recognise them more easily in VS Code.

Additional context
I tried running:

RUBY_DEBUG_OPEN=true RUBY_DEBUG_SOCK_PATH=./tmp/sockets/fc-worker-dbg.sock bundle exec sidekiq -t 10 -C config/sidekiq.yml

But the command that VS Code's extension uses to list the sockets doesn't find them:

rdbg --util=list-socks

Maybe this is currently achievable and I'm just missing how to configure it, but if that's the case I'm happy to raise a PR for the docs once someone educates me :-)

@ko1
Copy link
Collaborator

ko1 commented Sep 25, 2023

Could you add same envval RUBY_DEBUG_SOCK_PATH for VSCode?

@andyjeffries
Copy link
Contributor Author

I don't think this is necessary with #1017, it solves the same problem (being able to name the socket in some way recognisably). Combined with ruby/vscode-rdbg#349 this is a fuller worker solution for us.

I'm happy for this #1016 to be closed.

@ko1 ko1 closed this as completed Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants