[xdebug-general] Having trouble getting started with xDebug

From: Ken Freed <kfreed[@]verizon.net>
Date: Fri, 09 Apr 2010 14:29:34 -0500

Per the title, I'm running an Apache web server on localhost with php5 under
Windows Vista. I'm trying to do a very simple "set a breakpoint and look at
variables" debug task.

I find the documentation mixes old and new versions of xDebug, and Unix
setup information. They refer to a session name (a Unix PID?) that I don't
know how to get (or can I just make one up?).
The web has different setup infromation for php.ini from different sources,
and I'm not sure whether to use the threaded or non-threaded dlls (my web
app is simple and only has one thread). I've spend some time on this and
with several other vendor products. All the products install, but none of
them will halt at a breakpoint that I set in my php script so that I can
examine variables.

Could someone tell me how to setup xDebug and set a breakpoint in a php
script? Do you run xDebug first?, or call up the web page then look at some
PID and use this to attach to the web task?, etc. etc.

The Xdebug section of my php.ini file looks like (I installed my php to
c:\php):

; Enable compatibility mode with Zend Engine 1 (PHP 4.x)
zend.ze1_compatibility_mode = Off
;report_zend_debug = 0

[XDebug]
;; Only Zend OR (!) XDebug
zend_extension_ts="C:/php/ext/php_xdebug-2.1dev-5.2-vc6.dll"
xdebug.remote_enable=true
xdebug.remote_host=localhost
xdebug.remote_port=9000
xdebug.remote_handler=dbgp
xdebug.profiler_enable=1
xdebug.profiler_output_dir="C:/php/xdebug/tmp"
xdebug.profiler_output_name = "cachegrind.out.%p"
xdebug.profiler_enable = 0
xdebug.profiler_append=0
xdebug.extended_info=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.idekey=xdebug
xdebug.remote_log="c:/php/tmp/xdebug_remot.log"
xdebug.show_exception_trace=0
xdebug.show_local_vars=9
xdebug.show_mem_delta=0
xdebug.trace_format=0

Thanks!
Received on Fri Apr 09 2010 - 21:30:27 BST

This archive was generated by hypermail 2.2.0 : Mon Jun 25 2018 - 06:00:04 BST