-
Notifications
You must be signed in to change notification settings - Fork 327
[XDebug Bridge] Exclude file and directory paths from devtools stack and debugging #2423
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
base: trunk
Are you sure you want to change the base?
Conversation
I will need to add tests before making it ready for review. |
I added tests based on the tests from pull request #2409. |
There's a few conflicts to resolve and the implementation section of the description is missing (a sentence or two should suffice here) but other than that it LGTM. Let's fix those and merge – thank you @mho22! |
}, | ||
}); | ||
if (this.isExcludedPath(fileUri)) { | ||
this.sendDbgpCommand('step_over'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The excluded file could call a function defined in a non-excluded file. Would step_over
ignore the entire call and never step into that other file? This isn't relevant for breaking on the first line but it is relevant for calls made by Playground-level mu-plugins, e.g. the SQLite integration plugin.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oho. I guess it will ignore the file. It should also check the command. If the command is step_into
then, don't ignore the file. I'll need to test that.
Motivation for the change, related issues
Based on this comment and pull request.
In Playground CLI, the first line where Xdebug stops in Devtools is the
auto_prepend_file.php
file located in theinternal
directory. This pull request aims to ignore what's in the directory by adding aexcludedPaths
option in the bridge that will be ignored when stacking or stepping.Implementation details
Added an
excludedPath
option to thestartBridge
function. When specified,XdebugCDPBridge
will check this option, and the DevTools willstep_over
any file matching the excluded path, skipping its parsing.Testing Instructions
With script
cli.ts
:Run command :
Before
After