Skip to content
This repository was archived by the owner on Jan 2, 2025. It is now read-only.
This repository was archived by the owner on Jan 2, 2025. It is now read-only.

Support on file link format #80

@FlorentTorregrosa

Description

@FlorentTorregrosa

Hello,

I am testing drupal-debug on my personal stack and wanting to use all the features of the pretty exceptions, in my drupal-debug.yml I have set:

file_link_format: phpstorm://open?url=file://%%f&line=%%l&/project/>/home/florent/sites/docker-drupal-project-d8/

After finding the syntax and seing that as I am not directly on the host (actually in a Docker container), I added the substitution from VM path / host path.

I have three questions:

  1. Could the VM path (/project/) be handled in an environment variable?
  2. Could the host path (/home/florent/sites/docker-drupal-project-d8/) be handled in an environment variable or even more dynamically?
  3. Now I have links in my exception trace like phpstorm://open?url=file://%/home/florent/sites/docker-drupal-project-d8/www/sites/default/settings.php&line=%39 seeing [DisplayPrettyExceptions*] File link format cannot be used #69, I know understand the discussion about '%' escaped at the Drupal Developer Days, but even if I remove the '%' part in the link, the link won't open the file in PhpStorm. I have went through stackoverflow, JetBrains issue tracker and old blog posts (can't find recent ones), it seems that there was an option in "Tools > Create Command-line Launcher" (http://davidbu.ch/mann/blog/2014-05-06/open-php-stack-trace-links-phpstorm.html) and now it seems that this option is only available if you have installed the Jetbrains Toolbox, unfortunately I have installed PhpStorm using Snap. So my question is: is it still possible to open the file in PhpStorm? If yes could you give me a clue about that please?

And a last remark, maybe documenting a file_link_format as example to guide newcomers would be good. Yes after a quick search you can find it, but also as this project is to improve DX, having that set out of the box (if possible) should be good.

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