dongwu9170 2015-08-20 13:10
浏览 112
已采纳

PHPStorm和VM单元测试

I'm trying to setup remote tests execution and debugging in PHPStorm following those two articles from JetBrains:

I'm working in PHPStorm 9.0.2 on Windows 8.1, and my VM is Debian Jessy sitting inside Virtual Box v 4.3.26. VM is connected to host OS via host-only interface. Host machine has IP 192.168.10.1 and guest one has IP 192.168.10.2.

My problem so far is remote interpreters in PHPStorm, i.e if I do:

  1. Go to PHPStorm setting
  2. Find Languages & Frameworks -> PHP
  3. See Interpreter option and click the ... button to open the interpreters Window.
  4. Specify my connection settings as on attached screenshot
  5. If I press button 1, then PHPStorm shows a choose-folder dialog which corresponds to server file structure and I can actually choose the right path to php executable there. PHP is indeed located at /usr/bin/php.
  6. If I press button 2, then dialog 3 appears and stays on the screen forever. The only way to get rid of it is to kill network connection or kill PHPStorm. PHPStorm PHP interpreters window

I tried googling the issue, but failed to find anything related. My private key file is in PuTTY *.ppk format. My user has permissions to write and read from project folder, though it is not the same user as apache uses.

If I go to Tools -> Start SSH session then PHPStorm starts a terminal session using provided credentials, i.e. it doesn't seem to be a SSH connection issue, rather smth else.

Would be great to get any hint on this issue.

  • 写回答

1条回答 默认 最新

  • doume1301 2015-08-20 13:54
    关注

    Looks like I spotted the issue. Problem is that I was initially trying to run unit tests from the console and expecting PHPStorm to stop on breakpoints inside unit-tests. This was not happening, but PHPStorm was stopping before the first line of code of the PHPUnit.phar file, and sadly that continued to happen. I.e. when PHPStorm validates the php setup it seem to execute some php command and that command is either waiting for ages till other php thread get released or gets suspended before it's first line execution.

    So, I restarted PHPStorm, deactivated listening to xdebug connections and things started to work as they should according to JetBrains docs mentioned in the question.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#r语言#的问题:(svydesign)为什么在一个大的数据集中抽取了一个小数据集
  • ¥15 C++使用Gunplot
  • ¥15 这个电路是如何实现路灯控制器的,原理是什么,怎么求解灯亮起后熄灭的时间如图?
  • ¥15 matlab数字图像处理频率域滤波
  • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
  • ¥15 ELGamal和paillier计算效率谁快?
  • ¥15 file converter 转换格式失败 报错 Error marking filters as finished,如何解决?
  • ¥15 Arcgis相交分析无法绘制一个或多个图形
  • ¥15 关于#r语言#的问题:差异分析前数据准备,报错Error in data[, sampleName1] : subscript out of bounds请问怎么解决呀以下是全部代码:
  • ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格