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

Using debugPort with a socket path does not seem to work with a relative path. #258

Closed
louim opened this issue May 19, 2023 · 2 comments · Fixed by #279
Closed

Using debugPort with a socket path does not seem to work with a relative path. #258

louim opened this issue May 19, 2023 · 2 comments · Fixed by #279

Comments

@louim
Copy link

louim commented May 19, 2023

Hello, this issue is related to ruby/debug#982.

Since the autogenerated socket name was too long, I decided to use a local socket path:

{
    "type": "rdbg",
    "name": "Attach with rdbg",
    "request": "attach",
    "debugPort": "tmp/rdbg.sock",
}

However with this in conjunction with RUBY_DEBUG_OPEN=true RUBY_DEBUG_SOCK_PATH=tmp/rdbg.sock rails s, I'm always the following error when trying to Attach to the started process.
Screenshot 2023-05-19 at 7 31 22 PM

I would have expected the config to look up the file relative to the workspace root directory? Using an absolute path to the same folder works: "debugPort": "/Users/louis-michel.couture/work/my_project/tmp/rdbg.sock",.

I also tried:

  • "debugPort": "./tmp/rdbg.sock",
  • "debugPort": "../tmp/rdbg.sock", thinking it was maybe relative to the launch.json location.
    But both of those didn't work.
ono-max added a commit to ono-max/vscode-rdbg that referenced this issue Jun 3, 2023
Closes ruby#258

We only support a relative path from a workspace directory
@ono-max ono-max added enhancement New feature or request and removed enhancement New feature or request labels Jun 4, 2023
ono-max added a commit that referenced this issue Jun 8, 2023
Closes #258

We only support a relative path from a workspace directory
@ono-max
Copy link
Member

ono-max commented Jun 8, 2023

@louim
Although we supported a relative path in the socket path, you can write as follows:

"debugPort": "${workspaceFolder}/foo.sock"

@louim
Copy link
Author

louim commented Jun 8, 2023

@ono-max thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants