[xdebug-general] Re: xdebug troubleshooting with netbeans-xdebug.

From: Derick Rethans <derick[@]xdebug.org>
Date: Fri, 10 Dec 2010 10:11:44 +0000 (GMT)

On Thu, 9 Dec 2010, Eric Sepich wrote:

> phpinfo(); confirms I have installed correctly. Any help with this matter
> would be greatly appreciated. I can not seem to get remote debugging working
> to save my life. I have tried connecting remotly with debugclinet -p 9000
> runnning and without.

How did you try to connect to the debug client. With "telnet IP 9000" ?

> I do get xml output from debugclient -p 9000 when I run it and connect
> with Netbeans from the outside. Netbeans just sits there and times out
> on me. No breakpoints are able to be set.

Which version of the debugclient were you testing?

>
> Contents of my php.ini
> zend_extension="/usr/lib64/php/modules/xdebug.so"
> xdebug.remote_enable=on
> xdebug.remote_handler=dbgp
> xdebug.remote_host=localhost
> xdebug.remote_port=9000
> xdebug.idekey="netbeans-xdebug"
>
> Contents of my iptables:
>
[snip]

> Netbeans will not connect. There seems to be nothing I can do right with
> remote debugging. Do I have to have debugclient -p 9000 working for Netbeans
> to connect? If not what could be going wrong here. I have restarted all
> services with these configuration.

debugclient is a simple test client that works in the same way as
netbeans would. However, netbeans adds a few more restrictions though.

It works like this:

1. You start the debugclient
2. You request a script in your browser with "http://.../?XDEBUG_SESSION_START=1
3. Browser connects to the webserver with PHP and Xdebug
4. If Xdebug sees the "XDEBUG_SESSION_START=?" it will connect to the
   debug client on the remote_port and remote_host that you have
   specified in php.ini
5. debugclient (or netbeans) issues commands
6. Xdebug responds
7. repeat step 5 and 6 until the script dies or ends.

You can test in other ways in the following matter.

After step 1: run "netstat -a -n | grep 9000" It should show:

tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN

You can test step 4 with a tool called wireshark, which analyses network
traffic. You should see connections being made from the webserver to
port 9000.

Derick

-- 
Like Xdebug? Consider a donation: http://xdebug.org/donate.php
Xdebug | http://xdebug.org | xdebug-general@lists.xdebug.org
twitter: @derickr and @xdebug
Received on Fri Dec 10 2010 - 10:11:45 GMT

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST