-
Notifications
You must be signed in to change notification settings - Fork 438
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
Debugger: resolve source location #844
Debugger: resolve source location #844
Conversation
public function __construct($searchPath, $file) | ||
{ | ||
parent::__construct( | ||
new \RecursiveIteratorIterator( |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
public function accept() | ||
{ | ||
$candidate = $this->getInnerIterator()->current(); | ||
return strrpos($candidate, $this->file) === strlen($candidate) - strlen($this->file); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
{ | ||
public function testFindsMany() | ||
{ | ||
// There are many files that end in Connection/RestTest.php in the test/unit folder |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
The requested source location may not exist with the exact path (although for most cases it will be).
Adding a SourceLocationResolver class that searches for the requested source location in the source tree. This resolution hits the file system, but is run from the separate daemon process and should not affect each individual request. When the daemon fetches the list of breakpoints, it validates them (including resolving the location) before saving them to the breakpoint storage. The agent that reads from the breakpoint storage can trust that the source location has been normalized (found).