How to Debug PHP Script From the CLI with PHP-XDEBUG

TL;DR Set your IDE to listen for incoming connections On the CLI set the session key, export XDEBUG_CONFIG=”idekey=netbeans-xdebug” Set XDEBUG configuration (can be set as environment variables or in-line parameters) # in-line php -dxdebug.remote_enable=1...