fsm2
  • Overview
  • States
    • Nested States
    • Concurrent Region
      • Fork
      • Join
    • Pseudo States
  • Events
  • Transitions
    • Trigger a Transition
    • Simple Transitions
    • Guard conditions
    • onEnter
    • onExit
    • SideEffects
    • Transition Inheritance
  • Where the action happens
  • Tracking State
    • StateOfMind
    • Stream of States
    • Check the current state
  • Recommendations
  • Debugging your FSM
    • Static Analysis
  • Visualise your FSM
  • Water Example
  • Contributing
  • Features and bugs
  • References
Powered by GitBook
On this page

Was this helpful?

  1. Debugging your FSM

Static Analysis

FSM2 is able to perform a static analysis on your state machine. The static analysis tool is able to detect a number of issues with your FSM including:

  • States which cannot be reached

  • Duplicate States

  • Events which target an non-registered state.

To perform a static analysis I usually set up a unit tests. This allows me to manually run the static analysis with a single click on the unit test.

  test('export', () async {
    final machine = _createMachine();
    await machine.analyse();
  });

PreviousDebugging your FSMNextVisualise your FSM

Last updated 1 year ago

Was this helpful?