Skip to content

Instantly share code, notes, and snippets.

@AGelzer
Forked from rodde177/xdebug-cron.md
Created January 15, 2021 23:34
Show Gist options
  • Save AGelzer/3b64f9ec1c5db78be1a1092b0d7ff767 to your computer and use it in GitHub Desktop.
Save AGelzer/3b64f9ec1c5db78be1a1092b0d7ff767 to your computer and use it in GitHub Desktop.
Running Xdebug with cron jobs

Preconditions:

In command line, run following command first time (with same server name as configured in PHPStorm):

export PHP_IDE_CONFIG="serverName=localhost.tld" export XDEBUG_CONFIG="idekey=PHPSTORM"

Next, run following command from root if magerun is there:

./n98-magerun2.phar sys:cron:run name_of_cron_job

If you are listening for debug connections, it will stop at first breakpoint now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment