Xdebug not working in PHPStorm environment

I am trying to configure xdebug in the PHPStorm IDE and I followed the steps in one document

I followed this document: " http://www.mysolutions.it/phpstorm-server-xdebug-configuration/ ".

But I get one error: "Port 9000 is busy," and also, if I run debugging, it quits. I will share the configuration settings

Steps taken by me

In my Xdebug.ini

zend_extension="/usr/lib/php5/20090626/xdebug.so" xdebug.default_enable = 1 xdebug.idekey = "vagrant" xdebug.remote_enable = 1 xdebug.remote_autostart = 0 xdebug.remote_port = 9000 xdebug.remote_handler=dbgp xdebug.remote_log="/var/log/xdebug/xdebug.log" xdebug.remote_host="myip" 

In a PHP storm

 File->settings->PHPservers Host : Ip for the virtual machine(Ip added in the host file) Port:80 Debugger:Xdebugger 

I checked (Use PathMappings)

Within these project files (Absolute path on server: /var/www/myproj )

 File->settings->Deployment 

Connection:

Type: FTP FTP Host: my virtual computer ip-port: 80 Root path: /var/www

Mapping:

Local path: /Users/m1019238/dev/myproject/myproj

Server web path: /var/www/myproj

I will tell you something if I missed any settings that I made other than this. Also very sorry for my english.

+6
source share
3 answers

I just changed the port to "Build, execution, deployment" β†’ "Debugger" with something else like 9001, and returned it to 9000. This was strange because PhpStorm itself used the port.

+6
source

For anyone who may stumble upon this and do not want to delete the entire configuration, you can find the path to the PHPStorm configuration file here: https://intellij-support.jetbrains.com/hc/en-us/articles/206544519-Directories-used -by-the-IDE-to-store-settings-caches-plugins-and-logs

After you find the configuration folder, a text search for the port used should find a file that sets up PHP to automatically use the port (assuming phpstorm is an application listening on it).

For me on mac, it was in ~ / Library / Preferences / PhpStorm2017.1 / options / other.xml

 <application> <component name="BuiltInServerOptions" builtInServerPort="9000" builtInServerAvailableExternally="true" /> </application> 

The default built server is 9000. Changing this to something else committed. Please note that for my case, it turned out, I could also change the build, execution, deployment> debugger> Port option in the IDE itself.

+1
source

I just realized what my mistake was:

php-fpm listening on 9000, so make sure you don't have php-fpm , and if so, you have to choose between changing your php-fpm port or your xdebug.

0
source

Source: https://habr.com/ru/post/971052/


All Articles