For discussing the development and usage of Checkout UI extensions, post-purchase extensions, web pixels, Customer Accounts UI extensions, and POS UI extensions
Hi team,
We are implementing delivery customization - function, seems we don't know how/where to see the console or how to debug it? could you help us? thank you very much
Solved! Go to the solution
This is an accepted solution.
Hi there 👋
If you would like to have logging inside your Shopify Function in javascript you will need to use console.error("your message");
if (!targets.length) {
// You can use STDERR for debug logs in your function
console.error("No cart lines qualify for volume discount.");
return EMPTY_DISCOUNT;
}
To view the output you will view the extension runs inside your Shopify Partner Dashboard, they can be found Your App > Extensions > Your Function Name > See Details of a specific run of the function.
In the Logs (STDERR) section you should see your error logging.
You can review the documentation for more information on debugging.
To learn more visit the Shopify Help Center or the Community Blog.
This is an accepted solution.
do a
npm run build
npm run deploy
and now check , it should work!
This is an accepted solution.
Hi there 👋
If you would like to have logging inside your Shopify Function in javascript you will need to use console.error("your message");
if (!targets.length) {
// You can use STDERR for debug logs in your function
console.error("No cart lines qualify for volume discount.");
return EMPTY_DISCOUNT;
}
To view the output you will view the extension runs inside your Shopify Partner Dashboard, they can be found Your App > Extensions > Your Function Name > See Details of a specific run of the function.
In the Logs (STDERR) section you should see your error logging.
You can review the documentation for more information on debugging.
To learn more visit the Shopify Help Center or the Community Blog.
Thank you very much for the support
Hi @lizk could you tell me how to make the See Details button appear? (lots of error don't have this button) and how to log error with data variable like
Thank you very much.
Do you found solution with "See details" button?
I am still unable to see the logs in payment function. Refer to the screenshots attached.
This is an accepted solution.
do a
npm run build
npm run deploy
and now check , it should work!