Lab - Debugging Your Stencil Theme
Lab - Debugging Your Stencil Theme
Lab - Debugging Your Stencil Theme
The Stencil framework provides built-in debugging tools to aid in your custom frontend development. It’s always a good practice to uncover what’s happening behind the scene as we make changes. It’s a good way to debug code you have inherited or when you want to see what data is available on the page you are working on, you can simply add the debug query string to your store’s localhost URL.

This lab aims to enhance the understanding of Stencil objects, explore the connection between Config/Schema and Handlebars, and learn how to create and conditionally import components, and styling techniques.
In this lab, you will:
Prerequisites
You can use the debug query string on any page in your store’s localhost URL to get a list of all of the objects available on the page.
?debug=context to the end of the page URL you are on:![]()
?debug=bar like below:![]()
When making changes to your Stencil theme, a log will populate in Terminal/Shell, including some types of errors.
<theme-name>/templates/pages/home.html in your chosen editor{"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}