summaryrefslogtreecommitdiff
path: root/doc/functions/debug.section.md
blob: 9bf7c7efc6c9d2db6b3d6a2bd4be671e686f9b90 (plain)
1
2
3
4
5
# Debugging Nix Expressions {#sec-debug}

Nix is a unityped, dynamic language, this means any value can potentially appear anywhere. Since it is also non-strict, evaluation order and what is ultimately evaluated might surprise you. Therefore, it is important to be able to debug Nix expressions.

In the `lib/debug.nix` file you will find a number of functions that help (pretty-)printing values while evaluation is running. You can even specify how deep these values should be printed recursively, and transform them on the fly. Please consult the docstrings in `lib/debug.nix` for usage information.