Debugging
The Prismic module includes debugging capabilities to help you develop and troubleshoot your Prismic integration.
Debug Block
The module provides a debug block that can be useful during development. You can add this block to your layout to see the raw Prismic document data:
This will display all available Prismic data for the current document, which can be helpful when:
- Developing new templates
- Troubleshooting content issues
- Understanding the document structure
- Verifying field values
Enabling Debug Mode
To enable debug mode:
- Go to the Magento admin panel
- Navigate to Stores > Configuration > Elgentos > Prismic.IO
- Under the Content section, enable "Debugging"
- Clear the cache
When debug mode is enabled, you'll see additional information in your browser's developer tools and on the page if the debug block is present.
Debug Mode Features
When debug is enabled: - Detailed error messages - API request logging - Template path information - Context debugging tools
Debug Output
Add the debug parameter to see detailed information:
Exception Handling
With exceptions enabled: - Detailed stack traces - API error information - Context resolution errors - Template processing issues