From 902c4965058eb5a4d7171e48f29457e31ebd9448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Sat, 19 Dec 2020 11:39:55 +0200 Subject: [PATCH 1/2] Add example for profiler.enable with xdebug profiling enabled --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index bfaed64..e8a4d93 100644 --- a/README.md +++ b/README.md @@ -268,6 +268,18 @@ requests with the `/blog` URL path: }, ``` +Here's an example to disable profiling if xdebug session is enalbed: + +```php + 'profiler.enable' => function() { + if (function_exists('xdebug_is_enabled') && xdebug_is_enabled()) { + return false; + } + + return true; + }, +``` + In contrast, the following example instructs to profile _every_ request: From e66b09a7003c62fd4ce353de22b5e16a0bf60c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 18 Oct 2021 04:42:21 +0300 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e8a4d93..3f28b99 100644 --- a/README.md +++ b/README.md @@ -268,7 +268,7 @@ requests with the `/blog` URL path: }, ``` -Here's an example to disable profiling if xdebug session is enalbed: +Here's an example to disable profiling if xdebug session is enabled: ```php 'profiler.enable' => function() {