Local and Remote PHP Debuging in NetBeans with Xdebug on Google Chrome (just like in Visual Studio)

Have you ever wonder how to debug your php projects just like it is done in Visual Studio?Well it is not that simple as in Visual Studio.NET where you just click “Debug” and all is set for you. You need to install and configure couple of things but that’s about it.
In this tutorial we are going to set xdebug for php on Ubuntu server and we are going to use Google Chrome as a browser in our debugging process.

If your webserver is not installed on your machine but it is on the separate one you should set xdebug.remote_host to the IP of your development machine.
For example I run ubuntu with apache in virtual box so I setxdebug.remote_host=192.168.1.5
where 192.168.1.5 is the IP of my Windows host OS where I have NetBeans installed.

Yeah! At last! After two weeks of time wasting, finally you give me missing link: browser extension. I just can’t understand, why is it so hard for others who succeeded in making these tools work together to write down: “Dude, without a browser extension you will fail.”

You are the first one and I’m so glad! Thank you!

http://twitter.com/ButlerPCnet Michael Butler

Yes a browser extension simplifies things but you don’t need one. You can use a javascript bookmarklet which turns On/Off your DEBUG cookie. search google for “xdebug php bookmarklet”

Jebbushell

Doesn’t work for me. Everything looks healthy. No obvious errors. But stepping never gets enabled.

Anonymous

1. Did you enable the plugin for Chrome? The bug symbol at the end of the url bar should go green.

2. Are you sure that your ubuntu box can talk to your client? Is there anything blocking it like ubuntu firewall?