Skip to content

Rules debugger #2

@FaXaq

Description

@FaXaq

Writting in progress

We have been playing around with rules for quite some time now, but debugging them might be tricky. Would that be possible to have a clear way to debug them ? Wheter, replaying them, or getting the parts logged at some point (giving a clear state of the rules at each time ?)

Moreover, would that be possible to have precompile-errors shown if there is ? (this might require another ticket).

Solution Proposal :

Replay them like a movie. That would be the must, getting to play with states of the rules and getting to run forward and backward with a clear API. Even though it would require to run the rules from the beggining at each time. Like :

var rule = applyRules({debug:true});

rule.run(); //getting the result

rule.playForward(); //getting next step

rule.playBackward(); //getting previous step

rule.getStepsNumber(); //getting all steps number

rule.runToStep(4); //getting rule run until step 4

//and some other that might be relevant

With that API we could make a good UI debugger and facilitate our rule implementation process.

Not touching the current state without the debug option:

var rule = applyRules()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions