7

First things first:

  • Server is an Apache running on Ubuntu on SunVirtualBox x86
  • Debugging-Server is XDebug
  • Files are downloaded from FTP using phpstorm

PHP version is

PHP 5.4.9-4ubuntu2.4 (cli) (built: Dec 12 2013 04:26:30) 
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
with Xdebug v2.2.1, Copyright (c) 2002-2012, by Derick Rethans

Important: XDebug is properly configured cause everything works on my localhost.

enter image description here

But I just can't set up remote debug here are all the images and steps I made, PLEASE HELP and advice me.

Step 1 - Basic click on Create new project from existing files.

Step1

Step 2 - Choose FTP

Step2

Step 3 - Project settings on file system

Step 3

Step 4 - Setting FTP connection and Advanced - Passive mode

Setting FTP connection and Advanced - Passive mode

Step 5 - Run/Debug configuration, choose PHP remote Debug, and typed in Ide key: PHPSTORM

Run/Debug configuration

Step 6 - Servers and validate remote enviroment, here pops out WARNING: No debug extension loaded

Servers and validate remote enviroment

Step 7 - Php ini configuration.

Php ini configuration.

So in the end....

1) Is there anything that I had to do on remote server from my client for this thing to work? Maybe install XDEBUG also there, maybe you will find this questions silly, believe me I lost 3 days already in this and I am little frustrated to say the lease. so please help.

2) I will happily upload more screenshots or answer to any question you might have in order to help me out. I know it is something simple but I am breaking my head over it.

Again please help, I passed certainly 15 pages on remote debug in PHPSTROM and all of them were just not precise enough. Like you can see in first pictures everything works fine on my localhost.

8
  • 1
    So you can debug this code on localhost and can not on the server you downloaded source from? To use XDebug it must be installed and configured on the server you are accessing. Commented Dec 29, 2013 at 22:23
  • 1
    1) Yes, xdebug (or Zend Debugger) must be installed on the same environment where code is executed (in your case -- your remote server). Otherwise how IDE will know how and when something gets executed? 2) Why do you have rirads.com/master-schedule as a host field (your screenshot for step 6). It should be your domain name or IP (content of your $_SERVER["SERVER_NAME"] for this site). Commented Dec 30, 2013 at 0:45
  • Thank you both for the answers. Will setup and install xdebug on remote server. is it enough to put xdebug.so into some path and edit php.ini or? Commented Dec 30, 2013 at 10:07
  • Another question also in php.ini configuration. property {xdebug.remote.host} should be my localhost or the IP of the remote server in my case rirads.com? I assume remote host as REMOTE host so rirads.com or? Commented Dec 30, 2013 at 10:21
  • "property {xdebug.remote.host} should be my localhost or the IP of the remote server in my case rirads.com?" -- NONE of that -- please refer to the documentation as right now you seems to be just guessing what that property does -- xdebug.org/docs/all_settings#remote_host . It should be IP of the computer where PhpStorm is running. And BTW -- it should be xdebug.remote_host (underscore instead of second dot). Commented Dec 30, 2013 at 12:29

2 Answers 2

1

The main difference between using XDebug on your local machine, and using XDebug with a remote system, is that you have to configure two things:

1) The xdebug.remote_host on your server outside your network is going to be YOUR IP ADDRESS, as in, what you get if you go to whatismyip.com. This IP address is prone to change. (You can use dynamic DNS from certain providers and a hostname instead of an IP if your home IP changes a lot). Anyway, When XDebug starts on the remote server, it becomes the CLIENT looking for YOUR XDEBUG SERVER running on your laptop on port 9000.

This is what confuses so many users of XDebug. That then leads to the following:

2) You have to edit your home/office firewall (presumably this is the traffic cop on the IP you entered into your xdebug.ini or php.ini in step 1) to port forward incoming traffic on port 9000 to your laptop's IP on your home/office network.

The best resource about this is (IMO) here: http://matthardy.net/blog/configuring-phpstorm-xdebug-dbgp-proxy-settings-remote-debugging-multiple-users/

Sign up to request clarification or add additional context in comments.

Comments

-1

You should set in remotedebug the port of debubugger to 9000 as you have in php.ini.

1 Comment

add some more explanation to understand this

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.