Skip to content

Incorrect file paths when using docker/remote development #99

@milan-vastgoedflow

Description

@milan-vastgoedflow

Any message sent to xrDebug that contain a file link or backtrace, has paths from within my local docker environment.
Clicking the file link in the xrDebug web interface, does not open the right file. xrDebug needs to rewrite the path before showing so the link works.

Current link:

phpstorm://open?file=/app/src/Example.php&line=200

Expected link

phpstorm://open?file=/home/my-user-name/projects/ExampleApp/src/Example.php&line=200

Other projects allow you to extend certain classes or configure the path, but xrDebug does not.

Examples of other projects:

Whoops error pages:
https://github.com/filp/whoops: extend PrettyPageHandler and implement your own getEditorHref method which replaces the path of the file with the correct one.

Spatie Ignition (see source):
https://github.com/spatie/laravel-ignition/blob/main/config/ignition.php#L162-L186

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions