Skip to content

Add Debugging Instructions to Nix Manual #11502

Open
@michaelvanstraten

Description

Problem

Currently, it's hard to get started with launching a debuggable instance of Nix. Building Nix with debug symbols requires knowledge of internal environment variables like mesonBuildType, which are not well-documented. For example, to build with debug symbols, you need to run:

nix develop .#native-clangStdenvPackages
# `make clean` did not work
trash build 
export mesonBuildType=debug
mesonConfigurePhase
ninjaBuildPhase

Additionally, there is no documentation on how to attach a debugger to the nix-daemon.

Proposal

Add a "Debugging" section to the Nix manual's development chapter. This section should include:

  • Detailed instructions on how to build Nix with debug symbols, etc.
  • Step-by-step guidance on how to launch and attach a debugger to debug version ofnix-daemon.

Checklist

Priorities

Add 👍 to issues you find important.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions