import { useState } from 'react'; import { motion } from 'framer-motion'; import { Bug, Package, AlertCircle, CheckCircle2, Copy, Check, ArrowLeft } from 'lucide-react'; interface DebugPageProps { onBack?: () => void; } export default function DebugPage({ onBack }: DebugPageProps) { const [creating, setCreating] = useState(false); const [anonymize, setAnonymize] = useState(true); const [bundlePath, setBundlePath] = useState(''); const [error, setError] = useState(''); const [copied, setCopied] = useState(false); const handleCreateBundle = async () => { try { setCreating(true); setError(''); setBundlePath(''); setCopied(false); // TODO: Implement debug bundle creation via IPC // const path = await window.electronAPI.daemon.createDebugBundle(anonymize); // setBundlePath(path); // Simulated for now await new Promise((resolve) => setTimeout(resolve, 2000)); setBundlePath('/tmp/netbird-debug-bundle-20241030.zip'); } catch (err) { setError('Failed to create debug bundle'); console.error('Debug bundle error:', err); } finally { setCreating(false); } }; const handleCopyPath = async () => { try { await navigator.clipboard.writeText(bundlePath); setCopied(true); setTimeout(() => setCopied(false), 2000); } catch (err) { console.error('Failed to copy path:', err); } }; return (
Create diagnostic bundle for troubleshooting
Replace IP addresses, emails, and other identifying information
Your debug bundle has been created successfully
File location:
{bundlePath}
{error}
If you're experiencing issues, create a debug bundle and share it with the NetBird support team.
Report an issue on GitHub →