nix.dev icon indicating copy to clipboard operation
nix.dev copied to clipboard

Request: Tutorial on Using the Debugger

Open lorenzleutgeb opened this issue 8 months ago • 5 comments

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 execute nix (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.

lorenzleutgeb avatar Oct 26 '23 16:10 lorenzleutgeb

Yes, that would be very much appreciated!

fricklerhandwerk avatar Oct 26 '23 16:10 fricklerhandwerk

I think first of all the reference docs for the debugger should be written, they're currently inexistent!

infinisil avatar Nov 02 '23 19:11 infinisil

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)

rjpcasalino avatar Nov 15 '23 22:11 rjpcasalino

TIL that a Nix debugger exists. Thanks, it will make my life easier.

aviallon avatar Dec 26 '23 08:12 aviallon

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

infinisil avatar Dec 31 '23 21:12 infinisil