How can one enable error messages to troubleshoot cookie storage issues in PHP?

To troubleshoot cookie storage issues in PHP, one can enable error messages to get more information about what might be going wrong. By displaying error messages, one can easily identify any potential issues with setting or retrieving cookies in PHP.

<?php
// Enable error reporting to display any potential issues with cookie storage
error_reporting(E_ALL);
ini_set('display_errors', 1);

// Your PHP code for setting or retrieving cookies goes here
?>