Skip to content
This repository was archived by the owner on May 29, 2020. It is now read-only.

Xdebug file links open in PhpStorm #52

Merged

Conversation

erikhansen
Copy link
Contributor

This PR implements support for xdebug's file_link_format to open a file in PhpStorm.

@erikhansen
Copy link
Contributor Author

Important note: If you've setup a PhpStorm project to map to the source directory (e.g. /Volumes/Server/sites/example.dev/), when you click on a file link, it will still open in PhpStorm, but it will be opened outside of the context of the project. The file will be a different color to indicate that it isn't inside the project context. If you try to set breakpoints in the file, they will not work.

Will not work:
image

Will work:
image

Update: I wrote the section below before I realized that you must have your PhpStorm project setup at /Volumes/Server/sites/example.dev/ in order to debug automated tests or CRON jobs. Follow the below steps at your own risk.

Here are two ways to make PhpStorm open your project at the /server/sites/example.dev path:

  1. Use the "File > Open Directory…" option in PhpStorm and then navigate to the project directory via the /server/sites/example.dev path.
  2. Run pstorm /server/sites/example.dev on the command line. Note: Don't cd to the /server/sites/example.dev directory and run pstorm ., as PhpStorm will set the project directory to the source directory (e.g. /Volumes/Server/sites/example.dev/).

If you have existing PhpStorm projects setup with the source directory, just close them and re-open them using one of the methods above and the path mapping should change to the /server/sites/example.dev path.

davidalger pushed a commit that referenced this pull request Dec 17, 2015
Add support to open Xdebug file links in PhpStorm
@davidalger davidalger merged commit 1ca19ba into davidalger:develop Dec 17, 2015
@erikhansen erikhansen deleted the feature/xdebug-file-link-phpstorm branch December 17, 2015 01:24
davidalger pushed a commit that referenced this pull request Jan 12, 2016
    - Added composer.json for using this as a library (vagrant-cloud support)
    - Added install of varnish to web role in a (currently) inactive state
    - Added support for Xdebug reports to link to PhpStorm file:line URLs (PR #52)
    - Added support to m2setup.sh for generating / inputing administrator details for installs (closes #41)
    - Added support to m2setup.sh for installing from enterprise meta-packages
    - Added verbose flag to the bootstrap.sh script for use in calls to bootstrap_sh method (vagrant-cloud support)
    - Added wget to rpm init routine; digital ocean images don't have it pre-installed (vagrant-cloud support)
    - Added Zend OPCache to installed extension list
    - Fixed AllowOverride directive failing to apply to DocumentRoot
    - Moved npm setup to node role for global support of npm usage (vagrant-cloud support)
    - Removed unused sites_dir env var from default list of constants passed through to bootstrap_sh
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants