How to print the value of input data when using shopify functions?

I am working on payment customization functions.

I want to see the input being for the payment Methods so that I could use logics to implement my function.

query RunInput {
  paymentMethods {
    id
    name
  }
}

How do check these print logs for my dev store that is in live production ?

There are no equivalent GraphQL admin/storefront APIs that might help me with this data.

I followed these docs:

Hi @hsharda

You cannot print logs or view console/debug output from Shopify Functions in production or on your live store. Shopify Functions (including payment customization functions) run in a secure, isolated environment where:

  • There is no access to stdout, stderr, or any logging mechanism.
  • You cannot use console.log, print!, or similar statements to output logs.
  • There is no way to view “print logs” from a live or production store.

How to debug your function:

  • Use local testing with the Shopify CLI (shopify app function run) to see output and errors.
  • Write unit tests for your function logic (see examples in the files you uploaded).
  • Use the Shopify CLI’s preview and test commands to simulate input and see the output.
  • If you need to inspect what input your function receives, add test cases with sample input JSON.

We have docs on testing and debugging Functions here: Test and debug Shopify Functions