[ xdebug ] Add Xdebug use case examples#3075
Conversation
|
This pull request will probably need modifications if this one is merged so I will temporarily convert it to draft. |
b5a0ec3 to
69deed9
Compare
69deed9 to
02ca898
Compare
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds hands-on Xdebug example projects to help developers debug PHP.wasm and WP Playground flows across IDEs (VS Code, PhpStorm) and Chrome DevTools.
Changes:
- Added runnable Node/CLI example scripts for PHP.wasm and WP Playground CLI with Xdebug enabled.
- Added step-by-step READMEs for IDE and Chrome DevTools debugging workflows, plus sample WordPress plugin/files to place breakpoints in.
- Added per-example
package.jsonfiles and an examples-scoped.gitignore.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| examples/xdebug/ide/wp-playground-cli/src/test.php | PHP breakpoint target for WP Playground CLI (IDE) example. |
| examples/xdebug/ide/wp-playground-cli/src/script.js | Node script to run WP Playground CLI with Xdebug + IDE integration. |
| examples/xdebug/ide/wp-playground-cli/plugin/index.php | Sample WordPress plugin used as a debugging target. |
| examples/xdebug/ide/wp-playground-cli/package.json | Dependencies for the WP Playground CLI (IDE) example. |
| examples/xdebug/ide/wp-playground-cli/README.md | Instructions for debugging WP Playground CLI (IDE) use cases. |
| examples/xdebug/ide/php-wasm-node/src/test.php | PHP breakpoint target for PHP.wasm Node (IDE) example. |
| examples/xdebug/ide/php-wasm-node/src/script.js | Node script to run PHP.wasm Node with Xdebug enabled. |
| examples/xdebug/ide/php-wasm-node/package.json | Dependencies for the PHP.wasm Node (IDE) example. |
| examples/xdebug/ide/php-wasm-node/README.md | Instructions for debugging PHP.wasm Node in IDEs. |
| examples/xdebug/ide/php-wasm-cli/src/test.php | PHP breakpoint target for PHP.wasm CLI (IDE) example. |
| examples/xdebug/ide/php-wasm-cli/package.json | Dependencies for the PHP.wasm CLI (IDE) example. |
| examples/xdebug/ide/php-wasm-cli/README.md | Instructions for debugging via PHP.wasm CLI in IDEs. |
| examples/xdebug/ide/README.md | Shared IDE setup guidance (VS Code/PhpStorm) for Xdebug. |
| examples/xdebug/chrome-devtools/wp-playground-cli/src/test.php | PHP breakpoint target for WP Playground CLI (Chrome DevTools) example. |
| examples/xdebug/chrome-devtools/wp-playground-cli/src/script.js | Node script to run WP Playground CLI with Xdebug + DevTools integration. |
| examples/xdebug/chrome-devtools/wp-playground-cli/plugin/index.php | Sample WordPress plugin used as a debugging target. |
| examples/xdebug/chrome-devtools/wp-playground-cli/package.json | Dependencies for the WP Playground CLI (Chrome DevTools) example. |
| examples/xdebug/chrome-devtools/wp-playground-cli/README.md | Instructions for debugging WP Playground CLI in Chrome DevTools. |
| examples/xdebug/chrome-devtools/php-wasm-node/src/test.php | PHP breakpoint target for PHP.wasm Node (Chrome DevTools) example. |
| examples/xdebug/chrome-devtools/php-wasm-node/src/script.js | Node script to run PHP.wasm Node with Xdebug enabled (no bridge). |
| examples/xdebug/chrome-devtools/php-wasm-node/src/script-with-bridge.js | Node script that starts the Xdebug bridge and runs a PHP script. |
| examples/xdebug/chrome-devtools/php-wasm-node/package.json | Dependencies for PHP.wasm Node + xdebug-bridge example. |
| examples/xdebug/chrome-devtools/php-wasm-node/README.md | Instructions for debugging PHP.wasm Node with Chrome DevTools + bridge. |
| examples/xdebug/chrome-devtools/php-wasm-cli/src/test.php | PHP breakpoint target for PHP.wasm CLI (Chrome DevTools) example. |
| examples/xdebug/chrome-devtools/php-wasm-cli/package.json | Dependencies for the PHP.wasm CLI (Chrome DevTools) example. |
| examples/xdebug/chrome-devtools/php-wasm-cli/README.md | Instructions for debugging via PHP.wasm CLI in Chrome DevTools. |
| examples/xdebug/chrome-devtools/README.md | Shared Chrome DevTools/Xdebug-bridge setup guidance. |
| examples/xdebug/README.md | Top-level entrypoint README for the Xdebug examples. |
| examples/xdebug/.gitignore | Ignores node_modules, IDE settings, and generated Xdebug root folders for examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/WordPress/wordpress-playground/sessions/3de9d9c0-101d-46aa-aa24-e08e1acf65cf Co-authored-by: ashfame <858906+ashfame@users.noreply.github.com>
Agent-Logs-Url: https://github.com/WordPress/wordpress-playground/sessions/f9e79eb8-cb1d-4b6b-95d5-c397f10a7e31 Co-authored-by: ashfame <858906+ashfame@users.noreply.github.com>
ashfame
left a comment
There was a problem hiding this comment.
Love this, haven't tested anything myself, but looks good.
Accepted some Copilot suggested changes and left a couple of comments for you to consider, but feel free to merge after that.
|
@ashfame Thanks a lot. This pull request wasn't the most fun to review. |
49d0b23 to
def57e0
Compare
def57e0 to
e75e82a
Compare
Motivation for the change, related issues
To help developers familiarize themselves with the Xdebug dynamic extension, several use case examples have been implemented.
Implementation details
Added Xdebug use cases for :
Testing Instructions (or ideally a Blueprint)
examples/xdebug/ideorexamples/xdebug/chrome-devtoolsREADME.mdfiles