spatie / ray

Debug with Ray to fix problems faster
https://myray.app
MIT License
568 stars 102 forks source link

Cannot change the way links to files are generated for PHPSTORM (Windows) #621

Closed blchv closed 2 years ago

blchv commented 2 years ago

Before creating a new bug report I was not able to find any information on this topic

Describe the bug It is not possible to open a file in PHPSTORM by clicking the file link in the Ray Windows app. phpstorm://open?file=[path/to/file] is not working for me even after the steps suggested in the documentation (reg edit and stuff). That being said, I have another way to open files via link.

I can open files using the built-in server of PHPSTORM by accessing a url like this: http://localhost:63342/api/file/[path/to/file]. (Configuration for this is in Additional Context.)

I am looking for a way to instruct Ray to replace phpstorm://open?file= with http://localhost:63342/api/file/ so I don't have to wait for JetBrains to fix the protocol.

Is there a way to change how the file link is generated?

Versions

To Reproduce Steps to reproduce the behavior:

  1. Generate a message for the Ray Windows app by calling ray(...args) in a PHP file. image

  2. Execute the file and receive the message in the Windows app.

  3. Click the link that is supposed to open the file in the configured code editor image

  4. Observe the error image

Expected behavior Be able to open files in PHPSTORM on Windows 10 successfully.

Desktop (please complete the following information):

AdrianMrn commented 2 years ago

I've created an issue for this in our internal issue tracker. I'll probably add a "custom" option to the selectinput, which allows you to enter your own string that accepts {FILE} and {LINE} placeholders that will be replaced when clicking on a file link.

AdrianMrn commented 2 years ago

The above change will be included in the next release (in a few weeks).

blchv commented 2 years ago

@AdrianMrn thanks! I'm looking forward to the next version. Take care!