@args --debugger :c at the root repl is not allowed since no debugger is running yet nix-repl> :c error: command 'c' can only be used when the debugger is active :c and other commands become available once a debugger starts nix-repl> with {}; a error: undefined variable 'a' at «string»:1:10: 1| with {}; a | ^ nix-repl> :? The following commands are available: Evaluate and print expression = Bind expression to variable :?, :help Print help about all commands (this content) :a, :add Add attributes from resulting set to scope :b, :build Build a derivation :bl, :build-with-gc-roots Build a derivation, creating GC roots in the working directory :doc Show documentation for the provided function (experimental lambda support) :e, :edit Open package or function in $EDITOR :env Show environment stack :i, :build-and-install Build derivation, then install result into current profile :l, :load Load Nix expression and add it to scope :log Show logs for a derivation :p, :print Evaluate and print expression recursively Strings are printed directly, without escaping. :q, :quit Exit the REPL :r, :reload Reload all files successfully loaded :sh, :shell Build dependencies of derivation, then start nix-shell :t, :type Describe result of evaluation :te, :trace-enable [bool] Enable, disable, or toggle showing traces for errors :u, :use Build derivation, then start nix-shell Debug mode commands :bt, :backtrace Show trace stack :c, :continue Go until end of program, exception or builtins.break :s, :step Go one step :st, :show-trace [integer index] Show current trace. If an integer is provided, this switches to that stack beforehand. Flakes commands :lf, :load-flake Load Nix flake and add it to the scope we can now inspect state nix-repl> :bt 0: error: undefined variable 'a' «string»:1:10 1| with {}; a | ^ 1: error: Fake frame for debugging purposes «string»:1:10 1| with {}; a | ^ and resume execution nix-repl> :c error: undefined variable 'a' at «string»:1:10: 1| with {}; a | ^ the debugger is once again disabled nix-repl> :c error: command 'c' can only be used when the debugger is active leaving the debugger from a toplevel error and entering it again doesn't leave old frames visible nix-repl> with {}; a error: undefined variable 'a' at «string»:1:10: 1| with {}; a | ^ nix-repl> :s error: undefined variable 'a' at «string»:1:10: 1| with {}; a | ^ nix-repl> with {}; b error: undefined variable 'b' at «string»:1:10: 1| with {}; b | ^ nix-repl> :bt 0: error: undefined variable 'b' «string»:1:10 1| with {}; b | ^ 1: error: Fake frame for debugging purposes «string»:1:10 1| with {}; b | ^ exiting from here prints the error nix-repl> :q error: undefined variable 'b' at «string»:1:10: 1| with {}; b | ^