xdebug - How do you debug a LONG RUNNING php script? -


the problem script hangs after long time. strace returns , nothing else:

process 7286 attached - interrupt quit restart_syscall(<... resuming interrupted call ...>) = 0 poll([{fd=13, events=pollin|pollpri|pollrdnorm|pollrdband}], 1, 0) = 0 (timeout) clock_gettime(clock_monotonic, {1817569, 74651533}) = 0 clock_gettime(clock_monotonic, {1817569, 74734744}) = 0 clock_gettime(clock_monotonic, {1817569, 74812047}) = 0 poll([{fd=13, events=pollin|pollpri|pollrdnorm|pollrdband}], 1, 1000) = 0 (timeout) poll([{fd=13, events=pollin|pollpri|pollrdnorm|pollrdband}], 1, 0) = 0 (timeout) .... 

putting here'n'there debug messages left last resort..

i can run script xdebug attached there way send posix signal php process trigger xdebug dump current context/stacktrace/localvars?

is possible 'postmortem dump' of php script?

xdebug not have functionality this. using pcntl_signal , using xdebug_print_function_stack option, can create "function trace". makes xdebug write every function call disk happen. should able tell script hangs. can see though is waiting io.

there more information function traces @ http://www.xdebug.org/docs/execution_trace


Comments