mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
break() primop; step and go debug commands
This commit is contained in:
parent
990bec78d3
commit
412d58f0bb
4 changed files with 40 additions and 2 deletions
|
@ -439,7 +439,11 @@ bool NixRepl::processLine(string line)
|
|||
<< " :d <cmd> Debug mode commands\n"
|
||||
<< " :d stack Show call stack\n"
|
||||
<< " :d env Show env stack\n"
|
||||
<< " :d error Show current error\n";
|
||||
<< " :d error Show current error\n"
|
||||
<< " :d go Go until end of program, exception, or builtins.break().\n"
|
||||
<< " :d step Go one step\n"
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
else if (command == ":d" || command == ":debug") {
|
||||
|
@ -476,6 +480,16 @@ bool NixRepl::processLine(string line)
|
|||
notice("error information not available");
|
||||
}
|
||||
}
|
||||
else if (arg == "step") {
|
||||
// set flag and exit repl.
|
||||
state->debugStop = true;
|
||||
return false;
|
||||
}
|
||||
else if (arg == "go") {
|
||||
// set flag and exit repl.
|
||||
state->debugStop = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
else if (command == ":a" || command == ":add") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue