PXM Pro can collect local PHP dumps, request timings, exceptions and query events. Collection is off by default. The collector uses a private Unix socket under your account and has no network listener.
pxm capture enable pxm capture site app.test on pxm capture list pxm capture show EVENT_ID
Attaching a PHP site adds PXM's private SDK to that site's next PHP-FPM generation. The regular deployment health check protects the change. The SDK records request method, path, status, duration and peak PHP memory, plus fatal errors. It does not record HTTP headers, query strings, request bodies or SQL bindings.
Use pxm_dump($value) inside application code to send a bounded dump without changing the response. Captured objects are inspected without calling their serialization or debug methods. To capture Laravel queries, call pxm_laravel($app) after the application has booted. Other frameworks can call pxm_query($sql, $milliseconds, $connectionName) directly.
For CLI scripts, run pxm capture sdk to find the private helper and explicitly require it. pxm capture status --json includes the exact PHP include statement. The browser dashboard and read-only MCP tools show the same stored events.
pxm capture site app.test off pxm capture disable pxm capture clear --yes
Disabling collection preserves existing diagnostics and leaves applications running. Clearing removes recorded events only. History is bounded to 200 events and 8 MiB, with at most 256 KiB per event. Diagnostics can contain application values you explicitly capture, so enable them only for the projects you intend to inspect.
Debugging and coverage
pxm debug script.php pxm coverage vendor/bin/phpunit
These commands use the selected verified PHP package and its bundled Xdebug module without changing global PHP settings. Debugging connects only to a local IDE on port 9003; it does not discover remote client addresses. Coverage enables coverage mode for that command. The Xdebug module must be available for the selected PHP version.
SPX can be enabled per PHP version or site with pxm php extensions enable spx. Its public HTTP interface stays disabled. PHP prereleases list unavailable modules explicitly rather than loading an incompatible binary.
Development mail
pxm service add mailpit --name mail pxm service env mail pxm mail list mail pxm mail show mail MESSAGE_ID pxm mail headers mail MESSAGE_ID pxm mail raw mail MESSAGE_ID pxm mail delete mail MESSAGE_ID --yes
Configure the application with the SMTP credentials shown by service env. Mail stays in the selected PXM Mailpit service. PXM does not relay captured messages or follow links in them. The dashboard offers HTML preview, text, HTML source and raw message views; external resources are blocked in its preview. Message detail is limited to 256 KiB in the dashboard and CLI viewer. Larger messages and attachments remain accessible through Mailpit's own local interface using an SSH tunnel when needed.