shahmal1yev
shahmal1yev

Reputation: 1

Trigger for Profiling: PHP CLI Hangs

I'm facing an issue while trying to use Xdebug to profile PHP CLI with the settings xdebug.start_with_request=trigger and xdebug.trigger_value=StartProfileForMe. When I enable these settings, PHP completely locks up and I receive no output.

I noticed the issue initially while writing tests with PHPUnit (PHP 7.4.33 and Xdebug 3.1.6). PhpStorm's terminal was not responding at all. Initially, I thought it might be related to using PhpStorm's EAP version. However, when I tried even the simplest test in a regular terminal window and encountered the same result, I began to suspect it might be something else. After a bit of research, I couldn't find any specific issue, question, or answer related to this online. Therefore, I decided to seek support here.

If I disable the "trigger" feature, everything works fine. However, this is not an ideal solution because having "profile" working everywhere is not desirable.

Operating System: Kali Linux 2024.2
PHP Version: 8.3.8
Xdebug Version: 3.3.2

Configuration Settings Used:

zend_extension=xdebug.so
xdebug.mode=develop,debug,profile
xdebug.start_with_request=trigger
xdebug.trigger_value=StartProfileForMe
xdebug.log=/tmp/xdebug/xdebug.log
xdebug.log_level=10

I'm certain that xdebug.trigger_value is correctly configured with StartProfileForMe. Checking the Xdebug log file shows no errors or warnings.

When I attempt to start profiling by running the PHP script with export XDEBUG_TRIGGER=StartProfileForMe, PHP hangs and produces no output.

Thank you in advance.

Upvotes: 0

Views: 100

Answers (0)

Related Questions