We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae41159 commit 48c36d1Copy full SHA for 48c36d1
src/DebugBar/DataCollector/DataCollector.php
@@ -87,8 +87,15 @@ public function getDataFormatter()
87
*/
88
public function getXdebugLink($file, $line = 1)
89
{
90
- if (count($this->xdebugReplacements)) {
91
- $file = strtr($file, $this->xdebugReplacements);
+ if (file_exists($file)) {
+ $file = realpath($file);
92
+ }
93
+
94
+ foreach ($this->xdebugReplacements as $path => $replacement) {
95
+ if (strpos($file, $path) === 0) {
96
+ $file = $replacement . substr($file, strlen($path));
97
+ break;
98
99
}
100
101
$url = strtr($this->getXdebugLinkTemplate(), ['%f' => $file, '%l' => $line]);
0 commit comments