> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codenullapp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Debugging

> There are three ways to debug your applications

There are three ways to debug your applications

* **Enabling debug mode** (Only for web applications)
* **Server Logs** (Web and Mobile)
* **Custom Logs** (Web and Mobile)

## Debug Mode

This option allows you to debug your application using the Browser console tool. To enable this go to the Settings panel and enable on Debug Mode checkbox

<img src="https://mintcdn.com/codenull/9RtgKoAtzvpYtN-c/images/SHzT8DzaUmbJEQnnJTI4.png?fit=max&auto=format&n=9RtgKoAtzvpYtN-c&q=85&s=078ccbbcbe62a8963397cbde460a5053" alt="" width="397" height="633" data-path="images/SHzT8DzaUmbJEQnnJTI4.png" />

Open the console dev tools in your browser and you will start to see the logs in the console

<figure>
  <img src="https://mintcdn.com/codenull/9RtgKoAtzvpYtN-c/images/QzHqgbOiloSPamTPCcn1.png?fit=max&auto=format&n=9RtgKoAtzvpYtN-c&q=85&s=0f49b8e5bf8d6b72cf3cf81beab8ec92" alt="" width="1161" height="200" data-path="images/QzHqgbOiloSPamTPCcn1.png" />

  <figcaption />
</figure>

## Server Logs

To enable this please contact us to enable this option. After this option is properly enabled you can go to the Settings panel and click on "View Logs"

<img src="https://mintcdn.com/codenull/fUND-Qmj85v5Oam-/images/xHI0alBMPjyAMLChMfZK.png?fit=max&auto=format&n=fUND-Qmj85v5Oam-&q=85&s=5912546b5fa13bd7ba1daed3caf6c28f" alt="" width="388" height="176" data-path="images/xHI0alBMPjyAMLChMfZK.png" />

You will start receiving logs from Azure

<figure>
  <img src="https://mintcdn.com/codenull/fUND-Qmj85v5Oam-/images/hInDq441ZLOP0IZ5R8CJ.png?fit=max&auto=format&n=fUND-Qmj85v5Oam-&q=85&s=bf5daf5798059ed9e47a7676434b21bd" alt="" width="3172" height="1682" data-path="images/hInDq441ZLOP0IZ5R8CJ.png" />

  <figcaption />
</figure>

## Custom Logs

<Info>
  This option is useful when you need to debug remotely (for instance from the server or a mobile client)
</Info>

<Warning>
  This option is only available in version 2.1.9 or greater
</Warning>

To see this option you need to go to the Settings panel and click on "View Logs" button

<img src="https://mintcdn.com/codenull/fUND-Qmj85v5Oam-/images/xHI0alBMPjyAMLChMfZK.png?fit=max&auto=format&n=fUND-Qmj85v5Oam-&q=85&s=5912546b5fa13bd7ba1daed3caf6c28f" alt="" width="388" height="176" data-path="images/xHI0alBMPjyAMLChMfZK.png" />

You will start receiving logs from custom logs

<figure>
  <img src="https://mintcdn.com/codenull/9RtgKoAtzvpYtN-c/images/Zp5A3eOrbz6fKLqsDIRh.png?fit=max&auto=format&n=9RtgKoAtzvpYtN-c&q=85&s=961e262038b5f78f8b06a13a2c4e51e1" alt="" width="1117" height="856" data-path="images/Zp5A3eOrbz6fKLqsDIRh.png" />

  <figcaption />
</figure>

### How to send custom logs

When you are writing your hooks or client rules you can use the `sendLog` function

#### Hooks

```javascript theme={null}
const sendLog = require("./utils/sendNotification").sendLog;

//You can send plain text
sendLog("My custom log message");

// or also objects
sendLog({ name: "John", lastName: "Doe"});
```

#### Client Rules (Mobile and Web)

```javascript theme={null}
//You can send plain text
helpers.sendLog("My custom log message");

// or also objects
helpers.sendLog({ name: "John", lastName: "Doe"});
```

## Graphql Logs

To see this option you need to go to the Settings panel and click on "View Logs" button

<img src="https://mintcdn.com/codenull/fUND-Qmj85v5Oam-/images/xHI0alBMPjyAMLChMfZK.png?fit=max&auto=format&n=fUND-Qmj85v5Oam-&q=85&s=5912546b5fa13bd7ba1daed3caf6c28f" alt="" width="388" height="176" data-path="images/xHI0alBMPjyAMLChMfZK.png" />

After you have activated the **debug mode** you can see every request of graphql (API) that is made in the application, it can be from the web application or mobile app, and everything will appear in the same window of the Custom Logs.

What will you see?&#x20;

* Query or mutation executed&#x20;
* Variables sent
* Respond data

<figure>
  <img src="https://mintcdn.com/codenull/9RtgKoAtzvpYtN-c/images/e7dMzI6YEFhNMtwTDtIm.png?fit=max&auto=format&n=9RtgKoAtzvpYtN-c&q=85&s=8247e8fe72f0edfa8c26db0f3fcad50a" alt="" width="1508" height="799" data-path="images/e7dMzI6YEFhNMtwTDtIm.png" />

  <figcaption />
</figure>
