Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » PHP Development Tools (PDT) » Configuration of PDT debugging with docker container based server(Xdebug not stopping when launched by eclipse in docker based server)
Configuration of PDT debugging with docker container based server [message #1764109] Thu, 25 May 2017 00:09
Frank S is currently offline Frank SFriend
Messages: 1
Registered: May 2017
Junior Member
I have a development environment hosted on a linux cp using docker containers for the server and database. The server container includes apache2, php7 and xdebug. I have eclipse installed on the host computer. The server container is configured with xdebug having the following parameters:

xdebug.profiler_enable_trigger = 1
xdebug.trace_enable_trigger = 1
xdebug.remote_enable=1
;xdebug.remote_host="172.18.0.1"
xdebug.remote_connect_back=1
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.profiler_output_dir="/var/www/ministerScheduling/clients/olmc1org/logs/" 


I have tried using the remote host address which is exposed by phpinfo() when executed from a web browser on the host computer and using the remote_connect_back feature. Both behaved the same.

I have confirmed that xdebug can be remotely launched using the following code which shows that the connection is established when a page is requested with the following string appended to the url :

&XDEBUG_SESSION_START=mySession


Here is the script monitoring the connection:
$address = "127.0.0.1";
$port = 9000;
$sock = socket_create(AF_INET, SOCK_STREAM, 0);
if ($sock === false) {
	echo "Socket connection failed...  ";
	$lastError = socket_last_error();
	echo  socket_strerror($lastError);
} else {
	echo "Socket connection made...  ";
	$bindResult = socket_bind($sock, $address, $port);
	if ($bindResult) {
		echo "Bind was successful...  ";
		$listenResult = socket_listen($sock);
		if ($listenResult) {
			echo "Socket is listening...  ";
			$client = socket_accept($sock);
			if ($client === false) {
				echo "Accept failed...  ";
				$lastError = socket_last_error();
				echo  socket_strerror($lastError);				
			} else {
				echo "Connection accepted...  ";
				echo "connection established: $client";
				socket_close($client);
			}
		} else {
			echo "Listening failed... ";
			$lastError = socket_last_error();
			echo  socket_strerror($lastError);
		}
	} else {
		echo "Bind failed";
		$lastError = socket_last_error();
		echo  socket_strerror($lastError);
	}
	socket_close($sock);
}


Yet eclipse will hot launch the debugger and when manually launched stops with the status showing Launching file.php (48%).

Help!!!
Previous Topic:Eclipse (Neon.3 / Windows 10) delete whitespace after a variable on paste
Next Topic:New User - Help configuring
Goto Forum:
  


Current Time: Thu Apr 26 17:42:48 GMT 2018

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

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