Announcements
Preview Your Storefront
End-to-End Testing with CodeceptJS
General Troubleshooting Tips
Debug Your Storefront Next App Locally
Logging in Storefront Next
CLI Reference
B2C Commerce Release Notes
Ask the Community
By default, the app server displays console messages in the terminal but you can’t observe code execution. This limitation can make it hard to debug the code that renders pages on the server side (or on your local machine). For enhanced debugging, start your local development server with an alternate command that runs an inspector process in Node.js that a debugger attaches to.
For more information about the inspector process in Node.js, see the Node.js documentation.
Attach the debugger included in many popular browsers and text editors to Node’s inspector process. Here are instructions for Google Chrome and Visual Studio Code.
pnpm dev:debug.chrome://inspect.debugger statements, and so on.Now you can trace the execution of your server-side code!
To learn more about debugging with breakpoints in DevTools, see Chrome DevTools from Google.
pnpm dev:debug.Ctrl + Shift + P. Shortcut for Mac Command + Shift + P.Now you can trace the execution of your server-side code in Visual Studio Code!
To avoid having to attach the Node process repeatedly, open the Command Palette and enter “Debug: Toggle Auto Attach.” Toggle the setting to Always and restart your local dev server in the Visual Studio Code terminal.
Tip