You try to activate a plugin you’ve ben developing and instead of seeing what the error is, WordPress displays “Plugin could not be activated because it triggered a fatal error.”

Add these defines to your wp_config.php

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DISABLE_FATAL_ERROR_HANDLER',true);

The WP_DISABLE_FATAL_ERROR_HANDLER may not work, but your will see the error causing the issue written to: httpdocs/wp-content/debug.log