Can be useful if Query monitor plugin is detected tracy will disable few things because already covered by query monitor.
In that way we can have the best from both.
Thanks for the plugin, I use Tracy in various projects and I’m sure it will be handy in WP too.
I have an issue that the debugger is not initializing because I’m developing on a dev server and not on localhost. I’ve managed to force development mode using this in “/wp-tracy/vendor/ktstudio/wp-tracy/src/index.php”:
if(defined("WP_TRACY_FORCE_DEVELOPMENT_MODE") && WP_TRACY_FORCE_DEVELOPMENT_MODE === true) {
Tracy\Debugger::enable(Tracy\Debugger::DEVELOPMENT);
} else {
Tracy\Debugger::enable(defined("WP_TRACY_ENABLE_MODE") ? WP_TRACY_ENABLE_MODE : null); // hooray, enabling debugging using Tracy
}
Now in functions.php you can define a WP_TRACY_FORCE_DEVELOPMENT_MODE constant to true to get the debugger. Of course you should wrap this in a condition to enable Tracy only when you need it.
$user = wp_get_current_user();
if($user->user_email === '[email protected]') {
define('WP_TRACY_FORCE_DEVELOPMENT_MODE', true);
}
]]>
Hi,
thanks for this awesome plugin. I’d like to ask how do I set logging directory in my projects. It doesn’t matter if it’s going to be in theme directory or documentroot. I tried setting the second parameter of Tracy\Debugger::enable in “wp-tracy\vendor\ktstudio\wp-tracy\src\index.php” to
$_SERVER['DOCUMENT_ROOT']."/wp-content/themes/(name)/logs/error.log"
and
localhost/wp-content/themes/(name)/logs/error.log
Both ended up with error “Logging directory not found or is not absolute path.”
Sorry to waste your time with such minor question :).
Thanks in advance.