Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

Tip

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 PHP_IDE_CONFIG environment variable to serverName=<server name> to do this. For example export PHP_IDE_CONFIG="serverName=myserver" will tell PhpStorm to use the "myserver" server.

Image Removed

Troubleshooting

The debugger never connects or refuses the connection

...