[UPHPU] Remote debugging with Xdebug on a Mac
Richard K Miller
richardkmiller at gmail.com
Thu Apr 16 17:00:47 MDT 2009
I reinstalled Xdebug today and was glad to rediscover it. It finally
"clicked" for me. (Installation was easy from MacPorts -- "sudo port
I'm trying to find a good solution for remote debugging. The concept
(which I just learned) is that your desktop debugging program listens
on port 9000 for connections from your local web server. Then when you
load a web page in your browser, the Xdebug extension, running in
Apache, communicates to your desktop program and allows you to step
through the code, set breakpoints, examine variables, etc.
I tried MacGDBp and liked it, but it was buggy. Too many freezes
and blank screens. Hard to blame an open-source program written by a
19-year-old college student. Wow. When that app matures, it will be
I'm currently trying NetBeans. There's a Mac version specifically for
PHP development and I'm impressed how easy it was to get started.
However, I don't know how to make NetBeans listen for Xdebug
connections. I can select "Debug Project" but that launches my
browser. I'm debugging AJAX calls so I don't want NetBeans to launch
the browser. I just want NetBeans to listen. (I've enabled autostart
in my php.ini file: "xdebug.remote_autostart=1" to make this
possible.) Can NetBeans do it?
Does anyone currently use Xdebug for remote debugging, especially on a
Mac? A command-line utility would be fine too, as long as it will
allow me to step through code, set breakpoints, and examine variables.
P.S. Here are the relevant lines from my php.ini file, if it helps
More information about the UPHPU