Pairing and Debugging¶
Table of Contents
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) first.
Before connecting Monaca Debugger to your host PC, please pay attention to the following points:
- 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.
- Use the same Monaca account for both Monaca Debugger and the host PC.
- Disable the host PC’s firewall.
- Launch Monaca Debugger app on your device and sign in using your Monaca account information. Make sure you are using the same account information you are using with Monaca CLI.
- In the command window on your PC, navigate to your project folder and use monaca debug command to connect to your Monaca Debugger:
$ monaca debug
- Then, a popup message prompting you to pair Monaca Debugger with the host PC will appear. After this, your application should be running on the debugger.
- If your pairing is successful, your local project’s name will appear under Local Projects in Monaca Debugger. However, if you fail the pairing, please refer to Fail to Pair Monaca Debugger.
There are two ways to stop the pairing:
In the same command window on your PC which you are running monaca debug command, please use the following command to stop the pairing/break the debug process between your PC and Monaca Debugger:
ctrl + c
- click on the toggle menu on the top-left corner and go to Local Computers button.
- Then, the connected PC will be shown. Click on the “Information” icon of the connected PC (see the screenshot below).
- The information of the connected PC will be shown here. Click Unpair this computer button to disconnect from the selected PC. Once it is unpaired, you can’t debug your local Monaca projects with this debugger anymore unless you pair it again.