Skip to content

Instantly share code, notes, and snippets.

@WengerK
Last active August 20, 2019 09:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WengerK/41fb898bf72a713ad1def05b866ccc99 to your computer and use it in GitHub Desktop.
Save WengerK/41fb898bf72a713ad1def05b866ccc99 to your computer and use it in GitHub Desktop.
Drupal 8 - Debugging Ajax Commands & Dialogs

Drupal 8 - Debugging Ajax Commands & Dialogs

'Cause it's nearly impossible to var_dump or dump into an Ajax Dialog or an Ajax Command, the most easier way is to write into the Apache logs.

To do this, just add the following snippet in your code:

error_log(var_export($var), TRUE);

Then I watch my Apache logs

tail -f /usr/local/var/log/httpd/error_log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment