Xdebug issue with Eclipse PHP - eclipse

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?

Related

localhost- this site can't be reached

I'm trying to use red5 for a project. I installed it and gave ip as 127.0.0.1 and port 5080. I searched services.msc to start the server but could not find red5. I searched windows explorer and there was a shortcut to start red5. I clicked it and tried to connect in browser with 127.0.0.1:5080. But still couldn't connect. I searched using netstat and saw that 5080 is not used. What am I doing wrong?
I found the problem. Red5.bat could not find the path to jdk because of the semicolon at the end of the path to jdk in environment variable. I could start the server after I removed the semicolon.
Hope this helps anyone facing the problem.

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.

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

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.

How to debug PHP with netbeans and Xdebug in Windows?

I have installed PHP using wamp server in Windows and I have give the entry for Xdebug in php.ini And Debugging not working in netbeans. How to solve this?
Thanks
If you are using wamp server in windows, make sure you edit the correct php.ini file (open php.ini FROM WAMP TRAY MENU) or check the path to your used php.ini file in phpinfo().
The path to your dll file looks like it might be wrong. Under WAMP it would normally point to something like
zend_extension_ts="C:\wamp\bin\php\php5.2.11\ext\php_xdebug-2.0.5-5.2.dll"
Is Xdebug showing up in when you call phpinfo?
<?php
echo phpinfo();
If not, then you don't have it correctly installed, and I would check both the php error log and apache.
Also, do you have the correct configuration in your php.ini for xdebug - such as the ports, id/key, etc?
I answered this here but I thought this was worth re-posting since so many Windows users are having problems after getting all the configuration right.
In my case it was a process running on my machine (Windows 7) that was using port 9000 already called aeagent.exe
I changed my php.ini setting to "xdebug.remote_port=9001", made the corresponding change in netbeans, then restarted Apache. Now it works.
Thanks to SysInternals TCPView tool.