nix.dev
nix.dev copied to clipboard
Request: Tutorial on Using the Debugger
I think the debugger is quite hard to "discover", but can be a real life saver. It deserves a little more publicity.
My idea for a tutorial would be to (quite obviously) start off with a detailed version of:
Use
builtins.break
in your code, and then executenix (build|develop|eval|run|shell) --debugger
.
And then explain the features of the debugger.
There's a video on YouTube with a demo that serves as a first approximation: https://www.youtube.com/watch?v=ypFLcMCSzNA&t=291s
I could give it a go if maintainers think this would be desirable.
Yes, that would be very much appreciated!
I think first of all the reference docs for the debugger should be written, they're currently inexistent!
a good place to start/"steal" things from https://www.zknotes.com/note/5970 (if you haven't seen this already) (found in release notes here: https://github.com/NixOS/nix/blob/master/doc/manual/src/release-notes/rl-2.9.md)
TIL that a Nix debugger exists. Thanks, it will make my life easier.
Unfortunately the debugger has some problems, we ran into a few last Nix Hour. I don't think I'll be using it in practice