Configs2026年7月8日·1 分钟阅读

Redux DevTools — Time-Travel Debugging for State Management

Redux DevTools is a browser extension and standalone app for inspecting, replaying, and debugging Redux state changes in JavaScript applications.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
Overview
直接安装命令
npx -y tokrepo@latest install 42f87300-7a85-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

Redux DevTools provides a browser extension and standalone Electron app that lets developers inspect every dispatched action, view state diffs, and time-travel through state history. It is the standard debugging companion for any Redux-based application.

What Redux DevTools Does

  • Records every dispatched action with its payload and timestamp
  • Displays before/after state diffs for each action
  • Enables time-travel debugging by replaying or skipping individual actions
  • Supports importing and exporting action logs for reproducible bug reports
  • Provides a chart view for visualizing state tree structure

Architecture Overview

The extension injects a bridge into the page context that intercepts the Redux store's dispatch pipeline via middleware or store enhancers. Actions and state snapshots are serialized and sent to the DevTools panel over a messaging channel. The panel UI is a React app that renders the action log, state tree, diff view, and chart. A remote monitor protocol allows standalone apps and server-side Redux instances to connect as well.

Self-Hosting & Configuration

  • Install the browser extension from the Chrome Web Store or Firefox Add-ons
  • Wrap your store creation with composeWithDevTools() or use the __REDUX_DEVTOOLS_EXTENSION__ global
  • Configure action sanitizers to redact sensitive data from logs
  • Set maxAge to limit the number of stored actions and reduce memory usage
  • Use @redux-devtools/remote for debugging Node.js or React Native stores

Key Features

  • Time-travel: jump to any point in action history instantly
  • Action filtering: search and filter actions by type or payload content
  • Persist state: keep the state tree across page reloads during development
  • Lock/unlock: pause recording to isolate specific state transitions
  • Custom monitors: plug in community monitors or build your own panel view

Comparison with Similar Tools

  • React DevTools — Focuses on component tree and props; Redux DevTools focuses on global state flow
  • MobX DevTools — Tracks MobX observable mutations; Redux DevTools tracks action-based dispatch
  • Zustand DevTools — Uses Redux DevTools protocol under the hood for Zustand stores
  • Vue DevTools — Vue-specific; Redux DevTools is framework-agnostic for any Redux store

FAQ

Q: Does it work with Redux Toolkit? A: Yes. Redux Toolkit's configureStore enables DevTools integration by default in development mode.

Q: Does it affect production performance? A: The extension only activates when the DevTools panel is open. In production builds, omit the enhancer or use composeWithDevTools({ trace: false }).

Q: Can I debug server-side Redux stores? A: Yes. Use the remote monitoring package to connect headless Redux instances to a standalone DevTools app.

Q: Does it support non-Redux state managers? A: Any library that implements the DevTools extension protocol can connect. Zustand and some other libraries support it natively.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产