PHP Remote Debugging with NetBeans 6.8

Well, I guess this post might have been added to my blog about the remote development but I guess a different article is better. So as NetBeans 6.8 getting better and better you can also debug your php code with it. All you need is to install xdebug on your php installation and define some variables to the php.ini file and you are ready to go.
Continue reading PHP Remote Debugging with NetBeans 6.8

PHP Debugging on PHP IDEs

As NetBeans has started to be a great IDE with powerful debugging features, like most people who are migrating to NetBeans, I would like to use it’s built-in debugger abilities. PHP debugging is not new. XDebug is quite around for some time but it always lacked the attention it has now. From now on PHP Developers are starting to use IDEs instead of colorful text editors. Because from now on, PHP started to be accepted as an Enterprise language. It’s pretty easy to code with PHP, it’s very simple but yet it can be a good base for complex applications. With the newest release of PHP 5, it also contains OOP features and with powerful frameworks built around (CakePHP, CodeIgniter, Symphony, Zend,…) some strict rules apply on designing your application for a cleaner, better code and yet you can still use the quick and dirty ways. :)

Continue reading PHP Debugging on PHP IDEs

Develop Menu Bar in Safari

As a new MacBook Pro owner and a rookie MAC OS X user, I’m missing a lot my old Firefox/Firebug partners. As a web developer, you encounter a lot of moments where you have to look to the source to a specific html and change it to see how it will react to the changes or instead of writing saving and executing process, you just write the javascript code to the firebug js console and you see the results instantly. I was missing these features a lot. But it looks like, they were already implemented in the Safari!

When I googled around for Firebug like features for Safari I found out that there was such a command which was really easy to execute and was enabling some of the hidden debug features of the Safari.


defaults write IncludeDebugMenu 1

Later I found out that there was a “Show Develop menu in menu bar”. I’m not sure if it really enables all the things that are being enabled with the command but it also works.

You can view the load times of files and images and such, also you can run js commands with the command panel, you can easily browse the html tree and get cool eye candies with highlighted areas where you can easily see where you have selected in the html viewever, you can see what are the css properties of the selected element and such. It’s just cool. The only missing thing is the. ability to edit the html! It would be really marvellous to be able to edit the html and see the changes on the fly. Perhaps there is such a feature but I was not able to find it out yet. If there is someone who knows this, just let me know too.

By the way, Macbooks are really cool and really great. It’s not even a week that I have bought a MacBook Pro but I know that my next laptop/notebook/desktop/netbook will be another Mac!

Netbeans 6.5 and PHP Support

Well, a new feature has been added to Netbeans from now on. With the new release of 6.5, PHP support has been added and now we have an IDE which fully support code complete (including your own classes, methods, functions and variables), PHPDoc abilities(showing doc for your own classes) and, of course, debugger features. It’s in the RC2 but final release is coming on a week or two.

Netbeans is using XDebug, for debugging. All you have to do is add xdebug extension to your php.ini and set some xdebug property like debug port, debug host and alike. There is a good tutorial here on the Netbeans wiki page. You can also use that link for a good debug tutorial.

Debugging is quite powerful and easy with Netbeans now. Even there are some missing things. You have to setup a debug profile from properties to be able to debug a url, that’s annoying. But it’s on the improvement list as I had learned. Also sometimes breakpoints does not work, even though that I’m sure that that part of the code is used but not opened as in active editor pane. But it does open closed documents if you use step by step debugging. There is also a javascript debugger, which is installed as a Firefox plugin. But I did not yet tried that.

Above from debugging feature of Netbeans Xdebug is also great at showing you errors. As a virgin of XDebug I really felt good when I saw the call stack for the current error. Xdebug replaces current error handler of PHP and shows call stack with error.

I guess it will be great. It’s really lightweight too if you just install PHP and not the rest, it’s only 24 MB. And code completion is also very useful and successful. The only IDE with support of custom class code completion was PDT and of course Zend Studio 6.x (also the lower versions were also supporting that.) which both are basically built on the same code base.

I guess from now on PHP Editor wars will be really great! As PHP grows and becomes more powerful, tools you use to develop it becomes far more powerful. It’s sad to see that C# had a built in debugger in Visual Studio for years even though it was younger than PHP. But I guess you need to have money to develop these kind of tools. At least we have a one now! And not just a black screen debugger and profiler but a GUI with powerful features.

By the way, Fedora is coming too..