Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Debug formatting

The programmer-facing way to print a value, with {:?}.

{:?} uses a type's Debug form (quotes on text; tuples, arrays and Results print); {} uses Display, the user-facing form.

Examples

  • println!("{:?}", vec![3, 1, 2]) prints [3, 1, 2], and {:?} on a String shows its quotes and escapes, as in "Ferris\n".

Read the full section →