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.

XDebug settings:
xdebug.idekey = PHPSTORM
When I run the deleteLocalhostS3Uploads.php debug configuration, the output window shows the following:
ssh://vagrant@ -dxdebug.remote_enable=1 -dxdebug.remote_mode=req -dxdebug.remote_port=9000 -dxdebug.remote_host= /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).

When creating Remote PHP Interpreter you may need to use that SFTP entry as a source instead of "SSH Credentials"


Please sign in to leave a comment.