How to use IO.inspect on a long list without trimming it?

See Inspect.Opts for a description of the available options:

  • :limit – limits the number of items that are printed for tuples, bitstrings, maps, lists and any other collection of items. It does not
    apply to strings nor charlists and defaults to 50. If you don’t want
    to limit the number of items to a particular number, use
    :infinity.

Thus you can pass limit: :infinity to print all elements:

IO.inspect(list, limit: :infinity)

For strings and charlists there is a special option called :printable_limit. Both of these options can be combined to ensure that all elements are fully printed.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)