Skip to content

docs(xdebug): step through code with PHP Debugger: what works with Trap and how to install it - #387

Merged
roxblnfk merged 1 commit into
masterfrom
docs/php-debugger
Nov 24, 2026
Merged

roxblnfk merged 1 commit into
masterfrom
docs/php-debugger

Conversation

@roxblnfk

Copy link
Copy Markdown
Member

🔍 What was changed

  • docs/xdebug.md gets a PHP Debugger section: Trap takes its sessions as Xdebug's, what it lacks (profiles, traces), how to install it in Docker, on Linux/macOS and on Windows, and its start_with_request=yes default, which opens a session in Trap for every script.
  • The trap skill names PHP Debugger, and its detect.php reports it: the extension hides from extension_loaded('xdebug'), so the check missed it.

Review notes

  • PHP Debugger 0.6.2 is built on Xdebug's code and keeps the DBGp extras Trap relies on (<xdebug:message exception>, resolved_breakpoints, notify_ok), so no code change was needed.
  • pie install php-debugger/php-debugger fails on Windows: the release attaches php_php-debugger-php8.4-nts-windows-x64.dll, PIE looks for php_php_debugger-0.6.2-8.4-nts-vs17-x86_64.zip. The docs point Windows users to the DLL or the vendor's installer.

Checklist

  • How was this tested:
    • Tested manually: phpdebugger/php (PHP 8.6, PHP Debugger 0.6.2) against trap --ui --mcp --xdebug in standalone mode — line, conditional and exception breakpoints, stack, variables, eval, step/run/stop, over the UI API and the xdebug_* MCP tools
    • pie install in php:8.4-cli; the Windows DLL loads with zend_extension= into PHP 8.4 NTS
    • detect.php in the phpdebugger/php image and on a host with Xdebug
    • Relaying to an IDE with PHP Debugger
    • composer test, psalm, structarmed (no change in src/)

@roxblnfk
roxblnfk requested a review from a team November 24, 2026 18:19
@github-actions github-actions Bot added the bug Something isn't working label Nov 24, 2026
@codecov

codecov Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.87%. Comparing base (c7daab8) to head (2b0c0a3).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #387   +/-   ##
=======================================
  Coverage   81.87%   81.87%           
=======================================
  Files         466      466           
  Lines       19709    19709           
=======================================
  Hits        16137    16137           
  Misses       3572     3572           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…ap and how to install it

feat(skill): detect PHP Debugger in the environment check of the trap skill

PHP Debugger, a step debugger built on the code of Xdebug, speaks the same DBGp, so Trap drives its sessions as they are: breakpoints, conditions, exception breaks, the stack, variables, eval and stepping were checked with PHP Debugger 0.6.2 over the UI API and the MCP tools. It hides from `extension_loaded('xdebug')`, so the check of the skill missed it. PIE installs it on Linux and macOS only: the Windows DLLs of its releases are not named the way PIE looks for them.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@roxblnfk
roxblnfk merged commit 2e67cd1 into master Nov 24, 2026
44 of 45 checks passed
@roxblnfk
roxblnfk deleted the docs/php-debugger branch November 24, 2026 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant