pr_debug(9)
π pr_debug(9) β a Kernel API Manual moment π
okay so bestie, welcome to the Kernel API Manual β¨ this one's short and sweet and honestly kind of an underrated icon in the printk friend group π«Ά
π NAME π
pr_debug β prints a debug-level message, but conditionally π like it's very "i'll show up if the vibes are right" energy
β¨ SYNOPSIS β¨
pr_debug (fmt , ... );
πΈ ARGUMENTS πΈ
fmtβ the format string, aka the blueprint of your message π...β the arguments for that format string, the lil fill-in-the-blanks π§
π¦ DESCRIPTION π¦
okay so here's the tea β this macro is a little shapeshifter and its whole personality depends on your config, no cap:
- if
CONFIG_DYNAMIC_DEBUGis set, it expands todynamic_pr_debugπ₯ - otherwise, if
DEBUGis defined, it's literally equivalent to aprintkwithKERN_DEBUGloglevel, iconic behavior π - and if
DEBUGis not defined? it does nothing. absolutely nothing. ghost mode π» honestly respect
it uses pr_fmt to generate the format string β and yeah, dynamic_pr_debug uses pr_fmt internally too, so the whole fam is on the same page there π
π SEE ALSO π
Kernel file ./include/linux/printk.h β the mothership π and the whole squad:
printk_cpu_sync_get_irqsave(9)printk_cpu_sync_put_irqrestore(9)pr_fmt(9)printk(9)pr_emerg(9)pr_alert(9)pr_crit(9)pr_err(9)pr_warn(9)pr_notice(9)pr_info(9)pr_cont(9)pr_devel(9)print_hex_dump_bytes(9)
π and that's the whole page bestie, short king energy fr fr π
okay so this came at you straight from ./include/linux, dated October 2026, and it's pr_debug(9) signing off β mwah π go log something cute π¦β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms