Just downloaded MacGDBp, unsure how to use it - php

I just downloaded latest MacGDBp 1.5 but I am unsure how to debug my php scripts through it. There is no documentation or readme on the website as well.
Looking for how will I load my Php scripts to debug in it?
Does it always works in conjunction with other IDE like Eclipse?
Currently it only debugs what ever I am debugging with Eclipse.
Thank you

Related

How to debug prestashop using Aptana?

I just downloaded and installed Prestashop, which is a PHP e-commerce system.
I also downloaded and installed XAMPP and Aptana , an open source IDE for PHP development. It uses MVC of some sort. (Sorry, I am completely new to PHP).
It looks ok, I can access the site and the changes I perform in Aptana are reflected in my localhost website.
Now I would like to debug the execution, Aptana has an built-in debugger and it works for a test example I downloaded from the internet (here). It works.
But when I try to set the breakpoint in the Prestashop project, it does not suspend the execution. Also, when I click on a link, the debugger stops.
I really have no idea how to set it up. Do you have any experience in debugging PHP? How can I set it up? I would be fine to change the IDE, if it helped me debugging this system.
Thanks,
Oscar
Prestashop has some good debug code built in already.
In config/config.inc.php change the define for _PS_DEBUG_SQL_ to true (you can also turn error reporting on in here) and in config/defines.inc.php set the define for _PS_MODE_DEV_ to true also.
Use Netbeans to debug your prestashop. In Netbeans you can use Unit Test or etc. check Netbeans tutorial for detail

html/css/jquery/javascript code completion in php file phpEclipse

This is my first post at this site. I searched alot but couldn't find what i was looking for so i decided to post the question.
Im a php developer. I was using dreamweaver because i like many features of dreamweaver like code/design view, html/css/jquery/javascript code completion within PHP file. The reason why i am switching from dreamweaver that it doest not provide debugging for php.
I installed phpeclipse and found it very promising but its missing many features i really liked in dreamweaver. I managed to install web page editor for design view but code completion for html css etc in php file is not working.
Is it possible to add all these features in phpeclipse? or
Is it possible to find all these feature in some other php IDE other than phpeclipse?
Thanks!
Yes indeed. There are two ways for the above. Netbeans 7.2 comes with a great support for PHP and also has some good plugins. The other way is that you can install apatana studio plugin in eclipse which provides autocompletion in css,html and JavaScript. Both the IDE's are promising. Try to install Apatana Studio on phpeclipse since it comes as a plugin. This would solve your problem. I would strongly suopport Apatana Studio with your existing setup for PHP in eclipse. Here is the link http://www.aptana.com/products/studio3/download The above mentioned link is the download page.

What to do to dubug/execute an existing PHP project

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)

XDebugging PHPUnit testcases in Eclipse PDT

Until now, I was debugging my PHP scripts and testcases using vim and the appropiate script with python backing it. However, me and my colleagues need to move forward and vim/gvim is not an option for them.
So I've tried to integrate debugging PHPUnit in Eclipse on my setup as an external tool, which again, works with vim. However, it simply waits for something when I
Launch the new external tool, then
start debugging as a CLI script
Remote debugging is enabled, the environment variable XDEBUG_CONFIG="idekey=ECLIPSE_DBGP_127.0.0.1" is also set.
Any ideas?
Addendum
Running the testsuite works. Debugging a web page works. Debugging a given test doesn't.
Eclipse waits forever for something at 57% when trying to debug a phpunit test. I'd like to provide more information, but it doesn't tell me more either.
I have wrote an article about how to get it done launching phpunit unit tests from eclise pdt not using the external tools launcher but the phpunit.php script itself, look here:
http://elespaciodejaime.wordpress.com/2010/04/19/pruebas-unitarias-en-joomla-con-phpunit-y-soporte-para-debugging/
the explanation is at the end, by the way, it is in spanish.
You find a tutorial and the code of a simple lightweight way of testing Joomla 1.5 and Joomla 3.x component here on Github. You can see what changed between testing under Joomla 1.5 and in Joomla 3.x. The examples are based on the use of PHPUnit + DBUnit installed with Composer and configured and run in Eclipse Luna for PHP Developer (PDT).
you can launch a debug session by going to the php debug perspective and select from the menu run->debug->debug as php web page or debug php script.
If you use zend studio you can debug as a php unit test.
There is also a firefox extension that helps with debugging with xdebug https://addons.mozilla.org/en-US/firefox/addon/3960
Also make sure go to preferences panel and select php->debug->installed debuggers and click on xdebug then click on configure. There should be an option to allow incoming connections. Select that and you can launch remote debug sessions from firefox.

NetBeans PHP and XDebug - jumping to methods on call stack?

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.

Categories