Skip to content
masterclass Buddy

React Testing Library · Pipe

debug

debug prints the rendered DOM in a readable format. Use screen.debug instead for the recommended debugging style.

Last updated

Syntax

debug(element?, maxLengthToPrint?, options?)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • screen.debug
  • prettyDOM
  • render
  • baseElement

Source: API | Testing Library. Checked 2026-11-03.