Comments (9)
You shouldn't have any issues connecting phpStorm to xdebug: all you need to do is expose port 9000 in your docker-compose.yml
file under the ports section 9000:9000
Haven't tested it but should work.
from homestead-docker.
Is it okay if i post pictures of all my settings so you can review those and maybe see what im doing wrong in order to get the debug working or do you what them on email and the we can post the solution here for others to see?
from homestead-docker.
I don't use PhpStorm, but, I'll do my best.
from homestead-docker.
great,
expose: - "9000" ports: - "8080:80" # web - "2222:22" # ssh - "9000:9000" # xDebug - "35729:35729" # live reload - "9876:9876" # karma server
gives me: ERROR: for web Cannot start service web: driver failed programming external connectivity on endpoint dc_web_1 (6120a4d737b94d575a2c97d08bfb296bfb9fb81e4695393820ddee75ad24f833): Error starting userland proxy: Bind for 0.0.0.0:9000 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.
from homestead-docker.
No errors now bu still no debug triggering in phpStorm:
In provision.sh
# Enable Remote xdebug echo "xdebug.idekey = PHPSTORM" >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini echo "xdebug.default_enable = 0" >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini echo "xdebug.remote_enable = 1" >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini echo "xdebug.remote_port = 9000" >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini echo "xdebug.remote_autostart = 0" >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini echo "xdebug.remote_connect_back = 1" >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini echo "xdebug.profiler_enable = 0" >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini echo "xdebug.remote_host = 10.254.254.254" >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini
in docker-compose.yml
expose: - "9000" ports: - "8080:80" # web - "2222:22" # ssh - "35729:35729" # live reload - "9876:9876" # karma server environment: PHP_XDEBUG_ENABLED: 1 # Set 1 to enable.
Web server debug validation looks fine in phpstorm
from homestead-docker.
I get this in Kitematic when startin web container, is this ok?
/usr/lib/python2.7/dist-packages/supervisor/options.py:297: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security. 'Supervisord is running as root and it is searching ' 2016-09-23 16:04:19,809 CRIT Supervisor running as root (no user in config file) 2016-09-23 16:04:19,809 WARN Included extra file "/etc/supervisor/conf.d/supervisor.conf" during parsing 2016-09-23 16:04:19,825 INFO RPC interface 'supervisor' initialized 2016-09-23 16:04:19,825 CRIT Server 'unix_http_server' running without any HTTP authentication checking 2016-09-23 16:04:19,825 INFO supervisord started with pid 1 2016-09-23 16:04:20,830 INFO spawned: 'nginx' with pid 8 2016-09-23 16:04:20,831 INFO spawned: 'sshd' with pid 9 2016-09-23 16:04:20,833 INFO spawned: 'php-fpm7.0' with pid 10 2016-09-23 16:04:20,835 INFO spawned: 'redis' with pid 11 2016-09-23 16:04:20,837 INFO spawned: 'beanstalkd' with pid 12 2016-09-23 16:04:21,972 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2016-09-23 16:04:21,973 INFO success: sshd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2016-09-23 16:04:21,973 INFO success: php-fpm7.0 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2016-09-23 16:04:21,973 INFO success: redis entered RUNNING state, process has stayed up for > than 1 seconds (startsecs) 2016-09-23 16:04:21,973 INFO success: beanstalkd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
from homestead-docker.
I cant figure out why the Crome Debug add on won't trigger debugging in phpstorm.
Maybe someone else is using phpstorm and can explain to me :)
from homestead-docker.
FINALLY :)
This is how i solved this:
n provision.sh
# Enable Remote xdebug echo "xdebug.idekey = PHPSTORM" >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini echo "xdebug.default_enable = 0" >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini echo "xdebug.remote_enable = 1" >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini echo "xdebug.remote_autostart = 0" >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini echo "xdebug.remote_connect_back = 0" >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini echo "xdebug.profiler_enable = 0" >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini echo "xdebug.remote_host = 10.254.254.254" >> /etc/php/7.0/fpm/conf.d/20-xdebug.ini
in docker-compose.yml
expose: - "9000" ports: - "8080:80" # web - "2222:22" # ssh - "35729:35729" # live reload - "9876:9876" # karma server environment: PHP_XDEBUG_ENABLED: 1 # Set 1 to enable. XDEBUG_CONFIG: remote_host=10.254.254.254
The IP i used everywhere is for my local mac, the one with phpStorm installed on. The IP is not 10.254.254.254 but since the IP could change i made an alias that points to 127.0.0.1.
For some reason i didn't work with 127.0.0.1, i guess Docker container sees it at it self?
Anyway, to create the alias i did:
sudo ifconfig en0 alias 10.254.254.254 255.255.255.0
in phpStorm i used all default settings but added this:
from homestead-docker.
Excellent !
I knew it had something to do with the IP address.
from homestead-docker.
Related Issues (20)
- Is is possible to change the PHP version? HOT 1
- 413 Request Entity Too Large HOT 2
- How to connect MySQL WorkBench HOT 9
- Slow Mysql HOT 1
- SOAP missing HOT 1
- MongoDB HOT 1
- cant run serve.sh: permission denied HOT 2
- phpmyadmin HOT 2
- PHP 7.2 like in latest Homestead? HOT 1
- HTTPS for homestead HOT 1
- can you give me some example? HOT 1
- How to connect on mysql? HOT 2
- Upgrade PHP 7.2 HOT 2
- Nginx Sites-enabled problem HOT 2
- How to add Xdebug?
- homestead:php7.1 is running php 7.3.3 HOT 3
- Can`t connect to server : the connection was reset HOT 1
- Ubuntu 18.04 is there a plan to update? HOT 1
- Hello! HOT 3
- How to connect to database? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homestead-docker.