Skip to content

Conversation

@mho22
Copy link
Collaborator

@mho22 mho22 commented Sep 13, 2025

Motivation for the change, related issues

Based on #2601 (comment)

When readPHPFile tries to read a non-existent file based on a wrong path, it crashes with code 44 and message :

Error [ErrnoError]: Could not read "": There is no such file or directory OR the parent directory does not exist.

This pull request aims to bypass those non-existent files and focus on the existing ones. If the file reading attempt crashes during sendScriptToCDP a warning is logged in the Devtools console with the error message while the process is still running.

Implementation details

  • Addition of a try..catch statements around this.readPHPFile and what follows.
  • Implementation of a new Log.entryAdded with the ErrnoError message in the catch part.
  • Implementation of a test.

Testing Instructions (or ideally a Blueprint)

CI

@mho22 mho22 added [Type] Bug An existing feature does not function as intended XDebug labels Sep 13, 2025
@mho22 mho22 mentioned this pull request Sep 9, 2025
11 tasks
@mho22 mho22 marked this pull request as ready for review September 13, 2025 09:54
@adamziel adamziel merged commit ec096f2 into trunk Sep 17, 2025
26 checks passed
@adamziel adamziel deleted the fix-issue-if-non-existent-file-in-devtools branch September 17, 2025 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Bug An existing feature does not function as intended XDebug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants