admin管理员组文章数量:1023025
I'm running a test website on PHP8.3 in a Vagrant box using Ubuntu 20.04. This has all been fine.
I want to profile a specific page because I'm getting a major slow-down. So I installed XDebug on the Vagrant box with this set-up:
[XDebug]
zend_extension=xdebug.so
xdebug.mode=profile
xdebug.start_with_request=trigger
xdebug.trigger_value=GOGO
xdebug.discover_client_host=localhost
xdebug.client_port=9003
xdebug.log=/vagrant/logs/xdebug.log
I put the log in that directory to make it accessible outside the vagrant box.
I have tried putting the trigger XDEBUG_TRIGGER=GOGO (and XDEBUG_PROFILE=GOGO, though it shouldn't be needed) in:
- The website environment variables
- Exported to the vagrant box environment variables
- As a query on the URL
And all I ever get is this (with log level 10):
[12613] Log opened at 2024-11-19 11:34:29.633192
[12613] [Config] INFO: Control socket set up succesfully: '@xdebug-ctrl.12613'
[12613] [Config] INFO: Systemd Private Temp Directory is enabled (/tmp/systemd-private-dd3b291ebebd46669a866e2a97c52af1-apache2.service-DxTd0e)
[12613] [Config] DEBUG: Checking if trigger 'XDEBUG_TRIGGER' is enabled for mode 'profile'
[12613] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_PROFILE'
[12613] [Config] INFO: Trigger value for 'XDEBUG_PROFILE' not found, so not activating
[12613] Log closed at 2024-11-19 11:34:37.464555
Some things I've read suggest changing the client values to match the vagrant box, but I'm not going outside the box (the log file will be read from outside but that's different).
There was also the suggestion of compatibility issues (from a couple years ago) but I installed the php8.3-xdebug extension so I assume that's fine.
I have also tried setting xdebug.start_with_request
to yes
. There's no error message but still no profile results, just this:
[12198] Log opened at 2024-11-19 10:59:33.812840
[12198] [Config] INFO: Control socket set up succesfully: '@xdebug-ctrl.12198'
[12198] [Config] INFO: Systemd Private Temp Directory is enabled (/tmp/systemd-private-dd3b291ebebd46669a866e2a97c52af1-apache2.service-UDwGwh)
[12198] Log closed at 2024-11-19 10:59:47.696373
What am I missing?
EDIT: I installed the web server plugin which creates the cookie for the trigger value, and it worked. Although unfortunately the cachegrind file is in /tmp and not the place I wanted.
But at least it's working.
Edit 2: xdebug.output_dir
puts the result where I want it.
All done.
I'm running a test website on PHP8.3 in a Vagrant box using Ubuntu 20.04. This has all been fine.
I want to profile a specific page because I'm getting a major slow-down. So I installed XDebug on the Vagrant box with this set-up:
[XDebug]
zend_extension=xdebug.so
xdebug.mode=profile
xdebug.start_with_request=trigger
xdebug.trigger_value=GOGO
xdebug.discover_client_host=localhost
xdebug.client_port=9003
xdebug.log=/vagrant/logs/xdebug.log
I put the log in that directory to make it accessible outside the vagrant box.
I have tried putting the trigger XDEBUG_TRIGGER=GOGO (and XDEBUG_PROFILE=GOGO, though it shouldn't be needed) in:
- The website environment variables
- Exported to the vagrant box environment variables
- As a query on the URL
And all I ever get is this (with log level 10):
[12613] Log opened at 2024-11-19 11:34:29.633192
[12613] [Config] INFO: Control socket set up succesfully: '@xdebug-ctrl.12613'
[12613] [Config] INFO: Systemd Private Temp Directory is enabled (/tmp/systemd-private-dd3b291ebebd46669a866e2a97c52af1-apache2.service-DxTd0e)
[12613] [Config] DEBUG: Checking if trigger 'XDEBUG_TRIGGER' is enabled for mode 'profile'
[12613] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_PROFILE'
[12613] [Config] INFO: Trigger value for 'XDEBUG_PROFILE' not found, so not activating
[12613] Log closed at 2024-11-19 11:34:37.464555
Some things I've read suggest changing the client values to match the vagrant box, but I'm not going outside the box (the log file will be read from outside but that's different).
There was also the suggestion of compatibility issues (from a couple years ago) but I installed the php8.3-xdebug extension so I assume that's fine.
I have also tried setting xdebug.start_with_request
to yes
. There's no error message but still no profile results, just this:
[12198] Log opened at 2024-11-19 10:59:33.812840
[12198] [Config] INFO: Control socket set up succesfully: '@xdebug-ctrl.12198'
[12198] [Config] INFO: Systemd Private Temp Directory is enabled (/tmp/systemd-private-dd3b291ebebd46669a866e2a97c52af1-apache2.service-UDwGwh)
[12198] Log closed at 2024-11-19 10:59:47.696373
What am I missing?
EDIT: I installed the web server plugin which creates the cookie for the trigger value, and it worked. Although unfortunately the cachegrind file is in /tmp and not the place I wanted.
But at least it's working.
Edit 2: xdebug.output_dir
puts the result where I want it.
All done.
本文标签: vagrantXDebug not finding trigger valuesStack Overflow
版权声明:本文标题:vagrant - XDebug not finding trigger values - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745564209a2156350.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论