The extension adds a Hotwire panel to your browser's DevTools.
Hover any element in the panel to highlight it on the page, scroll to it, or jump to it in the Elements panel.
- Tree of all Turbo Frames, including nested frames, their attributes and the links and forms that target them
- Reload a single Turbo Frame from the panel
- Live feed of incoming Turbo Streams with action, target and HTML, including streams rendered before the panel was opened
- Flags Turbo Streams whose target doesn't exist on the page
- Connection status of Turbo Stream WebSockets
- Current Turbo settings: Turbo Drive, visit control, cache control and link prefetch
- Elements with
data-turbo-permanentanddata-turbo-temporary
- All Stimulus controllers on the page
- Inspect and edit values live
- Targets, outlets, classes and actions of each controller
- Trigger controller actions from the panel
- Flags controllers that aren't registered in
window.Stimulus
- Every Turbo event (
turbo:load,turbo:frame-load,turbo:before-fetch-request, …) with filter and details
- Duplicate Turbo Frame IDs
data-controllerwithout a registered Stimulus controller- Stimulus targets outside their controller
data-turbo-permanentelements without an ID or with a duplicate ID- Mute single warnings per site
These work without opening DevTools and are configured in the extension popup:
- Highlight Turbo Frames and Stimulus controllers on the page
- Highlight Turbo Frame changes
- In-page detail panel with Stimulus controllers, Turbo Frames and Turbo Streams
- Log Turbo Streams, Turbo events and warnings to the browser console
The extension can be installed at:
DevTools panel: Open your browser's DevTools (on Safari: Develop → Show Web Inspector) and select the Hotwire tab.
On-page tools: Click the extension icon (or press Alt+Shift+S) and enable the features you want to use.
Note
On Firefox you may need to select "Always allow on example.com" to enable the extension on your site
- Fork the project locally
npm installnpm run dev- to build the extension and watch for changesnpm run dev:panel- to work on the DevTools panel UI with mock data at http://localhost:3333/dev.html, without reloading the extensionnpm run build- to bundle the extension into static files for productionnpm run format- to format changes with Prettier
Note
By default, the extension will be built for Chrome. To build for Firefox or Safari just add firefox or safari as an argument to the build command: npm run build firefox or npm run build safari.
- Open Chrome and navigate to
chrome://extensions/ - Enable Developer mode
- Click on
Load unpackedand select thepublicfolder (make sure to build the extension first)
The easiest way is to make use of the web-ext tool:
cd public
npx web-ext runThat will open a new Firefox instance with the extension installed and hot reloading enabled.
First configure Safari to run unsigned extensions:
- Choose Safari > Settings
- Select the Advanced tab
- Check the "Show features for web developers" box
- Select the Developer tab.
- Check the Allow unsigned extensions box.
This may depend on the version of macOS and Safari you are using.
So if you can't find the settings, you may need to search for the specific version you are using.
Then you can load the extension by following these steps:
- Open Xcode
- Choose "Open Existing Project"
- Select the xcode/HotwireDevTools.xcodeproj workspace (blue icon)
- Build the project (you may need to select a team in the project settings -> Signing & Capabilities)
- Open Safari > Settings > Extensions and enable the Hotwire Dev Tools extension
Bug reports and pull requests are welcome on GitHub at https://github.com/leonvogt/hotwire-dev-tools.
This project uses Prettier to format the code and ensure a consistent style.
Please run npm run format prior to submitting pull requests.
This Dev Tool was inspired by turbo-devtool and turbo_boost-devtools 🙌