Home Explore Blog CI



nushell

commands/docs/debug.md
2fe40a482092d4592a437b96ae6f556e0384deb4b1f267a7000000030000080b
---
title: debug
categories: |
  debug
version: 0.104.0
debug: |
  Debug print the value(s) piped in.
usage: |
  Debug print the value(s) piped in.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `debug` for [debug](/commands/categories/debug.md)

<div class='command-title'>Debug print the value(s) piped in.</div>

## 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       |
| --------- | ------------ |
| any       | string       |
| list\<any\> | list\<string\> |
## Examples

Debug print a string
```nu
> 'hello' | debug
hello
```

Debug print a list
```nu
> ['hello'] | debug
╭───┬───────╮
│ 0 │ hello │
╰───┴───────╯

```

Debug print a table
```nu
> [[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
```nu
> $'(ansi red)nushell(ansi reset)' | debug -v
"\u{1b}[31mnushell\u{1b}[0m"
```


## Subcommands:

| name                                               | description                             | type     |
| -------------------------------------------------- | --------------------------------------- | -------- |
| [`debug info`](/commands/docs/debug_info.md)       | View process memory info.               | built-in |
| [`debug profile`](/commands/docs/debug_profile.md) | Profile pipeline elements in a closure. | built-in |

Chunks
37b3842c (1st chunk of `commands/docs/debug.md`)
Title: Debug Command Documentation
Summary
This document describes the `debug` command in Nushell, which prints the value(s) piped into it. It details the command's signature, flags (including raw and raw-value printing), input/output types, and usage examples for strings, lists, and tables. It also lists available subcommands like `debug info` and `debug profile`.