A Chrome and Edge extension that works with the Sidworks DevTools Shopware plugin to deliver smart template insights right inside your browser inspector.
- DevTools Sidebar Panel: Adds a "Shopware" sidebar in the Chrome Elements panel
- Instant Template Detection: Select any element to see which Twig template and block rendered it
- Smart Line Detection: Automatically finds the exact line of your element by analyzing classes, IDs, and tags
- Multi-IDE Support: Open templates directly in PHPStorm or VSCode at the precise line
- Parent Context Awareness: Improves accuracy by considering parent element structure
- Visual Status Indicator: Extension popup shows if DevTools is active on the current page
- Template Metadata: View block names, template paths, file locations, parent templates, and line numbers
- Auto Dark Mode: Automatically adapts to Chrome DevTools theme
- Browser: Chrome, Edge, or any Chromium-based browser (Manifest V3 compatible)
- Shopware Plugin: Sidworks DevTools plugin must be installed and enabled
- Debug Mode: Shopware must be running with
APP_ENV=dev - IDE (optional): PHPStorm or VSCode for "Open in IDE" functionality
- Open Chrome and go to
chrome://extensions/ - Enable Developer mode (toggle in top-right corner)
- Click Load unpacked
- Navigate to and select the unpacked directory
- The Sidworks DevTools plugin icon will appear in your toolbar
- Click the extension icon in your Chrome toolbar
- Click Options (or right-click icon β Options)
- Configure settings:
- Project Path: This has to be configured within the Shopware plugin configuration.
- Editor Type: Choose PHPStorm or VSCode
- Enable IDE Integration: Toggle IDE link functionality
Tip for Docker/DDEV users: Add the PROJECT_PATH environment variable to your docker-compose.yml or .ddev/config.yaml:
web_environment:
- PROJECT_PATH=/Users/yourname/Development/your-shopware-projectThe plugin will automatically inject this path into the page, so you don't need to manually configure it in the extension options.
- Open your Shopware site in Chrome (with debug mode enabled)
- Open Chrome DevTools (
F12or right-click β Inspect) - Go to the Elements panel
- Select any HTML element
- Look at the "Shopware" sidebar on the right
- View template information and click to open in your IDE
When you inspect an element, the sidebar displays:
- Template Type: Icon and label (π Page, π§© Component, π§ Utility)
- Template Name: Filename (e.g.,
index.html.twig)
- Open in PHPStorm/VSCode: Clickable link that opens the file at the exact element line
- Status Message: Shows match details or warnings
- β Green: Found exact element match
β οΈ Orange: Opened at block start (element may be in an included template)
- Block Name: The Twig block that rendered this element (e.g.,
page_product_detail) - Full Path: Shopware namespace path (e.g.,
@Storefront/storefront/page/product-detail/index.html.twig) - Extends: Parent template if this template extends another
- File Path: Relative filesystem path (e.g.,
vendor/shopware/storefront/Resources/views/...)
- Element: Tag name, ID, and primary class (e.g.,
DIV#product-123.product-detail) - Classes: All CSS classes on the element
The extension uses intelligent search to find your exact element:
- Exact ID Match:
id="product-detail-123"β exact match priority - Partial ID Match:
id="btn-{{ loop.index }}"β matches static prefixbtn- - Multi-Class Match:
class="btn btn-primary active"β progressively searches for all class combinations - Parent Context: Uses parent element classes to disambiguate when multiple matches exist
- Dynamic Class Prefix:
class="card-{{ type }}"β matches dynamic class patterns with Twig - Tag Fallback:
<img>,<div>β falls back to tag name for minimal-attribute elements
Click the extension icon to see:
- Status: Whether DevTools is active on the current page
- Template Count: Number of tracked templates on the page
- Options Link: Quick access to settings
- Plugin Injects Data: Shopware plugin adds
<script id="sidworks-shopware-devtools-data">with template metadata - Content Script Detects:
content.jsdetects the data and notifies the extension - DevTools Panel Created:
devtools-init.jscreates the "Shopware" sidebar panel - Element Selection: User selects element in Chrome Elements panel
- Data Extraction:
inspector.jsreads element'sdata-swdtattribute and looks up metadata - Line Search: Extension calls
/_action/sidworks-devtools/find-lineAPI to find exact element line - IDE Integration: Generates
phpstorm://orvscode://URL to open file at line
When you click an IDE link, the extension:
- Extracts element classes, ID, tag name, and parent classes
- Sends POST request to
/_action/sidworks-devtools/find-linewith search criteria - Backend searches template file for best match
- Returns exact line number and matched pattern
- Extension opens IDE at that line
Settings are stored in Chrome's chrome.storage.sync:
editorType:'phpstorm'or'vscode'enableIde: Boolean to enable/disable IDE integration
- Ensure the Shopware plugin is installed and enabled
- Check that Shopware is running in debug mode (
APP_ENV=dev) - Refresh the page
- Clear Shopware cache:
bin/console cache:clear
- DevTools data not found on page
- Ensure plugin is active (check popup)
- Verify
<script id="sidworks-shopware-devtools-data">exists in page source
- Check that Project Path in plugin configuration options matches your local filesystem
- For Docker setups, the path should be your host machine path, not container path
- Example:
/Users/you/shopwarenot/var/www/html
- PHPStorm: Ensure PHPStorm is running and deep linking is enabled
- PHPStorm β Tools β Create Command-line Launcher
- Enable "Open file" protocol handler
- VSCode: Ensure VSCode is set as default handler for
vscode://URLs - Check that IDE integration is enabled in extension options
- Verify project path is configured
- Extension falls back to block start line
- Element may be in an
{% include %}or{% sw_include %}template - Try inspecting the parent element
- Check status message for details
This extension uses vanilla JavaScript with no build process. Just edit and reload.
- Make code changes
- Go to
chrome://extensions/ - Click the reload icon for Sidworks DevTools plugin
- Refresh your Shopware page
- Reopen DevTools
- Extension popup: Right-click extension icon β Inspect popup
- Options page: Right-click on options page β Inspect
- DevTools panel: Open DevTools β Console shows logs from inspector
- Content script: Open page console β filter for "Sidworks DevTools"
This extension works in tandem with the Shopware plugin. When making changes:
- Updating the extension: Verify compatibility with the plugin's data format and API endpoints
- If the plugin changes: Update the extension accordingly to handle new data structures or API changes
- Both components should be kept in sync to ensure proper functionality
Tested and working on:
- β Google Chrome 88+
- β Microsoft Edge 88+
- β Brave
- β Any Chromium-based browser with Manifest V3 support
- No data collection: Extension does not collect or transmit any user data
- Local only: All data stays on your machine
- Debug mode only: Only works on development sites with debug mode enabled
- No external requests: Only communicates with your local Shopware installation
MIT License - See LICENSE file for details
- Issues: Report bugs on GitHub
- Plugin Documentation: See main README