Eclipse PDT - xDebug
I recently heard about this debugger called xDebug on here, and have been curious to get it running on my machine. I'm using eclipse PDT.
I'm going to take you through the steps I have taken (very brief) and then I hope to get some feedback.
1) Used the wizard at xDebug - It's the one where you copy the output of your phpinfo().php into a textbox, and receive tailored instructions on how to install xDebug with your set-up.
My tailored feedback went like this:
1) Download php_xdebug-2.2.1-5.4-vc9.dll
2) Move the downloaded file to C:\php\ext
3) Edit C:\php\php.ini and add the line
zend_extension = C:\php\ext\php_xdebug-2.2.1-5.4-vc9.dll
4)Restart the webserver
So I downloaded the file, moved it to the appropriate location, and added the extension to my php.ini. It may be worth noting that I do not currently use the zend framework, although I'm not sure if that matters.
When that was done, I restarted apache.
After that, I fired up eclipse, went to Window > Properties > PHP > Debug and selected xDebug as my debugger.
Another thing that may or may not be worth noting: When I go to installed debuggers in eclipse, it lists xDebug with the port of 9000. Zend debugger is also on that list with the port of 10000.
So here's where I assumed/hoped I would be done with the installation, and attempted to use breakpoints:
So I opened up a random php file, and added breakpoints to parts of the code that I thought would run (and should run) and went to run > debug.
Something happens, I'm not sure what. The internal browser in eclipse opens up, I enter data into a form, at which point, the breakpoint should.. break.. the script, but it doesn't. It simply gives me the output I would get if I had run it in a regular browser.
I also can't find a button to step over/step into.
Any help would be appreciated ^^
Am I missing some critical part here? I'm having a hard time finding more information about this.
First thing I would do is read http://robsnotebook.com/php_debugger_pdt_xdebug (very long read)
There is also this one http://www.phpeclipse.com/wiki/Howto...gAndPHPEclipse (shorter read, but might not solve a configuration issue)
I had issues getting this to work on the Mac using phpstorm. I seem to recall using a compiled version of xdebug used by the komodo IDE to get it to work. No idea whether this will work for you (especially as I'm on the Mac), but might be worth a go.
It's been a while since I did this, but I *think* this is the page with the downloads: http://code.activestate.com/komodo/remotedebugging/
In your case, it will mean downloading the xdebug.dll file (it's an .so file on Mac), and pointing your apache/php settings towards that.
Sorted! I must admit that I came across Rob's website before, but I ran away from the wall of text. Partially because he was running XAMP though, and I also assumed he had the zend framework installed.
Originally Posted by cpradio
Here's what fixed it for me:
1) All the steps I listed in the first post.
2) Adding the following lines to php.ini
;; Only Zend OR (!) XDebug
; Modify the filename below to reflect the .dll version of your xdebug
Should note that zend_extension was altered to the .dll file I posted about in the first post.
3) Restarting the server
Now I can start debugging by using F11 to - and then using F5/F8 to step into/step over.
Thank you cpradio for all your help! And thanks as well for your reply aaarrrgh, I was going to try your solution next ^^