2

Try and error.. did not helped me after 2 hours even with "googling" around. No one seems to have my problem or there is a easy solution that i don't see.

My phpinfo() show xdebug just fine:

version         2.1
xdebug.remote_enable    On
xdebug.remote_handler   dbgp
xdebug.remote_host      localhost
xdebug.remote_mode      req
xdebug.remote_port      9000

My netbeans listen to port 9000 (but just on ipv6; may be this is the problem):

tcp6       0      0 :::9000                 :::*                    LISTEN      5290/java

Netbeans is reachable through telnet:

$ telnet localhost 9000
Trying 127.0.0.1...
Connected to localhost.

But netbeans does not start the browser until i click the "stop" button. Then it opens up a browser with ?XDEBUG_SESSION_START=netbeans-xdebug. How to disable ipv6 for netbeans? I don't want to disable the entire ipv6 support (ipv6 support in enabled in phpinfo()). Any other ideas?

Version:

OS: Ubuntu 12.04 LTS
Apache: 2.2.22
PHP-CGI: 5.3.10
Netbeans: 7.2
Java: 1.7.0_05

3 Answers 3

4

I had the same problem as the browser not coming up and following is what fixed the problem. There are actually 3 potential locations where you can specify the debugging port

  1. Php.ini -- {xdebug.remote_port=9000}
  2. In Netbeans IDE under - preferences - php - general {debugger port =9000; session ID= netbeans-xdebug}
  3. In the run configurations - Advanced !! DONT set this one - it refers to 'Debugger Proxy' if you set this the browser window will not come up until you have maintained the same proxy settings in the netbeans - preferences - general tab.

PS: all of the above or on a Mac..

3
  • #3 was a lifesaver.. never saw it mentioned anywhere else, and that has been what was sinking my debug efforts for the last 2 hours on the new machine. If I could upvote more than once I would!
    – roberttdev
    Jul 9, 2014 at 20:51
  • it seems to be a gut answer - anyway I can't approve it is working. I'm not using netbeans anymore. this is a often visited question it would be good to have an approved answer.
    – iRaS
    Oct 12, 2018 at 12:30
  • I love you bro, the step 3 was the key (on Windows).
    – MrSourness
    Dec 7, 2020 at 19:58
0

I had a bad run configuration in project. Netbeans was waiting for a debugging proxi on localhost:9000. I did not remember to set this setting. If someone has the same problem check this configuration too.

0

In my case the problem the project URL under Project properties in Run configuration was pointing to a subdirectory instead of the root directory of the server, after i changed to localhost everything was fine.

I found the answer after reading this article.

http://shinephp.com/netbeans-7-0-php-waiting-for-connection-to-xdebug/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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