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

view ir for debug

View the compiled IR code for a block of code.

Signature

> view ir {flags} (target)

Flags

  • --json, -j: Dump the raw block data as JSON (unstable).
  • --decl-id, -d: Integer is a declaration ID rather than a block ID.

Parameters

  • target: The name or block to view compiled code for.

Input/output types:

inputoutput
nothingstring

Notes

The target can be a closure, the name of a custom command, or an internal block ID. Closure literals within IR dumps often reference the block by ID (e.g. closure(3231)), so this provides an easy way to read the IR of any embedded closures.

The --decl-id option is provided to use a declaration ID instead, which can be found on call instructions. This is sometimes better than using the name, as the declaration may not be in scope.