mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-30 13:46:47 -06:00
- `macro.debug` refuses to run as a step of a script or macro, and is never recorded (the recording buffer and Record Actions' journal both leave it out); a debugger whose undo group something else closed locks nothing, and its next action says the run had ended instead of reporting a keep or a rollback. Tests: `the_debugger_runs_on_its_own_and_is_never_recorded`, `a_debugger_whose_group_was_closed_elsewhere_locks_nothing`. - Stop Action is no longer refused under the debugger: it rolls the run back, ends the debugger and names the macro. Test: `stop_action_stops_a_macro_being_debugged` (was `stop_action_waits_while_a_macro_is_being_debugged`). - Between steps the debugged workbook runs only `macro.debug`, queries and an allow-list of commands that look around (selection, sheet changes, Go To, Find, Copy, zoom, Switch Window, Close, Stop Action); everything else is refused, saving and view modes included. The run's active sheet and selection are put back before its next step. Test: `between_steps_only_looking_around_runs_and_the_run_continues_where_it_was`. - Only the top-level `macro.debug` call rolls the run back after a panic; a panic nested in a step is that step's error. Test: `a_panic_inside_a_step_is_that_steps_error_and_the_run_goes_on`. - `keep` and `breakpointsOnly` must be true or false, breakpoints must be step paths of the macro (at most 10,000), and the action is checked before breakpoints change. Test: `debugger_parameters_are_checked_before_anything_changes`. - Answers: `executed` counts the run's own steps (not the footprint's), `shifted` and `wroteFiles` are reported, a rollback's message names the files that stay, `changed` lists deleted and renamed sheets and at most 500 entries with `changedCells`, and a Repeat over whole rows or columns shows the part in use. Tests: `the_debuggers_answers_count_its_own_steps_and_say_what_stays`, `the_debugger_lists_deleted_and_renamed_sheets_and_caps_the_list`, `the_debugger_shows_a_repeat_over_whole_columns_as_the_run_goes_over_them`.