TICKIT_DEBUG_INIT(3)

πŸ’– TICKIT_DEBUG_INIT(3) πŸ’–

ok so bestie, welcome to the Library Functions Manual section for tickit_debug_init β€” yes she's a whole 3-page girly, and yes she is exactly the function you want when you're like "why is my app not printing the debug tea" πŸ«–βœ¨


🌸 NAME 🌸

tickit_debug_init β€” initialise the debugging system, periodt πŸ’…


✨ SYNOPSIS ✨

#include <tickit.h>

void tickit_debug_init(void);

bool tickit_debug_enabled;

Link with -ltickit.


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so tickit_debug_init() is the function that wakes the whole libtickit debugging system up. It reads the values of the environment variables and sets up the output filehandle β€” that's the if enabled part, iykyk πŸ‘€

She also has a side-effect, and it's a big one: she touches the value of the global variable tickit_debug_enabled, setting it to the correct value. like, she doesn't just vibe in the background, she literally sets the vibe. 🌈

So if your application wants to read that variable to control its own output of debugging messages, you lowkey want to call this function on startup β€” that way you can be 100% sure it's holding the correct value and not just guessing fr fr.

the way that tickit_debug_init() is guarded internally so it is safe to call multiple times β€” no cap! So there is literally no downside to opportunistically invoking it on startup anyway, even if some other part of the application may also have already done it. Two calls? Fine. Ten calls? Still fine. She ate and she's not even mad about it. πŸ’€βœ¨

πŸŽ€ RETURN VALUE πŸŽ€

This function returns no value. Not a 0, not a NULL, not a lil' status code. Nothing. She gives you main character energy and nothing else. 🫢


πŸ’œ SEE ALSO πŸ’œ


ok that's the whole page bestie, go forth and debug slayfully πŸ”₯πŸ‘‘

Library Functions Manual Β· TICKIT_DEBUG_INIT(3) β€” mwah, kiss kiss, see u in the man pages πŸ’‹πŸŽ€πŸ¦‹