Skip to content

Conversation

@anthony-malkoun
Copy link
Contributor

Motivation

xdebug profiling is a useful tool, but the output files by default are saved compressed and in /tmp directory of each container which makes them hard to manage and view from the host machine. This change saves them uncompressed in the shared filesystem so that they are available to host tools like QCahcegrind

This change only affects settings when xdebug is enabled.

Changes

  • Update xdebug settings to be more developer friendly

Testing

Turn on xdebug and do some profiling using your method of choice. Files should all end up in <project_directory>/docroot/sites/default/files/xdebug-profile and be uncompressed and ready to view.


[xdebug]
xdebug.mode = debug,profile
xdebug.output_dir = /app/docroot/sites/default/files/xdebug-profile
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm slightly concerned about these ending up in the publicly available fs, could they be moved to private without affecting availability to other tools? I'm guessing not and that the output files are similar in content to a stack trace so not much of a concern but it's still a conversation I'd like to have.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this will work if the files are in private. For local dev you can see "private" files from the host which is the requirement. I'll test and update accordingly. Thanks for the review @GROwen! Even for non local, you'd probably copy them to a local system. The main requirement is just to get them out of the container.

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

Successfully merging this pull request may close these issues.

3 participants