# Setup

Debuging is disabled by default and can be invoked via console see more on [Automated Changes Output](/react-state-rxjs/debugging/automated-changes-output.md)

#### 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:

```typescript
ReactState
    .debugger(true, { enableConsoleOutput: false })
    .init((routerHistory: History) => {
        hydrate(<Main history={routerHistory} />, document.getElementById("example"))
    }, initialState, isProd);
```

As you can see there are more options:

* enableConsoleOutput - toggle output changes to console or not
* enableDevToolsOutput - toggle output changes to Redux DevTools or not

#### History options

`react-state-rxjs` 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`

```typescript
ReactState
    .changeHistoryDefaultOptions({ collectHistory: false })
    .init((routerHistory: History) => {
        hydrate(<Main history={routerHistory} />, document.getElementById("example"))
    }, initialState, isProd);
```

it has such options:

* storeHistoryItems - number of items to store
* collectHistory - enable or disable history collecting


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vytautaspranskunas.gitbook.io/react-state-rxjs/debugging/setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
