I'm not able to retrieve cookie even though I see it in the developer tools
<p>Here is my code,(the first function is just logging it to the console) that I put in the mu-plugins directory. I can see the cookie just fine in the developer tools but can't seem to display it. The function is definitely getting hit.</p>

<pre><code>function debug_to_console( $data ) {

    if ( is_array( $data ) )
        $output = "&lt;script&gt;console.log( 'Debug Objects: " . implode( ',', $data) . "' );&lt;/script&gt;";
    else
        $output = "&lt;script&gt;console.log( 'Debug Objects: " . $data . "' );&lt;/script&gt;";

    echo $output;
}

function get_login_details(){
    if(isset($_COOKIE['wordpress_test_cookie'])){
        debug_to_console($_COOKIE['wordpress_test_cookie']);
    }
}
</code></pre>