Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » XDebug Problems with Eclipse PHP/PDT(XDebug Doesn't Work When it Should)
XDebug Problems with Eclipse PHP/PDT [message #1785887] Sun, 22 April 2018 11:53
Peter Schaeffer is currently offline Peter SchaefferFriend
Messages: 2
Registered: September 2017
Junior Member
I am having some difficulty using PHP xdebug with the PHP internal server provided by later releases of Eclipse. I am running Eclipse for PHP Developers Version: Oxygen.3a Release (4.7.3a). Interestingly enough xdebug is working quite well with Apache 2, but not the internal PHP server.

Note that the PHP internal server is running. I can use 'Run As 1Run on Server' to run a phpinfo PHP script and a helloworld PHP script. In these cases, the PHP internal server is started with the expected operands. The Linux ps command returns.

/usr/bin/php -S -t /home/peter/eclipse-

Note that port 8000 is used to start the internal PHP server (correctly as best I can tell) and no n operand is specified. This causes the /etc/php/7.0/cli/php.ini file to be processed (correctly as best I can tell). Note that port 80 was originally used to run this server. Of course, port 80 is retricted to root applications. The change to port 8000 was required to get the internal PHP server to start at all. Also note that checking 'Use system default php.ini configuration' and clearing the PHP ini file (optional) field in the PHP Executable preferences was required to get rid of the n operand.

Also note that I am having some difficulty switching between 'Run As' and 'Debug As'. In some cases I get a message showing that the required port (8000) is already in use. However, I have not found a way to reproduce this problem so far.

Using the procedures described above, the debug internal PHP server was started without the n operand and is processing the php.cli file. The Linux ps command returns.

/usr/bin/php -S -t /home/peter/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/htdocs

One question is why port 17278 was specified, rather then the expected port (8000). Running phpinfo() shows that xdebug appears to be installed in the debug internal web server. A few settings include

xdebug support enabled
IDE Key peter (my userid on this machine)
DBGp Common DeBuGger Protocol - $Revision: 1.145 $
xdebug.remote.enable on
xdebug.remote.port 9000

I tried to debug helloworld.php. The console has the following two messages. The first message shows a 404 code. The second message shows a 200 code.

[Sun Apr 22 17:36:20 2018] [404]: /?start_debug=1&debug_fastfile=1&use_remote=1&ZRayDisable=1&send_sess_end=1
&debug_session_id=1003&debug_start_session=1&debug_port=10137 - No such file or directory

[Sun Apr 22 17:36:20 2018] [200]: /Server-docroou/helloworld.php?start_debug=1&debug_fastfile=1&use_remote=1&ZRayDisable=1&send_sess_end=1

Note that the debug port is specified as 10137. Perhaps this is causing the problem. Port 10137 is normally used by the Zend debugger which I am not using. It turns out that the other operands (ZRayDisable, debug_session_id, etc.) are also associated with Zend. However, I am not using the Zend debugger.

Does anyone have any ideas? Thank you in advance. Note that this question has also been posted to SO.

[Updated on: Tue, 24 April 2018 21:34]

Report message to a moderator

Previous Topic:Error on chosing workspace on ubuntu
Next Topic:Keep getting "Error updating dirty state editor
Goto Forum:

Current Time: Sat Feb 04 22:15:34 GMT 2023

Powered by FUDForum. Page generated in 1.33967 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top