NYCPHP Meetup

NYPHP.org

[nycphp-talk] xdebug & apache 2

John Lacey jlacey at att.net
Thu Jul 22 11:25:46 EDT 2004


David Sklar wrote:

>> Do you see xdebug listed in phpinfo() output? (whether or not remote 
>> debugging is working)
>

rather than start a new topic:

I got xdebug2 working with a remote_port change to 17869 after rebooting 
and reinstalling XAMPP on my notebook.  Had to turn off the Zend 
Optimizer as I discovered xdebug cannot run with another zend 
extension.  Also, in downloading a fresh php_xdebug.dll from 
win32/PECL_UNSTABLE I ran into an "API mismatch" problem, so the fresh 
reboot and fresh XAMPP install solved that.  So, I'm running with PHP5, 
Apache2.0.50, xdebug2 (ver 2.0.0 dev) on a win2k pro box. 

Once the debugclient connected, I got to a (cmd) prompt only after 
setting a breakpoint to {main}, and then typing "run".  Setting a 
file:line breakpoint didn't work for me, although a show-breakpoints 
said the file:line break had been set ok.   I could not reach another 
breakpoint in my small test script even though I had set one and typed 
"continue" after breaking at {main}.  e.g. break xdebugtest.php:5 -- and 
show_breakpoints indicated that breakpoint was set.  Other cmds, like 
"eval", "step", "next" worked fine.  The "list" cmd seemed a little 
flaky to me, but after psyching it out, e.g. "list 2 5" worked ok.  
Sometimes typing just "list" would not output anything as if the "list 
counter" didn't have anything else to display (xdebugtest script is 12 
lines).  Your xdebug section in the PHP Tools book helped a lot.  It 
would be nice if xdebug(2) allowed a cmd that showed the current php IP, 
like "show-current".   I did not find any way to set a variable, only 
examine it -- can you confirm this?

Moving on, the only way I could get a breakpoint other than {main} to 
work was to add an "xdebug_break()" call in my script.  That worked just 
fine and a "bt" showed the xdebug_break() and the {main} break.  
"show-local" worked as advertised, but when looking at phpinfo(), 
"xdebug.show_local_vars" directive was "Off". hmm.....  BTW, I did find 
a reference to port 9000 in the DBGP docs.

thanks for all your help,
John







More information about the talk mailing list