View Issue Details

IDProjectCategoryView StatusLast Update
0001960XdebugStacktracespublic2021-05-21 16:02
Reporteryoshkinawa Assigned Toderick  
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionno change required 
PlatformlinuxOSubuntuOS Version18
Product Version3.0.3 
Summary0001960: Standalone Xdebug var_dump() implementation
DescriptionHi Derick,
Thank you very much for Xdebug!
I have a question.
I understood from your explanation XDebug can't work with php8 JIT.

I use xdebug on the production server just for the improved var_dump() for error reports.
Do you think it's technically possible to enable only the var_dump with JIT?
If not, is there any option to install it as a stand-alone, or do you know of a php function that can format the var_dump the same way Xdebug does it?

many thanks...
TagsNo tags attached.
Operating System
PHP Version8.0.0-8.0.4

Activities

derick

2021-05-21 15:57

administrator   ~0005885

> Do you think it's technically possible to enable only the var_dump with JIT?

I just had a look, and that looks technically feasible. However, I maintain that Xdebug should not be installed on production environments, and that this issue will not have my high priority.

> If not, is there any option to install it as a stand-alone?

No, there is not.

> or do you know of a php function that can format the var_dump the same way Xdebug does it?

I don't think that there is anything that does the exact same format, but there are similar tools in
- Kint: https://kint-php.github.io/kint/
- Symfony's varDumper: https://symfony.com/doc/current/components/var_dumper.html

derick

2021-05-21 16:02

administrator   ~0005886

Turns out that I am wrong, and that you can do this already :-)

If you start xdebug.mode=off then the function overload that JIT doesn't like (zend_execute_ex) does not get changed, and hence JIT should function. You can then use Xdebug's xdebug_var_dump() function without problems.

Compare:

$ php -dopcache.enable_cli=1 -dopcache.jit_buffer_size=100M -dxdebug.cli_color=2 -r 'xdebug_var_dump("FOO");'

Warning: JIT is incompatible with third party extensions that override zend_execute_ex(). JIT disabled. in Unknown on line 0
Command line code:1:
string(3) "FOO"


with:
$ php -dopcache.enable_cli=1 -dopcache.jit_buffer_size=100M -dxdebug.cli_color=2 -dxdebug.mode=off -r 'xdebug_var_dump("FOO");'
Command line code:1:
string(3) "FOO"

Issue History

Date Modified Username Field Change
2021-03-29 13:00 yoshkinawa New Issue
2021-05-21 15:57 derick Assigned To => derick
2021-05-21 15:57 derick Status new => feedback
2021-05-21 15:57 derick Note Added: 0005885
2021-05-21 15:58 derick Summary A question regarding the incompatibility of Xdebug and php8 JIT => Standalone Xdebug var_dump() implementation
2021-05-21 16:02 derick Status feedback => closed
2021-05-21 16:02 derick Resolution open => no change required
2021-05-21 16:02 derick Note Added: 0005886