NixOS / NixOS/nix.dev

Request: Tutorial on Using the Debugger

Open
#774 5 comments 13 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

guide (2)
Dominant language
Nix
Stars
4k
Forks
339
Avg merge
2d 11h
Merged PRs (30d)
7

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the proposed builtins.break example, the nix build, develop, eval, run, and shell --debugger commands, and the linked debugger video. The tutorial should explain the debugger's features and make its use discoverable for readers of nix.dev.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.