# Pairing and Debugging

In order to debug Monaca app with Monaca CLI, you need to pair your host PC (running Monaca CLI) with your device (running Monaca Debugger).

Before connecting Monaca Debugger to your host PC, please pay attention to the following points:

1. Monaca Debugger and the host PC have to connect to the same network

   connection (LAN or Wi-Fi). Some public networks do not allow

   connections between clients; therefore, pairing cannot be done in

   this case.
2. Use the same Monaca account for both Monaca Debugger and the host

   PC.
3. Disable the host PC's firewall.

## Start pairing

{% hint style="info" %}
On iOS 14 or later, you need to manually pair the Monaca Debugger the first time you launch it. For information on how to pair manually, see [Troubleshoot Pairing](/products_guide/debugger/troubleshooting.md).
{% endhint %}

1. Launch Monaca Debugger app on your device and sign in using your

   Monaca account information. Make sure you are using the same account

   information that you are using with the Monaca CLI.
2. In the command line window on your PC, navigate to your project folder and use the [monaca debug](/products_guide/monaca_cli/cli_commands.md#monaca-debug) command to connect to the Monaca Debugger:

```
$ monaca debug
```

3\. Then, a popup message prompting you to pair the Monaca Debugger with the host PC will appear. After this, your application should run on the debugger.

![](/files/-Mg3pCiaKe6eCwxYP01V)

4\. If your pairing is successful, your local project’s name will appear under Local Projects in the Monaca Debugger. However, if the pairing doesn't work, refer to [Fail to Pair Monaca Debugger](/products_guide/debugger/troubleshooting.md).

![](/files/-Mg3pEp9d1T0Rd6jqNPG)

## Stop pairing

There are two ways to stop the pairing:

### 1. From the PC

In the same command window on your PC which you are running the [monaca debug](/products_guide/monaca_cli/cli_commands.md#monaca-debug) command, please press `ctrl + C` to break the debug process between your PC and Monaca Debugger.

### 2. From Monaca Debugger

1. Open the toggle menu on the top-left corner and click **Local Computers**.
2. The connected PC will be shown. Click the:information\_source: icon of the connected PC (see the screenshot below).

![](/files/-Mg3piOa5pfMOqZ4Ecuj)

3\. The information of the connected PC will be shown. Click the **Unpair this computer** button to disconnect from the selected PC. Pair your device back to the PC if you want to debug your app again.

See Also:

* [Monaca CLI Tutorial](/products_guide/monaca_cli/tutorial.md)
* [Monaca CLI Overview](/products_guide/monaca_cli/overview.md)
* [Project Dependencies](/products_guide/monaca_cli/dependencies.md)
* [Monaca CLI Commands](/products_guide/monaca_cli/cli_commands.md)
* [Remote Building and Publishing](/products_guide/monaca_cli/build_publish.md)
* [Troubleshooting Guide](/products_guide/monaca_cli/troubleshooting.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/monaca_cli/pairing_debugging.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.
