Skip to main content

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

Symptoms:
  • Extension doesn’t appear in checkout
  • Not visible in admin
  • Deployment succeeded but nothing shows
Debugging Steps:
1

Check Deployment Status

Verify extension is deployed and released
2

Verify Extension Configuration

Check shopify.extension.toml:
Ensure target matches checkout flow
3

Add to Checkout Editor

  1. Settings → Checkout → Customize
  2. Find extension in left sidebar
  3. Drag into layout
  4. Save
4

Check Conditional Logic

Review your component for conditions that might hide it:
Common Causes:
  • Wrong extension target
  • Not added to checkout editor
  • Conditional rendering hiding it
  • Extension not released (draft mode)

Debugging Techniques

Add debug logs to your extensions:
View in browser DevTools → Console
Inspect component state and props:
  1. Install React DevTools
  2. Open checkout in browser
  3. Open DevTools → Components tab
  4. Find your extension component
  5. Inspect props, state, hooks
Useful for:
  • Checking hook values
  • Verifying props
  • Testing renders
Monitor API calls:
  1. Open DevTools → Network tab
  2. Filter by “Fetch/XHR”
  3. Look for GraphQL requests
  4. Inspect request/response
Check for:
  • Query variables
  • Response data
  • Error messages
  • Status codes
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
Fixes:
  • Reduce bundle size
  • Lazy load components
  • Optimize images
  • Remove unused deps

Function Timeout

Symptoms: Function exceeds 5ms limitDebug:
  • Check function logs for timing
  • Add timing code:
Fixes:
  • 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
Fixes:
  • 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:

Advanced Debugging

Debug deployed extensions:
  1. Open checkout on device
  2. Connect via USB (mobile)
  3. Chrome → chrome://inspect
  4. Select device
  5. 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:

Shopify Community

Documentation

GitHub Issues

Report bugs:
  • Synapse GitHub
  • Include error logs
  • Provide minimal reproduction
  • Tag appropriately

Next Steps

Best Practices

Learn optimization techniques

Troubleshooting

Common issues and solutions

Validation

Understand MCP validation

Self-Correction

How errors are auto-fixed