2

I'm trying to get PHPStorm to work with Xdebug to use with PHP scripts (CLI, not web pages!) on a vagrant instance on the same machine as PHPStorm is running on.

In their docs they say this:

To tell the PhpStorm which path mapping configuration should be used for a connection from certain machine, the value of the PHP_IDE_CONFIG environment variable should be set to serverName=SomeName, where SomeName is the name of the server configured in Settings / Preferences | Languages & Frameworks | PHP | Servers:

Windows: set PHP_IDE_CONFIG="serverName=SomeName" Linux / Mac OS X: export PHP_IDE_CONFIG="serverName=SomeName"

However, it's unclear where I'm supposed to set this-- is it set somewhere in the PHPStorm app? Is it set as part of the bash profile in the vagrant box? In the vagrant xdebug conf?

user101289
  • 9,888
  • 15
  • 81
  • 148
  • 1
    *"Is it set as part of the bash profile in the vagrant box?"* -- yes. – LazyOne Jul 28 '15 at 15:59
  • 2
    PhpStorm since v8 supports debugging CLI scripts over SSH directly (via Remote PHP Interpreters)-- there you do not need to do anything like that. But you may need to setup SFTP deployment and use that when creating Remote PHP Interpreter (it depends: in some cases IDE cannot use/interpret path mappings from vagrant config file): 1) https://confluence.jetbrains.com/display/PhpStorm/Remote+debugging+in+PhpStorm+via+SSH+tunnel 2) https://confluence.jetbrains.com/display/PhpStorm/Working+with+Remote+PHP+Interpreters+in+PhpStorm – LazyOne Jul 28 '15 at 16:01
  • possible duplicate of [PHPStorm + XDebug + Vagrant](http://stackoverflow.com/questions/21724328/phpstorm-xdebug-vagrant) – kenorb Aug 07 '15 at 08:30

1 Answers1

0

A per LazyOne comment, PhpStorm since v8 supports debugging CLI scripts over SSH directly (via Remote PHP Interpreters)-- there you do not need to do anything like that. But you may need to setup SFTP deployment and use that when creating Remote PHP Interpreter (it depends: in some cases IDE cannot use/interpret path mappings from vagrant config file.

See:

Community
  • 1
  • 1
kenorb
  • 155,785
  • 88
  • 678
  • 743