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

Support on file link format #80

Open
FlorentTorregrosa opened this issue Jun 19, 2019 · 0 comments
Open

Support on file link format #80

FlorentTorregrosa opened this issue Jun 19, 2019 · 0 comments

Comments

@FlorentTorregrosa
Copy link

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.

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

1 participant