How to do remote debug in PHPstorm with xdebug?

Debug VM with xDebug and PhpStorm

  • My work setup is a Windows XP host, running an Ubuntu VM LAMP stack. I am using PhpStorm to edit my code on my host Windows machine. Upon saving files are automatically uploaded to the VM via SFTP. Everything works for this process, except debugging. I have setup PhpStorm to have a server named "UbuntuVM" with the following settings: Debugger: - XDebug Debug session settings: - Break at the first line - Wait for connection with ide key: XDEBUG_PHPSTORM Before launch: - Upload files to selected server I am using Chrome with Xdebug Helper, and have set the extension to use "Other" as the IDE, with "XDEBUG_PHPSTORM" as the key. The VM has the following in the php.ini: zend_extension="/usr/lib/php5/20090626+lfs/xdebug.so" xdebug.remote_enable=1 xdebug.remote_host=10.1.6.22 xdebug.remote_port=9000 xdebug.remote_handler=dbgp xdebug.remote_mode=req xdebug.collect_params=On xdebug.show_local_vars=On When I set a break point in my IDE, enable the debugger in Chrome, and reload the page, I never hit the break point; and the IDE says "Waiting for connection on port 9000 with ide key 'XDEBUG_PHPSTORM'". Does anyone have any idea why I'm not hitting my break points?

  • Answer:

    Comes to find out that xdebug.remote_host isn't needed, rather, use xbebug.remote_connect_back=1.

Andrew Ellis at Stack Overflow Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.