Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

debug for debug

Debug print the value(s) piped in.

Signature

> debug {flags}

Flags

  • --raw, -r: Prints the raw value representation
  • --raw-value, -v: Prints the raw value representation but not the nushell value part

Input/output types:

inputoutput
anystring
list<any>list<string>

Examples

Debug print a string

> 'hello' | debug
hello

Debug print a list

> ['hello'] | debug
╭───┬───────╮
│ 0 │ hello │
╰───┴───────╯

Debug print a table

> [[version patch]; ['0.1.0' false] ['0.1.1' true] ['0.2.0' false]] | debug
╭───┬────────────────────────────────╮
│ 0 │ {version: 0.1.0, patch: false} │
│ 1 │ {version: 0.1.1, patch: true}  │
│ 2 │ {version: 0.2.0, patch: false} │
╰───┴────────────────────────────────╯

Debug print an ansi escape encoded string and get the raw value

> $'(ansi red)nushell(ansi reset)' | debug -v
"\u{1b}[31mnushell\u{1b}[0m"

Subcommands:

namedescriptiontype
debug infoView process memory info.built-in
debug profileProfile pipeline elements in a closure.built-in