XDebug: how to debug remote console application?

后端 未结 2 357
忘了有多久
忘了有多久 2021-01-30 15:15

I have read this docs: http://xdebug.org/docs/remote

I can debug my web application.
But the debugger doesn\'t launch for console command.

My .ini file for X

2条回答
  •  一向
    一向 (楼主)
    2021-01-30 15:34

    Short answer:

    We need to set 2 environment variables, these two lines:

    export PHP_IDE_CONFIG="serverName={SERVER NAME IN PHP STORM}"
    export XDEBUG_CONFIG="remote_host=$(echo $SSH_CLIENT | awk '{print $1}') idekey=PHPSTORM"
    

    Updated: Good IDE (e.g. PhpStorm) will do it for you, just set PHP interpreter to remote one.

提交回复
热议问题