开发者

Debug VM with xDebug and PhpStorm

开发者 https://www.devze.com 2023-01-26 20:23 出处:网络
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. Ev

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 开发者_StackOverflow社区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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号