Debugging

Learn how to debug your integration.

If you are experiencing issues with your application, there are a few things you can do to diagnose the problem.

Croct's mascot winking
Need help?

If you have any questions, please contact us  for assistance or join our community  to get help from our team and other users.

Enable debug mode

The SDK logs everything that happens internally, which can be useful for detecting and diagnosing issues with your integration. Each log receives a severity level, so you can filter only those messages you need.

The severity levels and their respective meanings are:

  • Debug
    Step-by-step information useful for debugging.
  • Info
    Informational messages that provide additional context or details.
  • Warning
    Potential issues that might be problems or might not.
  • Error
    Abnormal or unexpected behaviors that need attention.

You can enable debug logging through an environment variable:

NEXT_PUBLIC_CROCT_DEBUG=true

After that, find the server-side logs in your terminal and the client-side logs in the browser console.

Check the network requests

Sometimes, the issue is caused by a network request failing, either because of a network issue or a misconfiguration.

You can check the network requests by opening the Developer Console in your browser and going to the Network tab. Issues with network requests will be highlighted in red.

Review common issues

Check the list of common issues to see if your problem is listed there.