Eclipse xdebug session never ends

I am trying to get xdebug to work with eclipse (3.5) / php (on xampp windows 7). I confirmed that xdebug is included in php - I have a fancy output and my phpinfo shows all xdebug files. I have remote debugging and I typed the lan ip address on my eclipse machine.

When I tell eclipse for debugging, it launches the browser and passes the debugging url parameters. It looks ok.

However, in an eclipse debugging perspective, it shows 'launch myproject' 57% 'waiting for xdebug session'. He is sitting there forever.

I disabled Windows firewall on both machines.

I tried to enable an implicit flash.

Any ideas?

+51
eclipse php xdebug xampp
Mar 03 '10 at 20:12
source share
27 answers

I had this problem too, and I skipped this line in the php.ini :

 xdebug.remote_enable = On 
+60
Oct 12 '10 at 8:45
source share

Make sure you define zend_extention in ABSOLUTELY in php.ini :

for example: zend_extension=D:\SANDBOX\server\php\php_xdebug-2.1.0-5.3-vc6.dll

I am debugging a local project on Windows. I don't need xdebug.remote_enable = On .

Suggestions if the Xdebug session does not start (hangs with 57%), make sure that:

  • Directive
  • zend_extention set with an absolute path and debugging is loaded, use phpinfo() to check
  • the firewall does not block the default port of 9000 or Eclipse.
  • another application does not use a port (run: netstat -an |find /i "listening" from the command line)

If you need to configure using a different port in php.ini :

 xdebug.remote_enable = on xdebug.remote_port = XXXX 

and fix the Xdebug settings in Eclipse:

XDEBUG settings in Eclipse

+13
Feb 25 2018-11-11T00:
source share

I had the same problem and fixed it by changing the port to XDebug (now using port 9001).

Here is my php.ini content:

 zend_extension ="C:\...\EasyPHP-5.3.3\php\ext\php_xdebug-2.dll" xdebug.remote_enable=1 xdebug.remote_host=localhost xdebug.remote_port=9001 xdebug.remote_handler=dbgp xdebug.profiler_enable=0 xdebug.remote_mode=req xdebug.remote_autostart=0 

Also check the apache log file and make sure you do not have the following warning message:

PHP Warning: Xdebug MUST be loaded as a Zend extension in Unknown at line 0

Warning : Xdebug MUST be loaded as a Zend extension in Unknown at line 0

If you do, open the php.ini file and comment it with ;; line extension=php_xdebug-2.dll :

 ;extension=php_xmlrpc.dll extension=php_xsl.dll **;extension=php_xdebug-2.dll** ;/PHPExt 
+8
May 11 '11 at
source share

After a three-hour battle and trying out each solution on the forums, I found out that the simple trick was to remove the quotes by specifying the path in the Xdebug DLL in zend_extension strong> in php.ini . I am using XAMPP (PHP 5.3.6 + Apache 2.2) + Eclipse Indigo + PDT + Xdebug 2.1.2 on Windows Vista.

Here is the exact configuration that worked for me -

 zend_extension=C:\xampp\php\ext\php_xdebug-2.1.2-5.3-vc6.dll #Note that the path above is not in quotes xdebug.remote_enable=true xdebug.remote_host=localhost xdebug.remote_port=9001 xdebug.remote_handler=dbgp xdebug.profiler_enable=1 xdebug.profiler_output_dir=C:\xampp\tmp 

I used port 9001 so that it does not collide with 9000 if it is already in use by another program. Make sure it matches the port in Eclipse> Preferences> PHP> Debugging> Xdebug too. Also, restart apache after editing php.ini.

As soon as I added this to php.ini, everything worked like ice cream.

+6
Jan 04 2018-12-12T00:
source share

I had the same problem with Zend Studio. I noticed that the xdebug session did not start properly. I passed this string to the url once, and it has been working ever since.

 http://localhost/myalias/?XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=13750956767461 

I am sure this is a configuration issue somewhere in the IDE.

+6
Jul 30 '13 at 6:46
source share

I realized that the TCP port is being used, and that is why it hung. I changed the port in php.ini and eclipse settings.

+3
May 27 '10 at 12:06
source share

check this link:

http://xdebug.org/docs/remote

There is one session about new plugins for chrome and firefox, and they work fine.

+3
Aug 02 2018-11-11T00:
source share

Verify that the Eclipse web browser settings are correct.

Window / Settings / General / Web Browser / External Web Browsers / Change Settings

In my case, the path to the binary file of the external web browser was wrong. He said "/ usr / bin / mozilla" instead of "/ usr / bin / firefox". I don’t know how this setting appeared, but after changing it, the Firefox browser window finally appeared.

+2
Sep 13
source share

I looked through the apache log and there were many lines with a file error not found.

Launch -> Debug Configurations -> PHP Web Page -> Your_configuration

I unchecked the auto generate checkbox and set the index.php file name.

It seems that in the event of any error that interferes with the normal functioning of the eclipse, it "expects a session"

+1
Jul 27 '14 at 10:01
source share

I had the same problem. My configs were equal to yours and in addition to xdebug.remote_enable = On in the php.ini file they also added the following:

 xdebug.remote_connect_back=1 

this allows multihost remote debugging, alternatively you can determine the host IP address.

 xdebug.remote_host=IP_ADDRESS 
+1
Oct. 14 '15 at 2:58
source share

Yes, check network / port statistics. In my case, I use vmware fusion on mac, and the vmware-natd process clogs the processor (blocking on the open port, which I assume), which I did not notice. php.ini was absolutely right, I had to run it to get it working again:

 sudo "/Library/Application Support/VMware Fusion/boot.sh" --restart 

So, first check the php.ini file (or xdebug.ini). If this looks fine ala this discussion , check to see if you have any network problems.

0
Jun 17 '10 at 23:14
source share

I no longer know what this means to you or not! But you ended up in a PHP file (anything.php) with the correct debugging option, something like XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=12882809194391 .

People often make the mistake of getting into an HTML file with debugging options that make Eclipse hang in an xdebug session

0
Oct 28 '10 at 15:52
source share

I had a similar problem, and it turned out that I was using the wrong DLL. Hope this helps someone in the future.

0
Jul 18 2018-11-11T00:
source share

I had the same symptom. However, my problem was that I set xdebug.remote_host = "" I did this because I use apache virtual hosts to eliminate the need for localhost . However, I changed it to xdebug.remote_host = "localhost" and then change my apache / etc / hpppd-vhosts.conf to point localhost to my root c: \ web.

0
Oct 02 2018-11-21T00:
source share

For me, these symptoms were caused by the Windows Firewall (Win7 Pro). I needed to explicitly allow eclipse to pass the firewall. I did this through the dialog in the section "Control Panel \ All Control Panel Items \ Windows Firewall \ Allowed Programs".

0
Oct. 19 2018-11-21T00:
source share

This may not be useful to everyone, but ... when trying to debug remote hosts, always remember the DSL router! (or any router along the way) I spent hours trying to find a solution when I noticed that all I needed to do was activate port forwarding (port 9000) on my Linksys, and everything works like a charm :)

0
Nov 06 2018-11-11T00:
source share
  • The above data was helpful. I checked the xdebug parameter values ​​in phpInfo () and found that despite my settings of 1 or On, Auto_trace and remote_enable are disabled. So I made it true . And then the remote worked !. Thank.
  • Please note: now you can start a remote debugging session from Eclipse by configuring various OR / debugging configurations and whenever you run such a customized application outside of Eclipse, you will get a question in Eclipse to accept or not to accept a debugging session, so if you If you are on a different machine than the eclipse interface, you may find that your application is expiring for no reason. Actually there would be a yes - no dialog box wherever the Eclipse session was
0
Apr 28 2018-12-12T00:
source share

If Netweaver/Eclipse cannot connect to XDebug , you can check the Apache logs for entries of something like: Cannot load Xdebug - it was built with configuration API220090626,TS,VC6, whereas running engine is API220090626,TS,VC9 [Fri Jun 01 18:38:05 2012] [notice] Child 3404: Child process is running

To fix this, select the correct XDebug binary version from the XDebug website (try a few combinations until you make money)

0
Jun 02 2018-12-12T00:
source share

This thread helped me sort out my issue with MAMP on OSX with Eclipse. After upgrading to MAMP 2.1.1 from version 1.x, I was unable to get xdebug to work in eclipse. He hung at 57%.

phpinfo showed that the xdebug extension was loaded normally and there were no errors in the PHP or Apache logs.

I just wanted to debug locally, but the reason is that remote debugging was not enabled. Adding xdebug.remote_enable = true to the MAMP template PHP.ini and restarting MAMP solved the problem.

0
Jul 26 2018-12-12T00:
source share

In my case, the CLI application worked fine, but it was a web application that stuck at 57%.

It worked after two changes:

  • made a server debugger like XDebug
  • Automatically generate a true url.
0
Aug 01 '12 at 11:21
source share

Before setting up eclipse, check that the following content is displayed in the phpinfo function.

This program uses the Zend Scripting Language Engine: Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies with Xdebug v2.2.3, Copyright (c) 2002-2013, Derick Rethans

0
Feb 21 '14 at 8:10
source share

I also ran into the same problem. I double checked all the settings in php with phpinfo() output and everything was fine.

Allow Java (TM) platform SE binary file through the firewall did the trick.

Check the commands this question , they are very useful for debugging!

0
Dec 14 '14 at 22:04
source share

I tried all possible solutions on this post to get xdebug to work on a site running on Apache (http port 8000) to no avail. Then I accidentally noticed that xdebug was running on another site that worked on port 80. As soon as I changed the other site to port 80, it finally let me debug it.

I wonder if there is a parameter that can force Apache to allow xdebug for other ports, not just 80. I have several sites running on Apache, and I would like to debug each of them without having to reconfigure the ports. Has anyone had this problem before? or knows how to fix it?

0
Sep 08 2018-01-15T00:
source share

If your configuration is ok, just delete the file: YOUR_WORKSPACE / .metadata / .plugins / org.eclipse.core.resources / .root / .markers

0
Mar 04 '16 at 8:51
source share

Was there the same problem using Uniserver Zero XIII 13.2.0 (MS VC12 distributed installation required) and Eclipse Neon Release Candidate 3 (4.6.ORC3). Our site uses phalcon, when we found a problem with phalcon.dll and php7.0, we returned to php5.6. We checked the xdebug settings above, added zend_extension = $ (US_ROOTF) /php56/extensions/php_xdebug.dll-- did not connect, breakpoints.

Found a warning at the top of the Eclipse dialogue project | Real Estate | Php | Debugging | Setting workspace parameters ... | PHP executables | PHP56 (default for workspace) | Edit | Debugger | "The XDebug extension is not installed. Please visit http://xdebug.org ...". This made us suspicious of the php_xdebug.dll version (2.5.0) in Uniserver 13.2.0 php56. I downloaded php_xdebug-2.4.1-vc11.dll, dumped it in / php 56 / extensions and PRESTO! Eclipse PHP Debugger Works!

0
Nov 09 '16 at 21:08
source share

For me, adding the [xdebug] configurations suggested by others to the php.ini file stored in the following path C: \ wamp64 \ bin \ apache \ apache2.4.23 \ bin. In fact, this is a symbolic link that points to / links to the phpForApache.ini file in your corresponding folder of the php version, which is installed using wamp64, for example. php5.6.25.

In short, adding the following lines to phpForApache.ini to help me -

  zend_extension = c:\wamp64\bin\php\php5.6.25\ext\php_xdebug-2.5.1-5.6-vc11-x86_64.dll xdebug.remote_enable=On xdebug.remote_host="localhost" xdebug.remote_port=9000 xdebug.remote_handler="dbgp" 

Hope this helps

0
Mar 01 '17 at 8:13
source share

Here is another blog that mentions how to verify that Xdebug is installed correctly or not using the command line http://allcodeverything.blogspot.com/2012/07/code-debugging-with-xdebug-and-eclipse.html

He mentions this. If you want to find out if everything works well, here is a good piece of code that you will run through the CLI (command line interpreter, mostly outside of Apache or the browser, just pure PHP) after you type the following in your browser: "http: //localhost/dbgtest.php? XDEBUG_SESSION_START = ceable"

 <?php $address = "localhost"; $xdebug_port = 9000; $sock = socket_create(AF_INET, SOCK_STREAM, 0); socket_bind($sock, $address, $xdebug_port) or die('Unable to bind'); socket_listen($sock); $debug_client = socket_accept($sock); echo "connection established: $debug_client"; socket_close($debug_client); socket_close($sock); ?> 

The command line window should print something like "connection established: Resource identifier number 5".

-one
Dec 06 '12 at 19:12
source share



All Articles