Trying to configure PhpStorm

I have VMware running Ubuntu 4.2 and Apache with PHP; a Windows installation of PhpStorm; and Chrome with Xdebug helper.  Xdebug and PhpStorm are communicating behind the scenes (WireShark log attached), but there is no visible response from PhpStorm.

Here is my configuration:

PHP.ini:

[Xdebug]
zend_extension="/usr/lib/php5/20090626/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_host="bwelden-laptop"
xdebug.remote_port=9000
xdebug.remote_log="/tmp/xdebug-log.txt"

In PhpStorm:
PHP Home: C:\imvu\Reactor\Core\php5
(no include paths)
Server Name: bwelden-sandbox
Host: localhost.imvu.com
Port: 80
Debugger: XDebug
Use path mappings checked
C:\imvu\website mapped to \var\www\website
(no include path mapping)
Debug Values tooltip delay: 700
Neither of the "Remote debug" check boxes checked
under XDebug, Debug port: 9000
"Can accept external connections" checked
"Break at first line..." checked
Neither "Show variables..." nor "Enable workaround" checked.
Zend Debugger remains configured as delivered (port values provided, "Can accept" checked)

"Start Listen PHP Debug Connection" checked.

I have also set a breakpoint in the PHP document that I am testing with, but as I understand it "Break at first line..." should override that and make it unimportant.

When I use Chrome on the Windows side (with the little Xdebug helper bug clicked until it is green) to load the document under test, nothing happens in the PhpStorm IDE.

Questions:

There is no mention in your instructions of "Debug" on the "Run" menu under PhpStorm. Should I be trying to click this? When I do I get messages at the bottom of the screen "Debug connection was not established" and "Process finished with exit code 0".

I tried putting forward slashes for the Unix-side file mapping in the PHP/Servers configuration page, but PhpStorm replaced them with backslashes. Is it okay?

I must enter a PHP home directory in the PHP settings dialog, but is  requires that this directory be present on the Windows side and the PHP  installation is on the Unix side. Do I have to make a dummy installation  of PHP under Windows, and must it be identical to the installation on  Unix?

Thanks for your assistance. It would be great if we could get the debugger working.



Attachment(s):
idea.log.zip
Xdebug Log.pcap.zip
5 comments
Comment actions Permalink

Hi Bill,

I must enter a PHP home directory in the PHP settings dialog, but is   requires that this directory be present on the Windows side and the PHP installation is on the Unix side. Do I have to make a dummy installation  of PHP under Windows, and must it be identical to the installation on  Unix?

You need this set on your local PC only if you going to use it locally (like, running PHPUnit tests locally; executing Phing tasks locally etc) otherwise it is not required (at least it works fine for me in such "Local Dev - Remote Server" scenario).

I tried putting forward slashes for the Unix-side file mapping in the PHP/Servers configuration page, but PhpStorm replaced them with backslashes. Is it okay?

Should not be -- see the images from the doc pages:
http://confluence.jetbrains.net/display/WI/Zero-Configuration+debugging+with+PhpStorm+2.0
http://blogs.jetbrains.com/webide/2011/03/configure-php-debugging-in-phpstorm-2-0/

---

I'm definitely not an expert at reading these logs (especially .pcap one) and Nikolay Matveev should give you more precise answer (he is developer working on PHP debugging), but here what I can say:
1) it seems that you have your xdebug setup correctly and you can accept incoming xdebug connection (based on what I was able to read from .pcap file).
2) But there seems to be some issues with mappings (maybe even non PhpStorm one, I think) -- the Xdebug tries to debug "/mnt/hgfs/website/catalog/auto_prepend_file.php" which is not in the paths that you have mentioned so far ( \var\www\website )

I recommend to try one of these:
1) figure out and use correct path mapping in Settings | PHP | Servers
2) delete already made server mapping settings -- PHP Storm should display some sort of pop up window when you attempt to debug which will display paths used & offer to setup mappings there ( http://confluence.jetbrains.net/display/WI/Zero-Configuration+debugging+with+PhpStorm+2.0 )

0
Comment actions Permalink

Hello Bill,

Do you still have the issue?

Thank you for feedback!

0
Comment actions Permalink

Yes, I have it working now.

Until I tried the exact steps described by Andriy the PHP / Servers settings page was always changing my forward slashes to backslashes when I tried to pre-configure the path mappings.

With Andriy's workflow, PhpStorm prompted me to enter the mappings, and now the settings page always changes backslashes to slashes.

Perhaps this was the problem.

In any event, I am delighted to have things working.

Thanks for your help.

0
Comment actions Permalink

Also, PhpStorm insisted that I have a valid PHP installation locally on my Windows machine, even though I am only running PHP in my VM.

It wasn't a problem, since I have PHP locally as well, but it was kind of confusing and it might be an obstacle for some other people.

0
Comment actions Permalink

Bill,

Also, PhpStorm insisted that I have a valid PHP installation locally on my Windows machine, even though I am only running PHP in my VM.

Valid local PHP installation only required if you use 'PHP Script' or 'PHPUnit' run configurations. For debugging of PHP running remotely use 'Listen' button OR 'PHP Web Application', 'PHP Remote Debug' run configurations.

It wasn't a problem, since I have PHP locally as well, but it was kind of confusing and it might be an obstacle for some other people

Thanks, we will investigate the usablity problem. Please feel free to report about any problems you will meet.

Thank you for feedback!

0

Please sign in to leave a comment.