-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Is it possible to make xdebug.file_link_format work from a VM #14340
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
Comments
AFAIK, no |
Maybe @nicolas-grekas has an answer :-) ? |
Using ini_set in your front controller? |
yes, a little too much IMO |
Maybe path mapping is rather a problem that JetBrains should solve. For remote debugging, they have solved this already, so maybe it's not a hard thing for them to extend this feature to those links. |
@derrabus I use phpstorm but the problem is the same with sublime text or any other IDE |
@dupuchba Sure, and you use Symfony, but the problem is the same with Wordpress or Zend Framework. My point is that this mapping is something very specific to your development environment. Another developer of your team probably needs different path mapping settings. This is why I'd rather implement such a feature into the IDE than into an application framework. |
According to your screenshot, you are on OS X. In that case, a pretty simple solution is to use a custom URL scheme which acts as a wrapper around a URL using |
@BlueM Ty for the solution but IMO that's more an "hack" than a real solution for my problem (my co-workers have exactly the same issue on ubuntu). |
Maybe with the Remote Call plugin? |
I made a bundle with a quick fix, it's not a good solution but works for now. I only tested it with the symfony IDE configuration, not with the xdebug feature. |
Using LinCastor on OS X I added a schema called #!/bin/sh
REGEX="^url=file://(.*)&line=(.*)$"
if [[ $URL_QUERY =~ $REGEX ]]; then
osascript -e "tell application \"PhpStorm\" to activate"
/usr/local/bin/pstorm "${BASH_REMATCH[1]/\/var\/www\/current/\/Users\/me\/src\/project}:${BASH_REMATCH[2]}"
exit 0
fi
exit 1 My project at |
For Ubuntu this is the same: a few tweaks to the |
Closing as some solutions have been proposed here. We might want to add a small cookbook entry in the documentation though. |
See #19807 for a Symfony-inside solution that is coming to 3.2 |
…mapping for IDE links (nicolas-grekas) This PR was merged into the 3.2-dev branch. Discussion ---------- [FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links | Q | A | ------------- | --- | Branch? | master | New feature? | yes | Tests pass? | yes | Fixed tickets | #14340 | License | MIT | Doc PR | symfony/symfony-docs#6944 `templating.helper.code.file_link_format` is a parameter that requires templating to be defined, but holds a concept that is used beyond templating borders. Let's make it a general parameter that can be injected easily when required. Commits ------- 1c4ca8c [FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links
Note that IDEs can also do this on their own: List copy/pasted from https://bugs.xdebug.org/view.php?id=1344 |
…with remapping for IDE links (nicolas-grekas) This PR was merged into the 3.2-dev branch. Discussion ---------- [FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links | Q | A | ------------- | --- | Branch? | master | New feature? | yes | Tests pass? | yes | Fixed tickets | symfony#14340 | License | MIT | Doc PR | symfony/symfony-docs#6944 `templating.helper.code.file_link_format` is a parameter that requires templating to be defined, but holds a concept that is used beyond templating borders. Let's make it a general parameter that can be injected easily when required. Commits ------- 1c4ca8c [FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links
Hi all,
I am actually using vagrant @work and I just discover the magic with
xdebug.file_link_format
which work well outside my vagrant.Here is my problem, when I trie to click on the debug tool bar on my controller name to be redirected IDE, It open my IDE but with my vagrant's path like this :
It seems quite normal to me, as I am using a VM.
My question :
The text was updated successfully, but these errors were encountered: