Evaluate statements and print expressions without using the 'e' or 'p' commands.
To avoid cognitive stress, one-letter variables require the 'p' command to view.
But assigning to one-letter variables does *not* require the 'e' command. :)
Also included:
- default to "h" for empty commands when no previous command exists
- avoid overwriting previous command for specific commands not worth repeating
- avoid overwriting previous command with an invalid command
- avoid overwriting previous command with an implicit evaluation
* feat: support variable assignment
- locals and upvalues can be overwritten
- declaring new variables must be done like `_G.foo = 1`
* doc: add eval to help message
* fix: cmd_print with tuple expression
* nit: require a space after print/eval commands
* feat: step/next now return to the bottom frame
Previously, the inspected frame would not change, which could be
confusing.
* feat: make (f)inish work relative to the inspected frame
* doc: cmd_finish exits the inspected frame
..not the current function.
Clarify that the up/down commands change the inspected frame.
Now, the print command works with:
-- ordinary tuples
p 1, 2, 3
-- sparse tuples
p 1, nil, 2
-- trailing nils
p 1, 2, nil
-- just nil
p nil
-- nothing
p (function() end)()
* fix: return tuple from dbg.call
* feat: make dbg.call pass varargs to the guarded function
* fix: return the error caught by dbg.call
This makes `dbg.call` identical to `pcall`
With this commit, the up and down commands hop over any C function calls. This provides a better experience, since you can't do anything on C frames anyway.
The trace command will continue to show C function calls, though.