Bug 146623 - Enhance Function Wizard Structure Tab for Better Formula Debugging
Summary: Enhance Function Wizard Structure Tab for Better Formula Debugging
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Function-Wizard
  Show dependency treegraph
 
Reported: 2022-01-06 18:06 UTC by Damian Hofmann
Modified: 2023-04-25 01:37 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
testcase with named formulas (8.93 KB, application/vnd.oasis.opendocument.spreadsheet)
2022-01-06 18:07 UTC, Damian Hofmann
Details
Screenshot with annotations (140.17 KB, image/png)
2022-01-06 18:08 UTC, Damian Hofmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Damian Hofmann 2022-01-06 18:06:20 UTC
Description:
The Function Wizard Structure Tab currently only shows the immediate structure of the formula of the currently selected cell. There is no way to "step into" / "drill down" intermediate results that are referenced from other cells or named formulas.

This makes debugging complex formulas quite cumbersome.

Especially if named formula are used, LO does not seem to provide any debugging tools:

* "Trace precedents" and "Trace dependends" are fairly useless at detecting errors in named formulas
* No tool to perform a step-by-step evaluation, like MS Excels "Evaluate Formula" tool (enhancement request #77684 was closed with "Won't Fix")
* Structure tab in "Function Wizard" doesn't show the result of the evaluated named formula
* Structure tab in "Function Wizard" doesn't allow to "drill down" into a formula

Please either extend the "Function Wizard" to allow "drill down" into a formula, incl. display of evaluated results for named formulas.

Or alternatively, reopen #77684 and provide a proper "Evaluate Formula" feature, like MS Excel has, with "Step into" and "Step out" functionality.

Steps to Reproduce:
1. In the "Name Manager" create multiple named formula expression
2. Some of the formula expression should refer to other named formula expressions
3. Use a formula expression in a cell
4. Open the "Function Wizard" for that cell and switch to the "Structure" tab

Actual Results:
1. Only the immediate formula of the cell is shown, no "drill down" possible
2. Referenced named formulas are only listed by name, but the evaluated value isn't displayed

Consequence: Debugging/tracing complex formulas that use named formulas is basically impossible. Debugging/tracing formulas that reference other cells with formulas is possible with other tools like "Trace precedents", but is cumbersome

(see attached screenshot)

Expected Results:
Structure tab always shows the evaluation results of all parts of the formula and provides a "drill down" (or "step into") feature, so that results and errors can be traced back to their origin.

For the provided example, I'd expect to see a structure like this

- = #DIV/0!
  * = #DIV/0!
    B1 = 42
    named_formula = #DIV/0! (expandable for drill-down)
      - = #DIV/0!
        + = #DIV/0!
          B1 = 42
          nested_named_formula = #DIV/0! (expandable for drill-down)
            * = #DIV/0!
              B1 = 42
              named_formula_with_error = #DIV/0! (expandable for drill-down)
                / = #DIV/0!
                  42
                  0
                
        another_nested_formula = 84 (expandable for drill-down)
          + = 84
            B1 = 42
            42
  B4 = 42 (expandable for drill-down)
    / = 42
      B1 = 42
      B2 = 1


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.4.1 (x64) / LibreOffice Community
Build ID: 27d75539669ac387bb498e35313b970b7fe9c4f9
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-CH (de_CH); UI: en-US
Calc: threaded
Comment 1 Damian Hofmann 2022-01-06 18:07:20 UTC
Created attachment 177355 [details]
testcase with named formulas
Comment 2 Damian Hofmann 2022-01-06 18:08:18 UTC
Created attachment 177356 [details]
Screenshot with annotations
Comment 3 Roman Kuznetsov 2023-02-10 18:13:19 UTC
Added UX team for discussion
Comment 4 Heiko Tietze 2023-02-13 11:46:26 UTC Comment hidden (off-topic)
Comment 5 Damian Hofmann 2023-02-16 19:40:11 UTC Comment hidden (off-topic)
Comment 6 Damian Hofmann 2023-02-16 20:02:51 UTC Comment hidden (off-topic)
Comment 7 Heiko Tietze 2023-02-20 14:59:01 UTC Comment hidden (off-topic)
Comment 8 Heiko Tietze 2023-02-20 15:02:17 UTC
I think we can handle the UX topics on bug 92416. 

(In reply to Damian Hofmann from bug 92416 comment 6)
> What I do not see in the mockup yet is the ability to drill down / debug
> further, into referenced cells.

Sure, could be done as suggested here.