Setup

Debugging is disabled by default and can be invoked via console see more on Automated Changes Output

Debugger setup

However, often there are cases, when you need to track whole state change history from very start for example initial data load etc. For this case you can enable it on app initialization:

StoreModule.provideStore(initialState, false, {
    debugger: {
        enableInitialDebugging: true,
        options: ...
    }
})

As you can see there are more options:

  • enableConsoleOutput - toggle output changes to console or not: Default: true

  • enableDevToolsOutput - toggle output changes to Redux DevTools or not. Default: true

History options

ng-state keeps 100 latest history items by default. It can be useful when you want to send some logs for further investigation. You can disable or increase stored items by overriding default parameters by invoking changeHistoryDefaultOptions

StoreModule.provideStore(initialState, false, {
    history: {
        collectHistory: true,
        storeHistoryItems: 10
    }
})

it has such options:

  • storeHistoryItems - number of items to store. Default: 100

  • collectHistory - enable or disable history collecting. Deafult: true

Last updated