<?php
// Set error log to our custom file
ini_set('error_log', __DIR__ . '/workspace_debug.log');
ini_set('log_errors', 1);

// Simulate visiting the clients page
$_SERVER['REQUEST_METHOD'] = 'GET';
$_GET['workspace'] = 'pixelvise';
$_COOKIE['auth_token'] = 'test'; // This will fail but we'll see what happens

echo "Testing workspace context...\n";
echo "Check workspace_debug.log for results\n";

// Try to load secure_workspace
try {
    require_once __DIR__ . '/src/secure_workspace.php';
    echo "secure_workspace.php loaded successfully\n";
} catch (Exception $e) {
    echo "Error loading secure_workspace: " . $e->getMessage() . "\n";
}
?>
