I've been trying to get a php debugger for the last 2 days.
I ended up with xampp localhost-package and I'm pretty satisfied with it.
I just can't get any debugging to work.
Initially I tried to install xDebug, as was suggested here.
But that tutorial seems to be outdated. I tried couple other forum thread tutorials but couldn't get anything to work, with regards to xdebug. So abandoned xDebug and decided to stick with Zend because "it comes default" with xampp.
As far as I can tell, Zend Debugger doesn't come default with Xampp, I tried debugging with Eclipse, through my localhost server and it doesn't recognise the variables.
So I saw someone using a different version of Eclipse called "Zend Eclipse" and thought "surely that version has a default zend". I don't think it does, bugger if I know. I tried to "test" for zend debugger when creating a new debugging config and it says it's not installed.
Can anyone point me in the right direction of how to actually get Zend Debugger to run with Eclipse and Xampp?
Or..
Just tell me what you prefer to use for php debugging.
At this point, I don't care what I use, as long as it helps me debug my source code.
Thank you for your time.
Any help will be appreciated.
Regards,
James
Related
I am following this guide to setup a debugging environment for my PHP application. I am using eclipse and xdebug. I have done all the things that the guide has asked me to do. But when I put the breakpoints and run the application, the IDE doesn't stop. I know I am not being clear. But I don't know what else to say.
You can ask me questions and then maybe I will be able to explain my problem a little bit better. Thanks in advance.
Previously, i was able to set up the php debugging using xdebug and eclipse(say box1). But on a new machine(say box2) this is not at all working. I have been through a lot of forums and threads but dint find the solution to resolve my problem. Detail of the problem is:
I am using :
eclipse helios 32 bit,
WAMP 32 bit,
on my 64 bit win7 box. (same setup on box1 except box1 has win8 64 bit). On box2, i have successfully configured the xdebug as everything seems ok on the phpinfo() page(compared with the one on box1). checked all the setting in php.ini on both boxes, no difference.
Now, i setup the Debug As configuration on box2 (similar as on box1) and when i choose to debug eclipse on box2, eclipse does not do anything, while on box1 it start the debugging and launch the application in browser.
May be i am making some silly mistake, coz i have setup this once before as mentioned on box1.
But this time i am not having any luck.
Can you guys help please? i have been stuck here for 3 days now. :(
let me know if you need any more info.
Thanks.
[Solved]
I have downloaded a new version of eclipse Luna for PHP from the official website, and things are working fine.
Not Sure what was wrong with the eclipse Helios but for now my trouble is over.
Happy PHP.
Thanks.
i just tried to enable autocomplete Zend library in my Eclipse project, following this post => Zend Framework Plugin for Eclipse PDT , looks like it worked a while yesterday, then i shotdown my computer, and this morning, the only autocomplete i could get is the PhpCore one !
I restarted my computer 3 times, i clean my project too, and nothing change, and my project and my Zend library can be seen in my PHP Include path.
I just can't figure out what's going on, if anybody have a hint, it would be really great
PS: my IDE is the Helios Service Release 2 (Eclipse for php version 1.3.2)
One of my colleagues had a very similar problem which he resolved by creating a new eclipse workspace and re-importing the project. Another possible solution would be to run the eclipse workspace cleaner (run eclipse.exe --clean). If none of these approaches work, you may wish to consider raising a defect against Zend.
I am beginner to PHP. I want to debug/execute an existing PHP project. I have already installed Eclipse as IDE and what else should be installed in my system (OS is Windows xp).
And what and all settings should do in that...??
I request you to invest few seconds for this "Kid of PHP".......
I would recommend installing xampp, it allows you to run a website on your local machine.
php and a web server would come in handy ;-)
http://windows.php.net/download/
http://www.apache.org/dyn/closer.cgi
Firephp is a Firefox extension. It works as a module of Firebug. After you install it and add the php library to your code your messages will appear inside the browser. A real quick and clear way to debug in php.
Since you said you are a beginner, it is better NOT to go after advanced debuggers like xDebug at the moment.
print_r(); die;
is the best debugging tool for you now.
Also if you want to nicely format the output of print_r() when arrays or objects are shown, do this:-
echo '<pre>', print_r($array), '</pre>';
And Eclipse! If you are a beginner (or pro), definitely go for NetBeans. NetBeans comes with built-in support for xDebug and zend debugger and a lot other cool stuff you can use when you learn more. If you are going with Eclipse, you will need to install Eclipse extensions like PDT for making Eclipse support PHP.
Of course you will need a web server with PHP support. If you already don't have that, install xampp as somebody mentioned earlier. That's the easy way to get the web server running quickly.
NetBeans is just great, everything works out of the box. Very little to configure. (I'm a former Eclipse user)
I'm having trouble with debugging a PHP project through NetBeans using XDebug, and was hoping someone out there might have had this problem before.
Debugging works fine for the requested php file - so if I go to index.php on the remote server, I can put a breakpoint anywhere in index.php in NetBeans and the code stops there and I can step through.
The trouble is, all the other files appear on the call stack like this: "file:///home/user/site_html/library/class.requestprocessor.php" and because that's a path to a file on the remote server, NetBeans is unable to resolve the name, and so I can't step through the code for it. It makes debugging practically useless! The php file that was requested, for example index.php, appears just as "index.php", it's just all the other ones which are included that NetBeans can't resolve properly.
Is there some setting in NetBeans or XDebug that I can use to solve this problem? I have tried my best looking through all the project settings and options in NetBeans, and also looked through all the configuration options of the XDebug extention, but to no avail. Surely someone out there must have had this problem before? How did you solve it? I'll be very grateful if you could let me know.
If there's no other way, do users of Eclipse PDT and XDebug have this problem when debugging on a remote server? If not I'll make the switch.
This issue appears to be fixed in NetBeans 6.7.
Okay it seems no one is going to answer the question, so I'll post the results of my research.
As I was unable to find a way to make NetBeans successfully debug as I wanted, I tried using Eclipse PDT and Visual Studio 2008 with the VS.php extension in order to solve my problem. Eclipse PDT was hell to setup, and I wasn't happy with the way you couldn't specify a port to use for your FTP server in its Remote Server Explorer. I found VS.php did everything I wanted, it automatically uploads the code, as well as having perfect debugging, and it was EASY to setup. The only thing is, it looks ugly and I can't find a way to customise its colours. However, I'm going to choose function over fashion, and so I've settled on using VS.php as my final solution. Which to be honest is a shame, NetBeans was really great, I just can't live without a working debugger.
I had this same issue. I'm running Netbeans 6.8. You have to right click on your project, go to project properties/run configuration/advanced and set up path mapping. Map the folder on the server to a folder locally so that Netbeans knows which files to open locally when it hits these methods.