Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG : Xdebug 3 - Not compatible #468

Closed
neopheus opened this issue Jan 1, 2021 · 8 comments
Closed

BUG : Xdebug 3 - Not compatible #468

neopheus opened this issue Jan 1, 2021 · 8 comments

Comments

@neopheus
Copy link

neopheus commented Jan 1, 2021

Hi,

I have a problem with Xdebug 3, with this configuration :

xdebug.mode=debug
xdebug.start_with_request=trigger

same problem with mode profile
Clockwork isn't compatible with Xdebug 3

Have you a solution ?

Thx

@kw-pr
Copy link

kw-pr commented Jan 5, 2021

I think xdebug.mode=debug is wrong. I am using xdebug.mode=profile see https://xdebug.org/docs/all_settings#mode

phpinfo() shows: Profiler | ✔ enabled

Still clockwork profile does not load "Profile is not present for current request"

I guess there is some other issue.

@neopheus
Copy link
Author

neopheus commented Jan 5, 2021

I confirm ;)

@peterthomson
Copy link

Yep. The config settings to turn on profiling have changed in Xdebug 3. And it seems that the way the output is generated may have changed because even when I manually enable profiling, the output isn't displayed in Clockwork in the way it used to with Xdebug 2.

@tsukasagenesis
Copy link

tsukasagenesis commented Feb 21, 2021

Ok it work, just have to setup correctly the trigger.

In the php.ini right after opcache:
zend_extension=xdebug.so
xdebug.mode=profile
xdebug.start_with_request=trigger
xdebug.trigger_value=secrettrigerhere

then call a page with xdebug_info(); inside and ?XDEBUG_TRIGGER=secrettrigerhere, you should get "Profile File" not empty and set to a path.

But there is still a bug tho, the time is not correct :

21-02-2021-09-26-15

@askvortsov1
Copy link

Ok it work, just have to setup correctly the trigger.

In the php.ini right after opcache:
zend_extension=xdebug.so
xdebug.mode=profile
xdebug.start_with_request=trigger
xdebug.trigger_value=secrettrigerhere

then call a page with xdebug_info(); inside and ?XDEBUG_TRIGGER=secrettrigerhere, you should get "Profile File" not empty and set to a path.

But there is still a bug tho, the time is not correct :

21-02-2021-09-26-15

I'm experiencing these issues as well

@itsgoingd
Copy link
Owner

Hey, looks like Xdebug 3 changed the measurements accuracy from 1 ms to 10 ns, so the displayed values are 100 times larger than they should be, eg. 579.3ms in the screenshot is really 579.3 * 10 ns, or 5.793 ms. This will be updated in the next minor Clockwork release to correctly convert to ms.

Btw. if you remove xdebug.trigger_value from your configuration you will be able to control whether profiling is active from the Clockwork UI, otherwise the configuration is correct.

@ajcastro
Copy link

@itsgoingd I want to see xdebug profiler when running tests. How can I solve it? Thanks! I am also using xdebug 3 and latest clockwork version

@itsgoingd
Copy link
Owner

Fixed in Clockwork 5.1, both Xdebug2 and high-precision Xdebug3 metrics are correctly displayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants