[xdebug-general] Re: Dynamically Loading Xdebug

From: Derick Rethans <derick[@]xdebug.org>
Date: Sun, 1 Aug 2010 18:30:01 +0100 (BST)


On Sat, 31 Jul 2010, rod wrote:

> Is it possible to dynamically load xdebug in a php script? My use
> case is I am using phpunit with hudson on some CI jobs, and would like
> to have one job generate code coverage statistics nightly. But, if I
> load xdebug all the time then this will slow down all the jobs that
> don't need it (99% of the other jobs). So, it would be nice if I
> could load xdebug only when I need to do code coverage stats.

Sadly you can't do that; Xdebug needs to be loaded before some Zend
Engine stuff happens.

> I've tried using the deprecated dl() function, and also the -d and -z
> php flags but has no luck. Now I'm thinking maybe I need to start php
> with a seperate ini file for this case.

The -z option should work actually; but you have to specify the full

> So, is this possible? Or am I being dumb and there's actually a much
> better way to do this?

Nope; using a separate INI file is probably going to be the simplest.


Like Xdebug? Consider a donation: http://xdebug.org/donate.php
Xdebug | http://xdebug.org | xdebug-general@lists.xdebug.org
twitter: @derickr and @xdebug
Received on Sun Aug 01 2010 - 18:30:01 BST

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