Product Hunt🚀 We are live on Product Hunt! Support our launch & use code PHLAUNCH20 for 20% off Pro
Stratosv1.4.1
Core Engine & Security• 3 min read

Xdebug Step-Debugging & SPX Flame Graphs

Configure 1-click Xdebug for PhpStorm and VS Code, and record SPX memory & CPU profiler flame graphs.


1-Click Xdebug Step-Debugging

Stratos makes step debugging effortless. There is no need to manually find php.ini or calculate local IP addresses.

Enabling Xdebug in Stratos

  1. Go to Settings → PHP Extensions.
  2. Toggle Xdebug ON.
  3. Stratos automatically injects the correct IDE-key configuration into the active PHP runtime:
    zend_extension=xdebug.so
    xdebug.mode=develop,debug
    xdebug.start_with_request=yes
    xdebug.client_port=9003
    xdebug.client_host=127.0.0.1
    xdebug.idekey=PHPSTORM

IDE Configuration (PhpStorm & VS Code)

  • PhpStorm: Open Settings → PHP → Debug, ensure port is set to 9003, and click Start Listening for PHP Debug Connections.
  • VS Code: Install the PHP Debug (Xdebug) extension and add a Listen for Xdebug (Port 9003) launch configuration.

SPX Profiler & Interactive Flame Graphs

SPX is a low-overhead, built-in PHP execution profiler. It records CPU time, wall time, and memory usage per function call.

  • 0-Config Activation: Enable SPX in Settings or append ?SPX_KEY=dev&SPX_UI_URI=/ to any local URL.
  • Interactive Flame Graphs: Inspect call stacks, detect slow SQL queries, and locate memory leaks with visual interactive zoom.