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.
Related
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
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.
Here is my situation:
I am developing PHP CLI scripts on a distant server using Eclipse IDE with the RSE plugin (allows to edit files directly on the server).
Now I need to debug these scripts in a similar fashion than in Java (break points, show the variables content, ...).
I found something that could do the job: XDebug and PDT (Eclipse plugin). The problem is that when I try to launch the debug mode Eclipse says that there is no PHP debugger on the local machine. I guess it should be installed on the server machine.
I would like to know if it's possible to use PDT and XDebug to debug remote scripts and, if it's the case, how to configure them to do so. If not, I'd like to know if other solutions exist. It seems like XDebug uses TCP so it should be possible to debug remotely. I can change my IDE if necessary.
The server runs Ubuntu 10.04 with php5-cli and the dev machine with eclipse runs Win7 32bit.
Thanks
Yes this is possible, you need to enable xdebug in the remote server's PHP.ini file and make sure that the xdebug port (default 9000) is not blocked by any firewalls.
xdebug's page on setting up remote debugging.
Here is the complete procedure for the people who have the same problem:
First, install RSE by following the instructions on this website: http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.rse.doc.user/gettingstarted/g1installing.html
Follow the instructions on this HowTo to install XDebug on the server:
http://ubuntuforums.org/showthread.php?t=525257
Install PDT on Eclipse and do the following changes:
- under Windows/Preferences, go under PHP/Debug and change PHP Debugger to XDebug
- under Windows/Preferences, go under PHP/Debug/Installed Debuggers and configure XDebug. Change the field "Accept remote session (JIT)" to "any".
Open the Remote System Explorer perspective, select your scripts directories and create a project from them (Right Click, Create Remote Project). It will now appear in the PHP perspective.
Let Eclipse run and go to the server (e.g. via SSH). Run the script you want to debug. A Window will then appear on Eclipse proposing you to choose with which "local" (remote via RSE in our case) file you want to link the running script to. Normally, the default script proposed should be the correct one, because it is the one running on the server.
You should now have visual debugging with Eclipse for your PHP-CLI scripts!
Do you want to debug while being able to interact with the script on CLI or do you just want to start it and then step through the code? I guess your question is referring to the problem that you can't access the script directly through a URL. If that's your problem, then I guess the easiest solution would be to debug a usual PHP-web-site which requires your script. Then you can launch XDebug with that web-site initially and step into the script through the require/include-statement.
index.php:
<?php require_once("../../../../../dir1/[...]/cliscript.php");
Best regards
Raffael
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?
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.