PHP Debugger will not stop at breakpoints: Eclipse & Xdebug PHP Debugger will not stop at breakpoints: Eclipse & Xdebug php php

PHP Debugger will not stop at breakpoints: Eclipse & Xdebug


From your description, it seems that:

  • the debug connection to your remote server is working
  • breaking points work on the index.php, but not anywhere else

My assumption is that the file mapping between local and server code is not working, more precisely eclipse cannot map your files to the server ones.

To solve this, you have to set the path mapping setting inside your eclipse project `s run/debug settings.

Go to:

  1. Project -> Properties from the menu
  2. Select Run/Debug Settings
  3. Edit your launch configuration settings
  4. On the tab Server, section PHP server, select configure
  5. "PHP Server" window is opened, select path mapping tab
  6. Set Path on server to your project `s path on server and set Local path to well this is self explanatory.

enter image description here


If you follow below steps I think it should work

Latest XDebug version

Your XDebug version is from 2015 as per this https://xdebug.org/. So you should upgrade to the latest version

Setting up XDebug configuration

Setup a 99-xdebug.ini in your /usr/local/etc/php/conf.d/ or /etc/php/conf.d or /etc/php/5.6/cli/conf.d depending on which exists on your system

xdebug.remote_enable=1xdebug.remote_host=127.0.0.1xdebug.remote_handler=dbgpxdebug.remote_port=9000xdebug.remote_autostart=1xdebug.remote_log=/tmp/xdebug.log

Create a SSH Debug Tunnel

The machine from where you want to debug, you need to start a SSH tunnel using

ssh -R 127.0.0.1:9000:127.0.0.1:9000 -p 22 <user>@<phpserver>

Configure Remote Path mapping in Eclipse

Configure eclipse for the debugging on port 9000 and remote paths and now it should work


I am doing remote PHP development with Eclipse and a "Synchronized PHP Project. Nothing except Eclipse is running on my computer.

This is your problem. You have to allow xDebug connection. xDebug (PHP Web Server) trying to connect but probably have no idea where you are ;)

There two options:

  1. If you are not behind NAT or in same network as your test server, you have to open port 9000 on your PC. If you are behind NAT you need also forward port 9000 (this is default, can be changed). Next set correct "xdebug.remote_host=your_public_ip" or xdebug.remote_connect_back = on. Would be also good to enable accepting remote sessions (JIT) from any host (Preferences -> PHP -> Debug -> Debuggers -> xDebug), after this you will be able to easy run debugger via browser extension like xDebug helper.

  2. Configure debugger launch configuration (small arrow after "debug" icon"), to debug through SSH Tunnel. In this case xdebug.remote_host=127.0.0.1 will be correct. Note: ssh server host have to be same as server domain and SSH server have to be available on port 22