View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001344 | Xdebug | Uncategorized | public | 2016-09-01 15:55 | 2020-03-12 17:01 |
Reporter | nicolas-grekas | Assigned To | derick | ||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | resolved | Resolution | won't fix | ||
Product Version | 2.4.1 | ||||
Summary | 0001344: Allow prefix remapping with xdebug.file_link_format | ||||
Description | When a PHP app runs inside a container/VM, files needs to be remapped so that one file in the /foobar directory on the guest points to e.g /home/... in the host. We're going to add this feature in Symfony, by using an additional convention in file_link_format: a trailing e.g. See https://github.com/symfony/symfony/pull/19807 Would be nice to also have this natively in xdebug. | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 7.0.5-7.0.9 | ||||
|
Because parse_str replaces e.g. dots by underscores, Symfony replaced parse_str by custom processing, see. The |
|
Where would Xdebug get this information from? |
|
From the existing xdebug.file_link_format setting itself! |
|
Sorry, I still don't understand what you are asking. What is that extra stuff supposed to do? The file link format is rendered by Xdebug for whenever a file/line number is shown in HTML. |
|
Let's say xdebug.file_link_format=subl://%f:%l&/foobar/>/home/toto/&/baz/>/home/titi/ The first "&" after the last "%f|%l" starts a map, where keys and values are separated by ">", and key-value pairs by a "&". In the previous example, the map is:
This map defines prefixes that should be replaced in the rendered file. This is useful on VM/container setups, where paths inside the VM have a different prefix from the IDE pov. For reference, the logic in Symfony is implemented by this class: |
|
IMO, it's up to IDEs to implement these mappings. And many already do so. PhpStorm: https://www.jetbrains.com/help/phpstorm/2016.3/deployment-mappings-tab.html Xdebug never does anything with path mappings itself, as it doesn't know about them. I don't think it should do this depending on a setting that is supposed to format a link. Having this information both in PHP configuration, and in an IDE, is double up and likely going to be confusing — setting up path mappings is confusing enough for many people. |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-09-01 15:55 | nicolas-grekas | New Issue | |
2016-10-05 08:38 | nicolas-grekas | Note Added: 0003716 | |
2016-12-11 23:29 | derick | Note Added: 0004004 | |
2016-12-11 23:29 | derick | Assigned To | => derick |
2016-12-11 23:29 | derick | Status | new => feedback |
2016-12-29 19:09 | nicolas-grekas | Note Added: 0004103 | |
2016-12-29 19:09 | nicolas-grekas | Status | feedback => assigned |
2017-01-03 18:41 | derick | Note Added: 0004113 | |
2017-01-03 18:41 | derick | Status | assigned => feedback |
2017-01-03 21:34 | nicolas-grekas | Note Added: 0004146 | |
2017-01-03 21:34 | nicolas-grekas | Status | feedback => assigned |
2017-01-03 21:34 | nicolas-grekas | Note Edited: 0004146 | |
2017-01-03 21:35 | nicolas-grekas | Note Edited: 0003716 | |
2017-01-03 21:35 | nicolas-grekas | Note Edited: 0004146 | |
2017-01-03 21:36 | nicolas-grekas | Note Edited: 0004146 | |
2017-01-04 10:06 | derick | Note Added: 0004148 | |
2017-01-04 10:06 | derick | Status | assigned => resolved |
2017-01-04 10:06 | derick | Resolution | open => won't fix |
2020-03-12 17:01 | derick | Category | Feature/Change request => Uncategorized |