ng-state
  • Introduction
  • Main differences
  • Getting Started
    • Instalation
    • Examples
  • Core concepts
    • Main idea
      • More complex flow visualization
    • Configuration
      • Immer Setup
      • ImmutableJs Setup
    • Store
      • Operators
      • Optimistic updates plugin
      • Optimistic updates plugin
      • Form manager plugin
        • onChange hook
        • onPropertyChange
        • shouldUpdateState hook
        • Custom form elements
      • Persist state plugin
        • Configuring custom storage
    • Actions
      • Immer
      • ImmutaleJs
      • Injectable Actions
    • Components with Actions
      • Signal Actions
      • State Actions
    • @InjectStore decorator
    • @WithStore decorator
    • @ComponentState decorator
    • Dispatcher
  • Different scenarios
    • Passing list item index via router
    • ngOnChanges hook
    • FormManager pitfalls
  • Unit testing
    • Setup
    • Test store
    • Test actions
    • Test component with actions
    • Test with Angular TestBed
  • Debugging
    • Setup
    • Redux DevTools
    • Automated changes output
    • Manual state changes check
    • Additional debugging information
  • Production
    • Production mode
    • Server Side Rendering (SSR)
  • Other information
    • Best practices
    • CLI
      • Custom Configurations
    • Performance
    • Blog Posts
    • Contributing
Powered by GitBook
On this page

Was this helpful?

  1. Debugging

Automated changes output

PreviousRedux DevToolsNextManual state changes check

Last updated 6 years ago

Was this helpful?

It is easy to debug latest state changes. Just write in console window.state.debug.start() and latest state will be printed in console each time it changes. Usually developers need to debug some deeply nested state and it is annoying to enter path each time. For this reason you can pass state path to window.state.debug.start(['todos', 0]) and only changes of this peace will be reflected.

To stop debug mode simply call window.state.debug.stop()

Another way to debug is to add third parameter true on you @InjectStore decorator. Console will start to show component state that uses those actions.

Demo