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

Windows Jump to Line #8

Closed
veryard opened this issue Jan 7, 2021 · 5 comments
Closed

Windows Jump to Line #8

veryard opened this issue Jan 7, 2021 · 5 comments
Assignees

Comments

@veryard
Copy link

veryard commented Jan 7, 2021

Hello,

Just downloaded the tool to have a play around with it, I added the following line to a controller class:

ray('hello world!', ['an array'], app());

And it successfully logs to Ray which is great, but it says the line is the actual helpers file for ray, I did update the preferences so it's using VSCode, it should of taken me to my controller class right?

image

Great job on the tool, am looking forward to using it more often!

Thanks.

@freekmurze freekmurze self-assigned this Jan 7, 2021
@freekmurze
Copy link
Member

Right, I'll investigate this soon!

@freekmurze
Copy link
Member

I'm thinking this is fixed in one of the latest released.

For Docker based projects, it might be helpful to set up a remote_path, local_path

See: https://spatie.be/docs/ray/v1/getting-started/configuring-ray

@groot406
Copy link
Contributor

groot406 commented Jan 9, 2021

I'm having this issue too (on Mac Osx).
It seems to be depending on how I call ray to send a log.

ray('wrong'); // Results in a link to helpers.php:28
ray()->send('correct'); // Results in a link to the correct file and line number.
ray()->ban(); // Results in a link to the correct file and line number.

I'm running:
PHP: 7.4.2
Ray: 1.3.4
Ray App: 1.0.7
The code runs on a local webserver (apache) (no docker/vagrant)

If I change Spatie\Ray\Origin\DefaultOriginFactory, and update line 32:
from: if ($this->startsWith($frame->file, __DIR__)) {
to: if ($this->startsWith($frame->file, dirname(__DIR__))) {
all seems to work.
I've create #80 to change this.

@freekmurze
Copy link
Member

Thanks again for that PR @groot406

@veryard I've just released a new version with that fix (https://github.com/spatie/ray/releases/tag/1.3.5) Could you update to that version, and confirm that it is fixed for you?

If it is, please close this issue.

@veryard
Copy link
Author

veryard commented Jan 9, 2021

Hey @freekmurze,

Looks like it's working perfectly now!

image

Thanks :D

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

3 participants