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:

http://content.screencast.com/users/roboticsguy/folders/Snagit/media/24d7cfa2-f920-499b-b615-21b1f8b1e00f/2015-10-16_16-03-36.png

http://content.screencast.com/users/roboticsguy/folders/Snagit/media/bdb41b4a-5f21-4a18-9aa9-cd0550adf63b/2015-10-16_16-04-33.png

http://content.screencast.com/users/roboticsguy/folders/Snagit/media/73694d08-e237-40d6-bfab-8d655797946c/2015-10-16_16-05-36.png
http://content.screencast.com/users/roboticsguy/folders/Snagit/media/d887022e-c23c-4497-9784-ceeb6223c029/2015-10-16_16-21-00.png
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!
1 comment
Comment actions Permalink

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"

0

Please sign in to leave a comment.