View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001944 | Xdebug | Tracing | public | 2021-02-11 14:48 | 2021-05-23 15:44 |
Reporter | Ivan.Fedorov | Assigned To | derick | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 3.0.2 | ||||
Target Version | 3.0dev | Fixed in Version | 3.0.4 | ||
Summary | 0001944: tracing is started without trigger, when profiler is also enabled | ||||
Description | Trace isn't collected when xdebug.mode has "trace" but doesn't have "profile" mode | ||||
Steps To Reproduce | Configure xdebug in php.ini file like below
Create file Try to invoke Result: Change xdebug.mode to Try to invoke Result: | ||||
Tags | No tags attached. | ||||
Operating System | |||||
PHP Version | 8.0.0-8.0.4 | ||||
|
I can confirm this issue. Thanks for the succinct bug report. I can distil it down to something even smaller (mostly writing this down for my own memory for when I delve into fixing this): mkdir -p /tmp/1944 && cd /tmp/1944 && php -n -d zend_extension=xdebug -dxdebug.mode=develop,profile,trace -dxdebug.client_host=localhost -dxdebug.client_port=9003 -dxdebug.log=/tmp/1944.log -dxdebug.output_dir=/tmp/1944 -r 'echo strlen("BUG");' |
|
This bug is now fixed in GIT, but not exactly in the way you originally described. What should have happened: no trace file, but only a profile file The xdebug.start_with_request setting is by default "default". For the profiler, that means "yes", which means that the profiler will start at the start of the request, but for the tracer this default means "trigger" - i.e., only if XDEBUG_TRIGGER=<some value>. Now that the bug is fixed, you can start the tracer by doing either (of course you can make these settings in php.ini): XDEBUG_TRIGGER=start php -dxdebug.mode=tracer yourscript.php cheers, |
|
This should be documented in https://xdebug.org/docs/upgrade_guide#changed-xdebug.auto_trace , as the advised options are not enough. |
|
UPDATE: The issue was on my side, ignore the comment above. |
Date Modified | Username | Field | Change |
---|---|---|---|
2021-02-11 14:48 | Ivan.Fedorov | New Issue | |
2021-02-18 11:53 | derick | Assigned To | => derick |
2021-02-18 11:53 | derick | Status | new => confirmed |
2021-02-18 11:53 | derick | Note Added: 0005676 | |
2021-02-18 11:53 | derick | Severity | minor => major |
2021-02-18 11:53 | derick | Target Version | => 3.0.3 |
2021-02-18 11:53 | derick | Steps to Reproduce Updated | |
2021-02-18 11:54 | derick | Steps to Reproduce Updated | |
2021-02-18 11:54 | derick | Target Version | 3.0.3 => 3.0dev |
2021-03-15 10:49 | derick | Summary | Trace isn't collected until "profile" flag is set in php.ini => tracing is started without trigger, when profiler is also enabled |
2021-03-15 11:16 | derick | Status | confirmed => closed |
2021-03-15 11:16 | derick | Resolution | open => fixed |
2021-03-15 11:16 | derick | Fixed in Version | => 3.0dev |
2021-03-15 11:16 | derick | Note Added: 0005709 | |
2021-03-15 16:33 | derick | Fixed in Version | 3.0dev => 3.0.4 |
2021-05-23 15:33 | videoice | Note Added: 0005887 | |
2021-05-23 15:44 | videoice | Note Added: 0005888 |