Skip to content

Instantly share code, notes, and snippets.

@rodde177
Last active January 15, 2021 23:34
Show Gist options
  • Save rodde177/77e6c7c8cc4d660ddf424383d06ba2ae to your computer and use it in GitHub Desktop.
Save rodde177/77e6c7c8cc4d660ddf424383d06ba2ae 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