# Troubleshooting Guide

This page describes some of the most common problems with the Monaca Debugger and how to solve them.

## Failure to pair the Monaca Debugger

### Monaca Debugger can see the host PC but fails to pair

This is most likely a firewall problem in the host PC. The host PC needs to accept the TCP connection from the debugger. On default, the port `8001` will be used, but you can change the server port in the [preferences dialog](/products_guide/monaca_localkit/overview.md#preferences-dialog). Please change the port or configure your firewall settings and then try again.

### Monaca Debugger does not detect the host PC

Check that your device and the host PC are connected to the same network. If they are connected to the same network but Monaca Debugger still can't detect the host PC, please do a manual pairing:

1. From the Monaca Debugger, open the toggle menu on the top-left corner and select `Local Computers`.

![](/files/-Mg8K_GnDy0XoM3urEuh)

2\. Click the **Pair To New Computers** button.

3\. Input the [IP address of the host PC and port number](/products_guide/debugger/troubleshooting.md#ip-address-and-port-number). Then, click **Pair**.

![](https://docs.monaca.io/images/debugger/manual/troubleshooting/2.png)

4\. Once the pairing is successfully completed, the host PC should appear under `Paired computers` as shown below:

![](https://docs.monaca.io/images/debugger/manual/troubleshooting/3.png)

{% hint style="info" %}
Some Wi-Fi access points (usually that is available for public access) don’t allow the connected clients to communicate with each other. In this case, please try pairing on another local network.
{% endhint %}

#### **IP address and port number**

IP address and port number are needed to establish the communication path between the Monaca Debugger and the host PC. IP address represents the host PC and port number (set to `8001` by default) represents the Monaca local development tool (Monaca CLI, Localkit or Monaca for Visual Studio). Please note that the communication can't be established if the port number you use is not open or it's already used.

{% hint style="info" %}
If you are using more than one of Monaca local development tool at the same time on the same host PC, you are required to use a different port for each tool.
{% endhint %}

| OS                                      | Mac                                                                                              | Windows                                                                                  |
| --------------------------------------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------- |
| **Finding the IP Address**              | <p></p><ol><li>Open Terminal window.</li><li>Type <code>ifconfig</code>.</li></ol>               | <p></p><ol><li>Open Command Prompt window.</li><li>Type <code>ipconfig</code>.</li></ol> |
| **Check if a port number is available** | <p></p><ol><li>Open a terminal window.</li><li>Run <code>lsof -i :PORT\_NUMBER</code>.</li></ol> | <p></p><ol><li>Open a command prompt window.</li><li>Run <code>netstat</code>.</li></ol> |

### Pairing fails on Android 9+.

When using a custom build debugger on Android 9 or later, you need to add the Android namespace to the `widget` tag and `usesCleartextTraffic="true"` to the `application` tag in the `config.xml` file.

Create a custom build debugger after adding the settings to the `config.xml` file.

{% hint style="info" %}
If you are using an Android custom build debugger v9.0.1 or later, these settings are not required.
{% endhint %}

```markup
<widget xmlns:android="http://schemas.android.com/apk/res/android">

<platform name="android">
  <edit-config file="AndroidManifest.xml" target="/manifest/application" mode="merge">
    <application android:usesCleartextTraffic="true" />
  </edit-config>
</platform>
```

See Also:

* [Installation](/products_guide/debugger/installation.md)
* [Usage](/products_guide/debugger/debug.md)
* [Functionalities](/products_guide/debugger/features.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://en.docs.monaca.io/products_guide/debugger/troubleshooting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
