Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy. This forum is not for asking programming related questions.
I downloaded PDT the other week and I`m quite impressed with Eclipse.
I have managed to get the debugger working and successuflly stepped through some code but the debugger is locally installed and my code is actually running on a debian server. I have Samba installed on the server so I may directly access, search, merge, tortoiseSVN, etc the source code.
How would I (Can I even) install Zend debugger on the debian server and configure Eclipse to use the remote debugger so my MySQL connections work...
ANyone know of any tutorials or if it`s imple enough walk me through it please and thank you.
I have a copy of PHP CLI installed locally on my WIndows machine and a Zend debugger extension installed as well as I can get the Zend debugger working just fine but it operates locally on my files which is causing some minor issues with MySQL connections.
So I installed xdebug on the debian server, configured it properly to allow remote connections, etc and that seems to be working OK. Then I configured Eclipse to use XDebug instead of Zend debugger but now when I attempt to debug I get an error about "The current debugger does nothave any defined PHP executables. Please define a PHP executable location before continuing"
This makes sense but I don't want to use a local PHP binary, I want to use the PHP execuatble installed on my remote server, which is the one that has XDebug installed as extension anyways.
Is what I am trying to do even going to be possible?
Basically I want to keep Eclipse on my WIndows machine, working on files via Samba so they appear local, but are in fact remotely hosted on a debian server in my basement. I want XDebug and such running on the debian server, so I can get phpUnderControl running and so forth.
PCSpectra wrote:Is what I am trying to do even going to be possible?
It is possible, but you have to do it a bit different. Since php is not running on your local machine Eclipse can't start it, and can't configure it with debugging enabled. But you can tell xdebug to start by adding parameter to url (or setting a cookie in your browser) in case you're debugging a web application, or by setting environment variable on your debian machine prior to running php if you're debugging a cli script.
Xdebug manual wrote:After made all those settings Xdebug will still not start a debugging session automatically when a script is run. You need to activate Xdebug's debugger and you can do that in two ways:
When running the script from the command line you need to set an environment variable, like:
You can also configure the xdebug.remote_host, xdebug.remote_port, xdebug.remote_mode and xdebug.remote_handler in this same environment variable. All those configurable settings can also be set with normal php.ini settings.
If you want to debug a script started through a web browser, simply add XDEBUG_SESSION_START=session_name as parameter to the URL. Refer to the next section to read on how debug sessions work from within a browser window.
I read that in the manual but gave up to early I guess...I will try it again.
What confuses me though, is the code is remotely hosted, but locally accessible via Samba, yes the code still runs/executes fine. I simply changed the DB connection params and everything debugs fine but when I test it in my browser I need to switch back. PITA so it would be nice to have XDebug be used on the server.