-
Notifications
You must be signed in to change notification settings - Fork 350
[XDebug Bridge] Read files from VFS when a PHP instance is provided #2722
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
Conversation
26a9975
to
46add83
Compare
It fails for me with this exception:
It's probably related to a missing
I'm not sure why it's empty, I can't see any stale breakpoints in my devtools. That being said, it's an optional value so let's be prepared for undefined or an empty string – both in this case, and for every single optional field in every single message type. I'll go ahead and update this one and continue testing, and let's plan a PR to review all our data flows. Some adverse unit tests that send empty values on purpose will be really helpful. |
Also, let's have a general error handler for CDP messages. Just because our support for setting some breakpoints is lacking doesn't mean we need to crash the entire program. We can log it and keep going. |
With b3a2bc4 it works, thank you! It's good to see how this is shaping up ❤️ I was able to go step through the WordPress importer plugin and inspect some variables. Really cool! I've also opened some more issues, it seems like we have a long way to go to make the devtools bridge reliable – let's merge this PR and pause the CDP stream of work and focus on shipping vanilla XDebug in a way that works with PHPStorm and VSCode. |
@adamziel Thank you! I saw the 5 first issues of a probably long list of others but that's how we make a great tool! |
Motivation for the change, related issues
Based on this comment in issue #2601
This enables the playground to open the bridge in the virtual filesystem
/wordpress
directory instead of the Node filesystem.This pull request will allow step debugging with Xdebug and Chrome Devtools by using the following command :
Before this pull request, we do not have access to the virtual filesystem.
Implementation details
If
phpInstance
is provided duringstartBridge
, it willlistFiles
from the php instance instead of Node. Giving access to/wordpress
directory.Testing Instructions (or ideally a Blueprint)
Two new tests in CI