cli_debug_doc: Debug cli internals

Description Usage Arguments Details Value See Also Examples

View source: R/debug.R

Description

Return the current state of a cli app. It includes the currently open tags, their ids, classes and their computed styles.

Usage

1

Arguments

app

The cli app to debug. Defaults to the current app. if there is no app, then it creates one by calling start_app().

Details

The returned data frame has a print method, and if you want to create a plain data frame from it, index it with an empty bracket: cli_debug_doc()[].

To see all currently active themes, use app$themes, e.g. for the default app: default_app()$themes.

Value

Data frame with columns: tag, id, class (space separated), theme (id of the theme the element added), styles (computed styles for the element).

See Also

cli_sitrep(). To debug containers, you can set the CLI-DEBUG_BAD_END environment variable to true, and then cli will warn when it cannot find the specified container to close (or any contained at all).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
cli_debug_doc()

olid <- cli_ol()
cli_li()
cli_debug_doc()
cli_debug_doc()[]

cli_end(olid)
cli_debug_doc()

## End(Not run)

RonMobile/cli documentation built on Dec. 18, 2021, 11 a.m.