It seems, there is a problem with client's IP address(es) detection by PhpStorm (debug_host param).
I have several Etherenet interfaces on my Win7 machine (LAN, VirtualBox adapter, VPN). When trying to auto-configurate Zend Debug Toolbar for FireFix it works, but phpStorm sends incorrect IP. Technically it's not incorrect, it's just first IP phpStorm has found. However, I haven't found a way to adjust/override it somewhere in PhpStorm settings. For the FireFox toolbar, I can simply enter correct IP in the manual settings of the toolbar, but the same incorrect IP is sent to remote phpUnit runner, when trying to debug a unit test on a remote server. I was unable to find a workaround for that.
Here is how it looks like:
> ipconfig output:
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . : some.com
Link-local IPv6 Address . . . . . : fe80::69f0:133f:6c9d:d09f%10
IPv4 Address. . . . . . . . . . . : 18.104.22.168 <- My actual IP
Subnet Mask . . . . . . . . . . . : 255.255.255.128
Default Gateway . . . . . . . . . : 22.214.171.124
Ethernet adapter VirtualBox Host-Only Network:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::7da6:98ef:8a5d:f380%19
IPv4 Address. . . . . . . . . . . : 192.168.56.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Apache's log of PhpStorm request trying to run the phpUnit runner in debug mode:
126.96.36.199 - - [01/Sep/2011:22:33:23 +0300] "GET /project/tests/Some/_intellij_phpunit_launcher.php?send_sess_end=1&start_debug=1&debug_port=10137&file=SomeTest.php&debug_session_id=16141&debug_host=192.168.56.1%2C127.0.0.1&debug_start_session=1&mode=f HTTP/1.1" 200 81 "-"
PhpStorm's test console output:
Testing started at 10:33 PM ...
Uploading test files to Server...
Failed to connect to host '192.168.56.1'. Failed to connect to host '127.0.0.1'.
Does someone know if it's possible to adjust somewhere or should I file a ticket to fix that?
Some more things noticed when trying to setup phpUnit on remote server:
- "Use XML configuration file" setting inside Run Configurations -> Defaults -> PHPUnit on Server is NOT automatically copied to newly created run configurations (when I right-click a folder or file with tests). This results in tests bootstrapping incorrectly and not working. When, I manually adjust this setting for automatically created Run configuration - it works.
- There is no option to disable automatic upload of test files to the server. I have a project configured for automatic deployment to the server through a mapped drive with "Upload changes on save turned on", so reuploading several hundreds of test files makes no sense at all and just takes time. Is there a way to disable it?
- I was unable to figure out how to configure remote unit testing to run tests from a different base directory, corresponding to selected directory. Normally the tests are located in different directory, mirroring the structure of the actual classes you are testing, such as:
So, while working in Class.php you need to run a corresonding test. Is there a way to configure PhpStorm to run tests accordingly? Probably some variable magic in paths (like the one used in External Tools) may help... Another option would be adjust _intellij_phpunit_launcher.php. What do you suggest?
P.S. All of the above was tested/noticed in PhpStorm 2.3.1 PS-107.581 running on Win7 64bit