Debugging value of "value is an X while a Y was expected"

I’ve seen this error message many times. One thing that would be really helpful is a way to see the value of the incorrect type so I could immediately get a better idea of what’s going wrong. Unfortunately --show-trace doesn’t offer this, just the call stack. Is there a way to see the value?

See the second most upvoted issue: error "value is a list while a set was expected" is too vague · Issue #963 · NixOS/nix · GitHub

1 Like