When the SSH tunnel is up and running, we can also debug PHP CLI scripts. Since the debugger runs on a remote machine, it's Starting starting a CLI debugging session can be done by using PHP command line switches or using environment variables.
Check Debugging PHP CLI scripts with PhpStorm for more information about how to debug PHP CLI scripts.
When a debugger connection is established, PhpStorm will ask us for the server and path mapping we want to use to map the remote file system to our local file system. When using Xdebug, we can set an additional environment variable on the remote machine that Xdebug uses to tell PhpStorm which server is being used. Set the
The debugger never connects or refuses the connection