Script injections for CS teams made easier ๐
A powerful Chrome extension designed for Technical Solutions Consultants, developers, and support engineers who need to quickly test, debug, and manage JavaScript code snippets directly in the browser.
Problem: Technical Solutions Consultants and developers constantly need to:
- ๐ Debug merchant integration issues
- ๐ Analyze network logs and console outputs
- ๐ ๏ธ Test JavaScript snippets quickly
- ๐พ Store and reuse debugging scripts
- ๐ Share code snippets across different environments
Solution: A unified debugging companion that lives in your browser!
graph TD
A[๐งโ๐ป Developer] --> B[๐ Write JS Code]
B --> C[โถ๏ธ Execute in Browser]
C --> D[๐ View Console Logs]
D --> E[๐พ Save for Later]
E --> F[๐ Share with Team]
style A fill:#e1f5fe
style B fill:#f3e5f5
style C fill:#e8f5e8
style D fill:#fff3e0
style E fill:#fce4ec
style F fill:#f1f8e9
- ๐ Dark Theme - Easy on the eyes during long debugging sessions
- ๐ Syntax Highlighting - JavaScript with full IntelliSense
- โจ๏ธ Keyboard Shortcuts -
Ctrl+Sto save,Ctrl+Enterto run - ๐ง Code Formatting - Auto-format your messy code
- ๐ Save & Organize - Name and store your frequently used scripts
- ๐ฏ Quick Access - Dropdown menu for instant script selection
- ๐ท๏ธ Smart Naming - Auto-generated names with timestamps
โ ๏ธ Unsaved Changes Detection - Never lose your work
- ๐ค Export Scripts - Share your toolbox with teammates
- ๐ฅ Import Scripts - Load scripts from CSV files
- ๐ Cross-Account Sync - Move your scripts between Chrome profiles
- ๐ Bulk Operations - Select multiple scripts for batch export
- โก Instant Execution - Run scripts with one click
- ๐ Console Integration - View logs directly in the popup
- ๐ฏ Page Context - Scripts run in the actual page environment
- ๐งน Auto Cleanup - Prevents script conflicts and memory leaks
flowchart TB
subgraph "๐ Browser Environment"
A[๐ฑ Popup UI]
B[๐ฏ Content Script]
C[โ๏ธ Background Service]
D[๐ Web Page]
end
subgraph "๐พ Storage Layer"
E[๐๏ธ IndexedDB]
F[๐ Local Scripts]
end
A -->|User Input| B
B -->|Execute Script| C
C -->|Inject Code| D
A <-->|Store/Retrieve| E
E -->|Manage| F
style A fill:#e3f2fd
style B fill:#f3e5f5
style C fill:#e8f5e8
style D fill:#fff8e1
style E fill:#fce4ec
style F fill:#f1f8e9
sequenceDiagram
participant ๐ค User
participant ๐จ Popup
participant ๐ก Background
participant ๐ WebPage
๐ค User->>๐จ Popup: Write JavaScript Code
๐ค User->>๐จ Popup: Click "Run Script"
๐จ Popup->>๐ก Background: Send Script Content
๐ก Background->>๐ WebPage: Inject & Execute
๐ WebPage->>๐ก Background: Return Results & Logs
๐ก Background->>๐จ Popup: Display Console Output
๐จ Popup->>๐ค User: Show Execution Results
-
๐ฅ Install Extension
# Clone the repository git clone https://github.com/your-repo/shopify-script-debugger cd shopify-script-debugger # Install dependencies npm install # Build the extension npm run build
-
๐ง Load in Chrome
- Open
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the extension folder
- Open
-
๐ฏ Pin Extension
- Click the puzzle piece icon in Chrome toolbar
- Pin "Shopify Script Debugger" for easy access
// ๐ฏ Example: Check if jQuery is loaded
if (typeof $ !== 'undefined') {
console.log('โ
jQuery is loaded!', $.fn.jquery);
} else {
console.log('โ jQuery not found');
}
// ๐ Example: Debug Shopify cart
if (typeof Shopify !== 'undefined') {
console.log('๐ Cart contents:', Shopify.cart);
} else {
console.log('๐ซ Not a Shopify store');
}- Write your code in the editor
- Press
Ctrl+Sor click "Save" - Give your script a meaningful name
- Access it anytime from the dropdown! ๐
graph LR
A[๐ New Script] --> B{๐พ Save?}
B -->|Yes| C[๐ท๏ธ Name Script]
B -->|No| D[โ ๏ธ Unsaved Changes]
C --> E[๐ Script Library]
E --> F[๐ค Export]
E --> G[๐๏ธ Delete]
E --> H[โ๏ธ Edit]
style A fill:#e8f5e8
style C fill:#e3f2fd
style E fill:#f3e5f5
style F fill:#fff3e0
๐ฆ shopify-script-debugger/
โโโ ๐ manifest.json # Extension configuration
โโโ ๐ popup/ # React-based UI
โ โโโ ๐ src/
โ โ โโโ ๐จ components/ # React components
โ โ โโโ ๐ง hooks/ # Custom React hooks
โ โ โโโ ๐ฏ utils/ # Utility functions
โ โโโ ๐ build/ # Compiled popup
โโโ ๐ scripts/ # Extension scripts
โ โโโ โ๏ธ background.js # Service worker
โ โโโ ๐ฏ contentScript.js # Page injection
โ โโโ ๐พ storageService.js # IndexedDB operations
โโโ ๐ icons/ # Extension icons
- ๐จ Frontend: React 18 + Tailwind CSS
- ๐ Code Editor: CodeMirror 6 with JavaScript syntax highlighting
- ๐พ Storage: IndexedDB for local script persistence
- ๐๏ธ Build: Webpack + Babel for modern JavaScript
- ๐ฏ Extension APIs: Chrome Extensions Manifest V3
erDiagram
SCRIPT {
string id PK
string name
text content
number lastModified
string description
}
USER ||--o{ SCRIPT : creates
SCRIPT ||--o{ EXECUTION : runs
EXECUTION {
string scriptId FK
timestamp executedAt
text logs
boolean success
}
// ๐ Debug Shopify theme issues
const themeInfo = {
name: Shopify.theme.name,
id: Shopify.theme.id,
role: Shopify.theme.role
};
console.log('๐จ Current theme:', themeInfo);
// ๐ Check installed apps
const apps = Array.from(document.querySelectorAll('script[src*="app"]'))
.map(script => script.src);
console.log('๐ฑ Detected apps:', apps);// โก Performance monitoring
const perfData = {
loadTime: performance.timing.loadEventEnd - performance.timing.navigationStart,
domReady: performance.timing.domContentLoadedEventEnd - performance.timing.navigationStart,
resourceCount: performance.getEntriesByType('resource').length
};
console.log('๐ Performance metrics:', perfData);// ๐งช Form validation testing
const forms = document.querySelectorAll('form');
forms.forEach((form, index) => {
console.log(`๐ Form ${index + 1}:`, {
action: form.action,
method: form.method,
fields: form.querySelectorAll('input, select, textarea').length
});
});- ๐ Cloud Sync - Sync scripts across devices
- ๐ค Team Sharing - Share script collections with teammates
- ๐ Analytics Dashboard - Track script usage and performance
- ๐ API Integration - Connect with external debugging tools
- ๐จ Custom Themes - Personalize the editor appearance
- ๐ Version Control - Track script changes over time
- ๐ค AI Suggestions - Smart code completion and debugging hints
timeline
title ๐
Development Timeline
section ๐ก Ideation
Q1 2024 : Initial concept
: Market research
section ๐๏ธ Development
Q2 2024 : MVP development
: Core features
section ๐งช Testing
Q3 2024 : Beta testing
: User feedback
section ๐ Release
Q4 2024 : Public release
: Feature expansion
We welcome contributions! Here's how you can help:
- ๐ Check existing issues
- ๐ Create detailed bug report
- ๐ท๏ธ Include steps to reproduce
- ๐ญ Discuss in GitHub Discussions
- ๐ Create feature request
- ๐ณ๏ธ Get community feedback
- ๐ด Fork the repository
- ๐ฟ Create feature branch
- โ Write tests
- ๐ค Submit pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- ๐จ CodeMirror - For the amazing code editor
- โ๏ธ React Team - For the robust UI framework
- ๐ฏ Chrome Extensions Team - For the powerful platform
- ๐๏ธ Shopify Community - For inspiration and use cases
- ๐ Bug Reports: GitHub Issues
- ๐ก Feature Requests: GitHub Discussions
- ๐ง Email: your-email@example.com
- ๐ฆ Twitter: @yourhandle
โญ Star this repository if it helped you! โญ
Made with โค๏ธ for the developer community