Why can't I start a debug session on Eclipse using Xdebug? - eclipse

I've been debugging in Eclipse with Xdebug without any problems, but for some reason since this morning, when I try to start a debug session, I get an error like this from Eclipse:
"The file 'http://localhost/index.php?XDEBUG_SESSION_STOP_NO_EXEC=ECLIPSE_DBGKEY=13288911493954' could not be found.
In my phpinfo file, I can see that Xdebug is working.
I'm using Elipse 3.7.1, Xdebug 2.1.3.
This is the Xdebug config in my php.ini file:
zend_extension = "c:/wamp/bin/php/php5.3.8/zend_ext/php_xdebug-2.1.3-5.3-vc9-x86_64.dll"
[XDebug]
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
Any help will be greatly appreciated.

The message you receive is because Eclipse is trying to stop a debugging session. It's a wrong URL as well, as it should really say "http://localhost/index.php?XDEBUG_SESSION_STOP_NO_EXEC=1". Why it wants to stop, I can't tell you, but the ?XDEBUG_SESSION_STOP_NO_EXEC=1 gets captured by Xdebug and makes the request not proceed.
To find out, you can perhaps use the xdebug.remote_log setting (http://xdebug.org/docs/all_settings#remote_log) to create a log file on what Eclipse is trying to get Xdebug to do.

Related

Eclipse XDebug stuck on 78%

i try to setup eclipse in order to debug my joomla web app.
I'm using MAMP on local machine, with php 5.6.10.
php.ini has these line:
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
When try to start debug on Eclipse, the progress bar stuck on 78%:
Waiting for XDebug.
How i can fix this problem?
Change the remote host to
xdebug.remote_host=IP_ADDRESS
try to enable multihost debugging using this
xdebug.remote_connect_back=1
Also check if your IDE is set in php.ini file
xdebug.idekey=ECLIPSE_DBGP
For further help you can check this link https://xdebug.org/docs/remote

Debugging with XDebug PHPStorm and SoapUUI

I've switched from Eclipse to PHPStorm and everything is working fine but only the debugging with XDebug ans SoapUI is still not working.
XDebug is installed. I used to add a GET parameter ?XDEBUG_SESSION_START=ECLIPSE_DBGP on the end of the wsdl url in SoapUI and Eclipse stopped at the first breakpoint properly.
When I close Eclipse, start PHPStorm and click to start listening for debug connections nothing happens.
I use ?XDEBUG_SESSION_START=PHPSTORM_DBGP. Only a Chrome-Plugin is able to start debugging in PHPStorm, but I need to debug with SoapUI too.
Can anyone help me with this issue?
Thank you very much in advance for any help!
I had to set path settings at PHP Servers configuration.

Remote XDebug with Aptana and Zend Framework

Okay, I'm killing myself over this. I've been trying every single tutorial I can and still not luck. Aptana is just "waiting for XDebug Session".
I have XDebug setup on my remote server on port 9000.
xdebug.remote_enable=On
xdebug.remote_host="localhost"
xdebug.remote_port=9000
xdebug.remote_handler="dbgp"
xdebug.remote_mode="jit"
This all seems to be correct and phpinfo makes it look correct. Now I went into Aptana to set this up and all of the tutorials involve localhost in some way. Maybe I am severely overlooking a component of xdebug (can it only debug local?). There is no way currently to have my application run locally because I am running nontraditional stack items which I don't want to install just for this.
I have setup aptana php interpreter: http://grab.by/poMm
I have setup aptana remote server using my base url and the local file document root
I have chrome xdebug helper turned on using key ECLIPSE_DBGP
Aptana is still just waiting for XDebug session. Please help!
Here is the relevant part of my (working) php.ini:
zend_extension=/usr/local/zend/lib/php_extensions/xdebug.so
xdebug.remote_enable=on
xdebug.remote_log="/var/log/xdebug.log"
xdebug.remote_host=localhost
xdebug.remote_handler=dbgp
xdebug.remote_port=9000
xdebug.remote_autostart=1
xdebug.remote_connect_back=1
Note, there are several differences between your config and mine:
You enclose many of your vars with quotes
"On" should probably be "on" (without quotes)
there is no reference to auto_start or connnect_back
Try making those changes and see if that does it for you.

Eclipse Helios not stopping at breakpoints

I recently upgraded from Eclipse Galileo to Helios. Helios stops at breakpoints ONLY when debugging "as a PHP Script", but not when debugging "as a Web Page".
When debugging as a web page, it looks like the correct debug query string to start a debug session is getting tacked on to the url, like so:
http://localhost/hello.php?XDEBUG_SESSION_START=ECLIPSE_DBGP &KEY=129798139020511
but elipse does not stop at the breakpoints. It just zooms thru the code and displays the output in the browser.
This is my xdebug configuration in php.ini that works for Galileo, but is not working for Helios: (click here to see my entire xdebug config settings)
;extension=xdebug.so <-- is this needed?
zend_extension=" /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-no n-zts-20090626/xdebug.so "
xdebug.remote_enable=on
xdebug.remote_autostart=off
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.idekey=
; to enable remote debugging
zend_debugger.allow_hosts=127.0.0.1/32
zend_debugger.expose_remotely=always
Can you post your xdebug configuration that works for Helios? If possible, can you share the xdebug portion of your phpinfo() output? Would like to compare settings of an xdebug configuration that works on Helios with what I have.
I am having the exact same issue. I did find some bug reports about breakpoints in Galileo not being able to be used in Helios. I can get Helios to stop on breakpoints at times, but I have to delete all my breakpoints and then start debugging, and only after that add a breakpoint. Needless to say this is very annoying. I'll try and find the link that I saw and add it to here.
For now I've gone back to Galileo.
Malks.
I'm using:
Ubuntu 14.04 64 bits
Eclipse Luna
Nginx
PHP Fpm (via socket)
I solved this debugging problem disabling IPV6
Edit /etc/sysctl.conf and add the following lines:
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Then reboot or sudo sysctl -p

Xdebug issue with Eclipse PHP

I am currently trying to setup Xdebug on an XP computer with Eclipse PHP installed. I am using WAMP and I'll think I have done everything by the book (as intended by several tutorials online), but when I'll try to execute the Debugging and start the session, nothing happens, which also is notified by Eclipse. Another tab is opened with the GET-string appended in Firefox, but that's about it.
I have no Idea of what to do to make it work, but I'll guess that im not the first one having this issue, so asking here might not be a bad idea!
I am very grateful for any answers that could help me out in the right direction. Debugging is a brand new thing for me.
Thanks!
Here is also some info:
Eclipse says:
Launching: Waiting for Xdebug session
Here is how my php.ini looks:
[xdebug]
zend_extension="c:/wamp/php/ext/php_xdebug-2.1.0beta2-5.3-vc6.dll"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_host=127.0.0.1
xdebug.remote_mode=req
xdebug.idekey=default
xdebug.remote_log="C:/xdebug.log"
xdebug.remote_port=9000
xdebug.show_exception_trace=0
xdebug.show_local_vars=9
xdebug.show_mem_delta=0
xdebug.trace_format=0
And the URL:
http://localhost/debugtest/index.php?XDEBUG_SESSION_START=ECLIPSE_DBGP&KEY=12658406113583
After everything checked out correct (browser path, listening port, php -i, XDEBUG_SESSION_START=..., duct tape, etc.) and it still sat there waiting for Godot, rebooting fixed the problem. Yay Windows.
Your stuff looks good but, how is your IDE setup?
What port is it listening on and what KEY is it sending?
Also, I always set a xdebug_break() breakpoint in code to get xdebug to catch and start talking to my IDE.
Have you tried that?