Scenario: We have code on our local machine and are remotely handling the code and database on a Remote Server (Virtual Machine).

Now we want to Debug our Code.

This is how we have configured Remote Debugging:

php.ini Code

xdebug.remote_host= //My Local IP
#export PHP_IDE_CONFIG="" // Remote IP
xdebug.profiler_enable = 1
#xdebug.remote_connect_back =On

Most of these settings are working properly until the end of the process. We have created the configuration based on this Link

Main Question is when we are debugging my instance, it is not properly working and not stopping on Breakpoints.


first check if xdebug already installed using commands

$ php -v display php version and mention if xdebug is installed or $ php -i display all information about php and it extensions $ php -m displays all php extension

after that we install xdebug using the command line

$ sudo apt install php-xdebug

we can check if xdebug was enabled automatically by typing the command line php -m

after that we need to configure xdebug

in /etc/php/version/mods-available/xdebug.ini

and add the following lines

xdebug.remote_enable=1 xdebug.remote_host= (host machine ip)

for more information visite


after that restart services for me I am too lazy I restart apache2 services that will restart all it subsequence services with it

$ service apache2 restart

moving on to host machine here we will install google chrome extension xdebug that will add flag to the request

after that we configure IDE in my case I use phpstom

open your project using phpstorm then go to run >> edit configuration

then create new php remote debug

and click in validate link

to start listening click on the icon green bug

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.