debug
For debug.
Debug print the value(s) piped in.
Command Type
built-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:
| input | output |
|---|---|
| list<any> | list<string> |
| any | 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:
| name | description | type |
|---|---|---|
debug env |
Show environment variables as external commands would get it. | built-in |
debug experimental-options |
Show all experimental options. | built-in |
debug info |
View process memory info. | built-in |
debug profile |
Profile pipeline elements in a closure. | built-in |
Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.