Overview
Comprehensive debugging guide for identifying and fixing issues in your Synapse-generated extensions and functions.Debugging Tools
Browser DevTools
Debug UI extensions in checkout
- Console logs
- Network requests
- React DevTools
- Performance profiling
Shopify CLI
Local development and logs
shopify app dev- Function logs
- Extension preview
- GraphQL introspection
Fly.io Logs
Deployment and build logs
- Build output
- Deploy status
- Runtime errors
- Environment issues
MCP Validation
Synapse validation output
- API compliance
- Component usage
- Type errors
- Best practices
Common Issues
- Extension Not Showing
- GraphQL Errors
- Function Not Applying
- Build Failures
Symptoms:Verify extension is deployed and releasedCommon Causes:
- Extension doesn’t appear in checkout
- Not visible in admin
- Deployment succeeded but nothing shows
1
Check Deployment Status
2
Verify Extension Configuration
Check Ensure target matches checkout flow
shopify.extension.toml:3
Add to Checkout Editor
- Settings → Checkout → Customize
- Find extension in left sidebar
- Drag into layout
- Save
4
Check Conditional Logic
Review your component for conditions that might hide it:
- Wrong extension target
- Not added to checkout editor
- Conditional rendering hiding it
- Extension not released (draft mode)
Debugging Techniques
Console Logging
Console Logging
Add debug logs to your extensions:View in browser DevTools → Console
React DevTools
React DevTools
Inspect component state and props:
- Install React DevTools
- Open checkout in browser
- Open DevTools → Components tab
- Find your extension component
- Inspect props, state, hooks
- Checking hook values
- Verifying props
- Testing renders
Network Debugging
Network Debugging
Monitor API calls:
- Open DevTools → Network tab
- Filter by “Fetch/XHR”
- Look for GraphQL requests
- Inspect request/response
- Query variables
- Response data
- Error messages
- Status codes
Function Testing
Function Testing
Test functions locally:
Performance Debugging
Slow Extension Load
Symptoms: Extension takes long to appearDebug:
- DevTools → Performance tab
- Record page load
- Look for long tasks
- Check bundle size
- Reduce bundle size
- Lazy load components
- Optimize images
- Remove unused deps
Function Timeout
Symptoms: Function exceeds 5ms limitDebug:Fixes:
- Check function logs for timing
- Add timing code:
- Use Rust instead of JS
- Minimize loops
- Cache calculations
- Reduce query surface
Memory Issues
Symptoms: Extension crashes, Fly.io OOMDebug:
- DevTools → Memory tab
- Take heap snapshots
- Check for memory leaks
- Clean up event listeners
- Avoid large data structures
- Use React.memo
- Optimize re-renders
Large Bundle
Symptoms: Build size over 50KBDebug:Fixes:
- Remove unused imports
- Use tree-shaking
- Avoid large libraries
- Code splitting
Error Messages Reference
Common errors and solutions:| Error | Cause | Solution |
|---|---|---|
Extension target not found | Invalid target in toml | Check extension targets docs |
Field not found on type | GraphQL query error | Verify field exists in schema |
Function execution timeout | Function too slow | Optimize logic, use Rust |
Permission denied | Missing API scopes | Add required scopes to app |
Network request failed | API call failed | Check network, retry logic |
Component not found | Import error | Verify component name/import |
Type error | TypeScript mismatch | Add type guards, fix types |
Build failed | Compilation error | Check Fly.io logs, fix syntax |
Advanced Debugging
- Remote Debugging
- Source Maps
- Error Boundaries
Debug deployed extensions:
- Open checkout on device
- Connect via USB (mobile)
- Chrome →
chrome://inspect - Select device
- Inspect and debug
Debugging Checklist
Before asking for help:- Checked browser console for errors
- Verified extension is deployed and released
- Added extension to checkout editor (if UI extension)
- Tested GraphQL queries in GraphiQL
- Reviewed Fly.io build/deploy logs
- Checked function logs (if using functions)
- Tested locally with
shopify app dev - Verified environment variables are set
- Confirmed API permissions/scopes
- Checked for conditional logic hiding components
- Reviewed MCP validation output
- Tested with different data/scenarios
Getting Help
Synapse Support
Contact support:
- Email: support@synapsebuilder.org
- Include generation ID
- Share error messages
- Provide steps to reproduce
Shopify Community
Community resources:
Documentation
Official docs:
GitHub Issues
Report bugs:
- Synapse GitHub
- Include error logs
- Provide minimal reproduction
- Tag appropriately