Xdebug mode profile

I was trying to profile my app with xdebug and changed the xdebug_mode from debug to profile on group_vars/development/php.yml.
I’m using vscode and already installed the plugin and running it I can see on the /tmp folder inside the VM a xdebug.log with a connection being made.

The issue is that I don’t get any profile data on /tmp. I’d assume it should create some cachegrind.out.x files but maybe I’m missing some configs.

This is what I have at the moment:

xdebug_mode: 'profile'
xdebug_start_with_request: 'yes'
xdebug_discover_client_host: 1

Do I need to add more configs?

1 Like

Hi hi :wave:

I did the xdebug 2 course we offer on roots.io but unfortunately have been out of touch with the changes in xdebug 3. I reviewed the docs and it appears like you’re doing everything correct, so +1 for a sanity check :smile:

They link to some YouTube videos that might be of assistance on the docs page! Xdebug: Documentation » Profiling


Well I ssh’d to my development machine and checked the /etc/php/<version>/fpm/conf.d/20-xdebug.ini and the value for xdebug.mode was debug although I’ve set it to profile on group_vars/development/php.yml.

Had to restart php7.4-fpm and nginx. Now doing xdebug-info(); I can see the mode set to profile.

1 Like