Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
784 views
in Technique[技术] by (71.8m points)

ide - PHPStorm unable to make external connection with xdebug

My OS is Mac Mountain lion.

My PhpStorm version is 5.0.4.

Here is my php xdebug info:

  • xdebug.remote_autostart => Off => Off
  • xdebug.remote_connect_back => Off => Off
  • xdebug.remote_cookie_expire_time => 3600 => 3600
  • xdebug.remote_enable => On => On
  • xdebug.remote_handler => dbgp => dbgp
  • xdebug.remote_host => 127.0.0.1 => 127.0.0.1
  • xdebug.remote_log => data/logs/xdebug.log => data/logs/xdebug.log
  • xdebug.remote_mode => req => req
  • xdebug.remote_port => 9000 => 9000
  • xdebug.idekey => no value => no value

I can debug PhpScript Run Type in PhpStorm,It works fine.So I think xdebug configure well.

But after I try follow the "Zero Configure Debug"(Which with Webapplication Run Type),Phpstorm can not connect with the incoming connection.

Here is my step:

  1. Click Start Listion Php Connection.(Toggle the call to green)
  2. Click Run->Break at first line in PhpScript,and set breakpoint at first statement.
  3. Choose My WebApplication Config and click Debug button.Then it launches chrome and link to my phpscript.(with ?XDEBUG_SESSION_START=19869)
  4. In PhpStorm,Debugger shows Waiting for incoming connection with ide key '19869'.
  5. In termial,printlsof -i4TCP:9000.

    COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
    webide 288 wangfeng 69u IPv6 0xa83881cdce30c579 0t0 TCP *:cslistener (LISTEN)

  6. Open Chrome's Developer Tool,Select Cookies.

    XDEBUG_SESSION 19869 localhost / Wed, 30 Jan 2013 05:27:17 GMT 19

  7. Refresh Chrome.Not able connect with PhpStorm debug connection.

Additional:

  • My firewall was closed.
  • My Server is nginx.My phpwebapp and server is all at my local machine.

Does it cause ipv6?

Hopes help!I have try everything,extensions bookmarklets,not work at all.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It's possible that port 9000 is being used by some other process.

  1. In php.ini set xdebug.remote_port=9001 or another unused port of your choosing.
  2. In PHPStorm go to Settings->PHP->Debug and under the Xdebug section set Debug port to 9001.
  3. Restart your web server.
  4. Start debugging.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...