How to remote debug via CLI?
I have a Vagrant box running on my Mac. Debugging files launched through the browser works great, but I cannot figure out how to debug CLI scripts.
Settings:



XDebug settings:
zend_extension=xdebug.so
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.idekey = PHPSTORM
When I run the deleteLocalhostS3Uploads.php debug configuration, the output window shows the following:
ssh://vagrant@192.168.33.10:22/usr/bin/php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host=192.168.33.1 /Users/nate/GitHub/shop-wise/scripts/deleteLocalhostS3Uploads.php bash: line 0: cd: /Users/nate/GitHub/shop-wise/scripts: No such file or directory Could not open input file: /Users/nate/GitHub/shop-wise/scripts/deleteLocalhostS3Uploads.php Process finished with exit code 1
Please help!
Please sign in to leave a comment.
Hi there,
You last screenshot has a hint: create SFTP deployment entry and mark it as Default for this project. There you can provide needed path mappings (so that local path can be transformed into remote and via versa).
P.S.
When creating Remote PHP Interpreter you may need to use that SFTP entry as a source instead of "SSH Credentials"