# Memorio DevTools

> 🖥️ **Browser Only**: This feature is only available in browser console

Browser console debugging tools for inspecting and managing Memorio state.

## Quick Start

```javascript
// Load memorio first
import 'memorio'
```

## Available Methods

### inspect()

Inspect all Memorio modules in the console.

```javascript
memorio.devtools.inspect()
```

### stats()

Get statistics about all modules.

```javascript
memorio.devtools.stats()
// Returns: { stateKeys, storeKeys, sessionKeys, cacheKeys, idbDatabases, lastUpdate }
```

### clear(module)

Clear data from a specific module.

```javascript
memorio.devtools.clear('state')
memorio.devtools.clear('store')
memorio.devtools.clear('session')
memorio.devtools.clear('cache')
```

### clearAll()

Clear all Memorio data.

```javascript
memorio.devtools.clearAll()
```

### watch(module, path)

Watch a specific path for changes.

```javascript
memorio.devtools.watch('state', 'user.name')
```

### exportData()

Export all data as JSON.

```javascript
const json = memorio.devtools.exportData()
console.debug(json)
```

### importData(jsonString)

Import data from JSON.

```javascript
memorio.devtools.importData('{"state":{"key":"value"}}')
```

### help()

Show help information.

```javascript
memorio.devtools.help()
```

## Console Shortcuts

Memorio provides global shortcuts for quick access:

```javascript
$state    // globalThis.state
$store    // globalThis.store
$session  // globalThis.session
$cache    // globalThis.cache
```

## Examples

### Inspect current state

```javascript
memorio.devtools.inspect()
```

### Export and restore state

```javascript
// Export
const backup = memorio.devtools.exportData()

// Later... import
memorio.devtools.importData(backup)
```

### Monitor changes

```javascript
// Watch a specific path
memorio.devtools.watch('state', 'counter')

// Now changes will be logged to console
state.counter = 42 // Console shows: 👁 Change: state.counter = 42
```
