PS-98.271: unable to remote debug with xdebug

As other people before I am unable to remote debug with xdebug. Afaict xdebug is set up correctly; however, PS does tell me the remote_host may have to be set to 127.0.0.1. Since I debugging remotely, I have set it to the IP of the machine that PS is running on. PS then tells me it is 'connected' and has opened a tab in my browser.

However, it does not break on any break point. If I tell it to break on first line it does just that, but this makes debugging very difficult.

After reading the other issues here, I went through my settings again and again to make sure I use the correct path mappings, ports, paths and whatnot. Still there is no breaking on the points.

As per suggestions I have attached idea.log; also a bunch of screenshots that hopefully illustrate the settings I have made. I am very willing to follow further suggestions and provide information :)

Here are the screenshots: http://imgur.com/a/1dR3g/phpstom_debugging

The remote host from the screenshots is actually a virtual machine on my laptop. I create symlinks to the current "document root" so I won't have to reload apache all the time. This symlink is set on the host, the whole directory, however, is shared with the virtual machine.

On a side note: I experience the same behavior with PS 1.0.2



Attachment(s):
idea.log.zip
8 comments

Hello, Lasse

Thanks for your detailed report!

Add the following path mapping to your run configuration(click "Server paths mappings..." to edit it):

Local Path on Client = "/home/lpommerenke/Desktop/ddsrc/dailydeal.de"
Local Path on Server = "/mnt/hgfs/ddsrc/GCK"

0

I went to Run -> Edit Configurations, selected "debug DEV" in the branch "PHP on Server". There, I selected the "debug" tab and clicked on "Server paths mappings...". Finally I added another mapping as you have described.

However, PS still does not break on any breakpoint. I can see "Connected" in the Variables window at the bottom while the browser waits for the web server. Once that request has completed, this message goes back to "Waiting for connection on port 9000 with ide key 'PhpStorm1'".

Attached you will find a new idea.log that was created with these settings.



Attachment(s):
idea.log.zip
PS-debug_debug_path_mappings.png
0

Lasse,

Please provide more detailed desciption of your local and remote file system.

laptop: /home/lpommerenke/Desktop/ddsrc/dailydeal.de - path to project
laptop: /home/lpommerenke/Desktop/ddsrc/GCK/ - symlink to /home/lpommerenke/Desktop/ddsrc/dailydeal.de(shared with vm)

vm: /mnt/hgfs/ddsrc/GCK - path to mounted folder
vm: /data/www/dailydeal.de - symlink to /mnt/hgfs/ddsrc/GCK (server document root on virtual machine)

It this correct?

0

The setup I have was originally devised by the admin who also created the virtual machine I use. It then underwent certain changes to improve performance, i.e. using shared folders instead of SMB.

Anyway, below is the file system layout for both Host and Guest.

Host (=laptop):

On the host I have two directories (before and after migration, dirty code and clean code so to speak)
/home/lpommerenke/Desktop/ddsrc/DD
/home/lpommerenke/Desktop/ddsrc/GCK

Then there is a symlink from "dailydeal.de" to "GCK"
/home/lpommerenke/Desktop/ddsrc/dailydeal.de -> GCK

The directory /home/lpommerenke/Desktop/ddsrc is set up as a shared folder in vmplayer, under the name "ddsrc".

Guest:

So on the VM I have
/mnt/hgfs/ddsrc/DD
/mnt/hgfs/ddsrc/GCK

and the symlink again:
/mnt/hgfs/ddsrc/dailydeal.de -> GCK

Now, apache uses /data/www/dailydeal.de as DocumentRoot for historic reasons. This means /data/www/dailydeal.de/ is yet another symlink to /mnt/hgfs/ddsrc/dailydeal.de (which, in turn, symlinks to GCK).

0

Lasse,

This is only mapping you need:

Local Path on Client = "/home/lpommerenke/Desktop/ddsrc/GCK"
Local Path on Server = "/mnt/hgfs/ddsrc/GCK"

add it under "Server paths mappings..."

0

housetier wrote:

As other people before I am unable to remote debug with xdebug. Afaict xdebug is set up correctly; however, PS does tell me the remote_host may have to be set to 127.0.0.1. Since I debugging remotely, I have set it to the IP of the machine that PS is running on. PS then tells me it is 'connected' and has opened a tab in my browser.

this looks wrong.  I have xdebug working fine on a remote machine with PhpStorm.

in your remote servers php.ini file

[xdebug]
xdebug.remote_autostart=off
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_port=9000
xdebug.remote_host=192.168.56.1
xdebug.idekey=webide

in your remote servers /etc/hosts file
127.0.0.1       myremote.com


in your local pc's /etc/hosts file
192.168.56.101  myremote.com

so now:
* your local pc is mapping the remotes ipaddress to "myremote.com"  
* your remote pc is mapping its self to "myremote.com"
* your php and xdebug is sending its remote info back to your local pc.

(my setup is: ubuntu server 10.04 setup inside a virtualbox.  My local pc is kubuntu 10.04)  
192.168.56.1 is my local pc where phpstorm is.
192.168.56.101 is my development server.

0

I finally got PS to break on the breakpoints! :)

I created a new project and didn't use the symlinks but the actual directories instead. I also followed your advice regarding paths mapping: they are set up the way you suggested.

Thank you very much!

0

Thanks for your detailed examples :)

I have the same setup actually, only the IPs and host names differ. Still, good to see I wasn't on the wrong track here.

0

Please sign in to leave a comment.