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

Add ability to click on Twig paths to open editor with that file selected #15

Open
LukeTowers opened this issue Mar 6, 2023 · 4 comments

Comments

@LukeTowers
Copy link
Member

Similar to how ignition and ray and other tools work to convert local to remote paths

@systemsolutionweb
Copy link
Contributor

systemsolutionweb commented Feb 21, 2024

There is a trait for that
maximebf/php-debugbar/src/DebugBar/DataFormatter/HasXdebugLinks.php

$link = $this->getXdebugLink($filePath, $line);
// so $link 
[
    'url' => $url, // editor link
    'ajax' => false,
    'filename' => basename($file), // just file name
    'line' => (string) $line 
]

maximebf/php-debugbar/src/DebugBar/DataCollector/MessagesCollector.php#L104
maximebf/php-debugbar/src/DebugBar/Resources/widgets.js#L330-L339

@systemsolutionweb
Copy link
Contributor

$debugBar->addCollector(new \DebugBar\Bridge\NamespacedTwigProfileCollector($profile));

NamespacedTwigProfileCollector needs a second arg for XdebugLink

maximebf/php-debugbar/src/DebugBar/Bridge/NamespacedTwigProfileCollector.php#L178-L183
maximebf/php-debugbar/src/DebugBar/Bridge/NamespacedTwigProfileCollector.php#L79-L86

@LukeTowers
Copy link
Member Author

@systemsolutionweb are you willing to submit a PR for this?

@erikn69
Copy link
Contributor

erikn69 commented Feb 21, 2024

@LukeTowers hi, try #19

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

Successfully merging a pull request may close this issue.

3 participants