Thanks, Walt. Do you know if it's possible to do AJAX debugging, where
the request originates when I click in my browser instead of when I
click "Debug Project" in NetBeans?
Richard
On Apr 16, 2009, at 8:20 PM, Walt Haas wrote:
I use Xdebug and Netbeans on Ubuntu. Basic requirements:
1. The user running Netbeans must be able to write to the directory
with the PHP files, ie. Apache DocRoot. This is required for you to
set a breakpoint.
2. Create a New Project and use the above directory. You will need
to specify the file to start execution with (index.php or whatever
you use) and the URL (http://localhost/whateveryouuse/) to start
execution.
3. Click on the Debug Project icon. It will start the selected
browser at whatever you said was the starting point.
4. Now you can set breakpoints, single step or whatever.
-- Walt
Richard K Miller wrote:
I reinstalled Xdebug today and was glad to rediscover it. It
finally "clicked" for me. (Installation was easy from MacPorts --
"sudo port install php5-xdebug".)
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[1] 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 killer.
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.
Richard
P.S. Here are the relevant lines from my php.ini file, if it helps
anyone:
zend_extension="/opt/local/lib/php/extensions/no-debug-non-
zts-20060613/xdebug.so"
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
[1] http://www.bluestatic.org/software/macgdbp/
_______________________________________________
UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net
_______________________________________________
UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net