• Hook to access the debug context.

    Returns DebugContextType

    The debug context value.

    Error if used outside of a DebugProvider.

    export function useDebug(): DebugContextType {
    const context = useContext(DebugContext);
    if (context === undefined) {
    throw new Error("useDebug must be used within a DebugProvider");
    }
    return context;
    }