Skip to content

[ xdebug ] Add Xdebug use case examples#3075

Merged
mho22 merged 10 commits intotrunkfrom
add-xdebug-use-case-examples
Apr 15, 2026
Merged

[ xdebug ] Add Xdebug use case examples#3075
mho22 merged 10 commits intotrunkfrom
add-xdebug-use-case-examples

Conversation

@mho22
Copy link
Copy Markdown
Collaborator

@mho22 mho22 commented Dec 23, 2025

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 :

- PHP.wasm CLI in VSCode
- PHP.wasm Node in VSCode
- Playground CLI in VSCode
- PHP.wasm CLI in PhpStorm
- PHP.wasm Node in PhpStorm
- Playground CLI in PhpStorm
- PHP.wasm CLI in Chrome Devtools
- PHP.wasm Node in Chrome Devtools
- Playground CLI in Chrome Devtools

Testing Instructions (or ideally a Blueprint)

  • Clone this repository
  • cd examples/xdebug/ide or examples/xdebug/chrome-devtools
  • explore the different use cases and follow the steps in the dedicated README.md files

@mho22
Copy link
Copy Markdown
Collaborator Author

mho22 commented Jan 28, 2026

This pull request will probably need modifications if this one is merged so I will temporarily convert it to draft.

@mho22 mho22 marked this pull request as draft January 28, 2026 18:37
@mho22 mho22 removed request for adamziel and fellyph April 9, 2026 09:20
@mho22 mho22 force-pushed the add-xdebug-use-case-examples branch from b5a0ec3 to 69deed9 Compare April 13, 2026 13:47
@mho22 mho22 force-pushed the add-xdebug-use-case-examples branch from 69deed9 to 02ca898 Compare April 13, 2026 14:22
@mho22 mho22 marked this pull request as ready for review April 13, 2026 14:42
@mho22 mho22 requested review from a team, ashfame and Copilot April 13, 2026 14:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json files 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.

Comment thread examples/xdebug/ide/wp-playground-cli/plugin/index.php Outdated
Comment thread examples/xdebug/ide/README.md
Comment thread examples/xdebug/ide/php-wasm-node/src/script.js Outdated
Comment thread examples/xdebug/chrome-devtools/README.md Outdated
Comment thread examples/xdebug/README.md Outdated
Comment thread examples/xdebug/ide/wp-playground-cli/README.md Outdated
Comment thread examples/xdebug/ide/php-wasm-cli/README.md Outdated
ashfame and others added 5 commits April 15, 2026 12:49
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>
Copy link
Copy Markdown
Member

@ashfame ashfame left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mho22
Copy link
Copy Markdown
Collaborator Author

mho22 commented Apr 15, 2026

@ashfame Thanks a lot. This pull request wasn't the most fun to review.

@mho22 mho22 force-pushed the add-xdebug-use-case-examples branch from 49d0b23 to def57e0 Compare April 15, 2026 15:40
@mho22 mho22 force-pushed the add-xdebug-use-case-examples branch from def57e0 to e75e82a Compare April 15, 2026 16:06
@mho22 mho22 merged commit 726b7e8 into trunk Apr 15, 2026
47 checks passed
@mho22 mho22 deleted the add-xdebug-use-case-examples branch April 15, 2026 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants