1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-01 01:51:24 +00:00
nixpkgs/doc/functions/debug.xml

15 lines
867 B
XML
Raw Normal View History

<section xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
xml:id="sec-debug">
2018-10-02 20:59:59 +01:00
<title>Debugging Nix Expressions</title>
2018-10-02 20:59:59 +01:00
<para>
2019-09-18 21:12:54 +01:00
Nix is a unityped, dynamic language, this means every value can potentially appear anywhere. Since it is also non-strict, evaluation order and what ultimately is evaluated might surprise you. Therefore it is important to be able to debug nix expressions.
2018-10-02 20:59:59 +01:00
</para>
2018-10-02 20:59:59 +01:00
<para>
2019-09-18 21:12:54 +01:00
In the <literal>lib/debug.nix</literal> file you will find a number of functions that help (pretty-)printing values while evaluation is runnnig. You can even specify how deep these values should be printed recursively, and transform them on the fly. Please consult the docstrings in <literal>lib/debug.nix</literal> for usage information.
2018-10-02 20:59:59 +01:00
</para>
</section>