# Configuring IDE

## Debug settings

Go to "**Settings**" - "**Preferences**" - "**PHP**" - "**Debug**"

Setup **xDebug**:

![xDebug setup PHP Storm](https://2923143221-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK9hhxZA8ODTjLfJ9l%2Fuploads%2FVVQMjshNNbt3xX4TlRTQ%2Fsdebug-Preferences.png?alt=media\&token=13c712e0-aca3-4ff6-9feb-c1c22d916855)

Setup **Advanced settings**

![](https://2923143221-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK9hhxZA8ODTjLfJ9l%2Fuploads%2F3qrhQfDjlyd2cqckaBEd%2Fadvanced-Preferences.png?alt=media\&token=224c1ecc-5284-4d89-863e-2ce00cdfce61)

Go to "**Settings**" - "**Preferences**" - "**PHP**" - "**Debug**" - "**DBGp Proxy**"&#x20;

![](https://2923143221-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK9hhxZA8ODTjLfJ9l%2Fuploads%2Fp0dXDxLWZuqNqkvWSeUu%2Fdbgp-Preferences.png?alt=media\&token=f8afedba-ef71-45ed-9e8b-dd79f4327841)

## Setup Deployment

1. Run "**Tools**" - "**Deployment**" - "**Browse Remote Hosts**" to open the panel "**Remote Host**"
2. Enable "**Tools**" - "**Deployment**" - "**Automatic Upload**"
3. Go to "**Tools**" - "**Deployment**" - "**Configuration...**"
4. Add new SFTP connection&#x20;
5. Setup mappings&#x20;

#### Main catalogs MikoPBX

* **`/usr/www`** - [Core](https://github.com/mikopbx/Core) files
* **`/storage/usbdisk1/mikopbx/custom_modules`** - directory for storing modules
* **`/storage/usbdisk1/mikopbx/custom_modules/ModulePhoneBook`** the [**PhoneBook**](https://github.com/mikopbx/ModulePhoneBook) module will be stored in this directory&#x20;

#### Example of mapping settings:

Let's say a local directory with Core: **`/Users/alexeyportnov/project/pbx_miko/!Core`**

Local directory with modules: **`/Users/alexeyportnov/project/pbx_miko/modules`**, &#x20;

Then the mapping settings will be as follows:

![PhpStorm Deploiment mappings](https://2923143221-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK9hhxZA8ODTjLfJ9l%2Fuploads%2FXyAkNOr9CVodXRrGDimZ%2FDeployment_%D0%B8__Core_%E2%80%93_PbxExtensionSetupBase_php___Core_.png?alt=media\&token=e1555aa0-8e63-48e9-b5f7-77ca3c4fd159)
