Waiting for the XDebug Session 57% in Eclipse PDT
Asked Answered
H

7

13

Browsing the hints when I write this message it seems this is a tough question with all kind of patches, but no clear answer ... Anyway, I try my chance, here it is. I'm using Eclipse Helios PDT on Ubuntu 10.04, with XDebug and the corresponding section in php.ini as following:

xdebug support  enabled
Version 2.0.5

Supported protocols Revision
DBGp - Common DeBuGger Protocol $Revision: 1.125.2.6 $
GDB - GNU Debugger protocol $Revision: 1.87 $
PHP3 - PHP 3 Debugger protocol  $Revision: 1.22 $

Directive   Local Value Master Value
xdebug.auto_trace   Off Off
xdebug.collect_includes On  On
xdebug.collect_params   0   0
xdebug.collect_return   Off Off
xdebug.collect_vars Off Off
xdebug.default_enable   On  On
xdebug.dump.COOKIE  no value    no value
xdebug.dump.ENV no value    no value
xdebug.dump.FILES   no value    no value
xdebug.dump.GET no value    no value
xdebug.dump.POST    no value    no value
xdebug.dump.REQUEST no value    no value
xdebug.dump.SERVER  no value    no value
xdebug.dump.SESSION no value    no value
xdebug.dump_globals On  On
xdebug.dump_once    On  On
xdebug.dump_undefined   Off Off
xdebug.extended_info    On  On
xdebug.idekey   no value    no value
xdebug.manual_url   http://www.php.net  http://www.php.net
xdebug.max_nesting_level    100 100
xdebug.profiler_aggregate   Off Off
xdebug.profiler_append  Off Off
xdebug.profiler_enable  Off Off
xdebug.profiler_enable_trigger  Off Off
xdebug.profiler_output_dir  /tmp    /tmp
xdebug.profiler_output_name cachegrind.out.%p   cachegrind.out.%p
xdebug.remote_autostart Off Off
xdebug.remote_enable    Off Off
xdebug.remote_handler   dbgp    dbgp
xdebug.remote_host  localhost   localhost
xdebug.remote_log   no value    no value
xdebug.remote_mode  req req
xdebug.remote_port  9000    9000
xdebug.show_exception_trace Off Off
xdebug.show_local_vars  Off Off
xdebug.show_mem_delta   Off Off
xdebug.trace_format 0   0
xdebug.trace_options    0   0
xdebug.trace_output_dir /tmp    /tmp
xdebug.trace_output_name    trace.%c    trace.%c
xdebug.var_display_max_children 128 128
xdebug.var_display_max_data 512 512
xdebug.var_display_max_depth    3   3

I've been using Eclipse for PHP development without any problem so far, but never used debugging. When I launch the project in debugging mode I get the application correctly launched in the browser in the background, my by Debug/PHPDebug perspective is empty, while in the Eclipse console I have the message in the Title of this posting. Thanks for any help

Hadlock answered 2/3, 2012 at 13:42 Comment(1)
Got it! Although I did xdebug.remote_enable=On in php.ini, it seems that this is overwritten, for XDebug settings, by xdebug.ini. Therefore, I set the above in xdebug.ini and, finally, it works! HTH for others.Hadlock
W
19

If Eclipse is stopping at 57%, then the remote debugging process couldn't be started. This might the case, when...

  • You didn't enable remote debugging in the file /PHP/php.ini:

    xdebug.remote_enable=on
    
  • the remote host ip address (client which starts debug session (your IDE)) isn't correct:

    xdebug.remote_host=IP_ADDRESS
    
  • Instead of defining the remote hosts ip address you can enable "multihost" remote debugging using:

    xdebug.remote_connect_back=1
    

Also checkout the xdebug documentation for all settings: http://xdebug.org/docs/all_settings

Warm answered 2/3, 2012 at 15:38 Comment(4)
is the xdebug.ini is php.ini or some other fileIndividualize
In my case I had to add those lines to /etc/php5/apache2/conf.d/20-xdebug.iniHandsome
fixed by editing php.ini (only first two entries available in php.ini)Duer
I have several projects, each with a virtual host in Nginx and my PHP Eclipse Neon 4.6.1 has as Base URL the project domain name, which differs for each project. I therefore could not use one single remote host as specified with xdebug.remote_host=IP_ADDRESS option. Thus using the xdebug.remote_connect_back = On option helped.Maxfield
E
2

I was struggling to setup xdebug and eclipse for an age.

I use ubuntu 12.04 on a 32bit system. To setup the latest version of eclipse (juno) and the lamp tech stack i can strongly recommend this tutorial. There's a very good guide for setting up virtual hosts, too - script included.

Instead of following their section on installing xdebug, rather use xdebug's custom installation instructions referred to by @hakre in a related post.

Once xdebug shows up in the phpinfo output, you can continue by setting up eclipse for xdebug as described in the tutorial mentioned before.

If it still doesn't work make sure you

  • have read the answer above
  • xdebug's port is free and matches eclipse's debug configuration -> server tab -> server section -> configure button (9030 by default!)

and try

  • cutting the quotes from the zend_extension property within your php.ini file
  • putting all your xdebug-settings in your php.ini file - i dont have a xdebug.ini file in use.
  • repeating the filename within eclipse debug-configuration -> server tab -> url section -> last input field as shown below.

enter image description here

Execrable answered 4/12, 2012 at 16:34 Comment(0)
S
2

I found the problem for me was related to a specific browser, Firefox, and possibly due to an update of java to 7_21.

See my solution here Eclipse, XAMPP, xDebug - waiting for XDebug session - stays in 57%

Single answered 23/4, 2013 at 16:20 Comment(1)
My FF 20.0.1 also failed to send any debug requests. Once I switched my Eclipse's external web browser to Chrome, things started happening. ThanksAstred
S
2

I had the same issue and searched for ages trying to fix it! I verified everything with my remote host, my port listening, and my Eclipse settings. I finally found the problem was that I needed to specify the IDE for XDebug in my php.ini, like:

xdebug.idekey=ECLIPSE_DBGP
Seriema answered 3/4, 2015 at 18:39 Comment(1)
Other people said Eclipse would work with the default (none specified), but not for me.Seriema
R
1

Try edit the php.ini at: wamp\bin\apache\Apache2.4.4\bin

xdebug.remote_enable = on
xdebug.remote_host="localhost"
xdebug.remote_connect_back=1

I had the ame issue - editing the php folder php.ini when using WAMP seems to be not enough.

Repay answered 20/12, 2014 at 10:15 Comment(1)
WAMP does not use the php.ini file located in php, that is the default installation it then creates another copy inside the Apache directory when in doubt just click on the WAMP icon then go to PHP->php.ini that will pull up the correct file.Emanative
A
0

I had the exact same problem after I made a custom php build which accidentally replaced the original apache php module:

/usr/lib64/httpd/modules/libphp5.so
/usr/lib64/httpd/modules/libphp5-zts.so

To me, the fix is:

sudo rpm -e --nodeps php
sudo dnf install php
sudo service httpd restart
Ataxia answered 15/7, 2015 at 0:22 Comment(0)
P
0

I found that for me it was the missing xdebug.idekey=ECLIPSE_DBGP in c:>\php\php.ini

Anyway this is my current php.ini configuration for xdebug, note I've not set the remote address:

[xdebug]
zend_extension=C:\php\ext\php_xdebug-2.9.6-7.3-vc15-nts-x86_64.dll
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_handler=dbgp
;xdebug.remote_host=127.0.0.10
xdebug.remote_autostart=1
xdebug.remote_port=9000
xdebug.show_local_vars=1
xdebug.expose_remotely=always
xdebug.default_enable=1
xdebug.idekey=ECLIPSE_DBGP

My environment: W10 x64, php7.3.18 non-threadsafe, IIS as webserver

Publius answered 9/6, 2020 at 9:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.