-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wsl2+docker 环境 下remote模式,开启调试 显示错误 #118
Comments
自己琢磨一下:
希望作者完善文档吧,目前在docker下确实不知道怎么使用? |
加我微信: codinghuang |
If someone else gets here, I got this working by replacing the docker-entrypoint.sh#!/usr/bin/env sh
echo "yasd.remote_host=$(getent hosts host.docker.internal | awk '{print $1}')" >> "$PHP_INI_DIR/conf.d/99_overrides.ini"
php "$@" DockerfileFROM phpswoole/swoole:4.6-php7.4-alpine
RUN apk add boost-dev
RUN wget -c https://github.com/swoole/yasd/archive/refs/tags/v0.3.7.tar.gz -O - | tar -xz \
&& docker-php-source extract \
&& mv yasd-0.3.7 /usr/src/php/ext/yasd \
&& docker-php-ext-install yasd
RUN { \
echo "yasd.debug_mode=remote"; \
echo "yasd.remote_host=0.0.0.0"; \
echo "yasd.remote_port=9000"; \
} | tee "$PHP_INI_DIR/conf.d/99_overrides.ini"
ADD docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT [ "sh", "-c", "/docker-entrypoint.sh" ] docker-compose.ymlversion: '3.8'
services:
dev:
container_name: coroutine_context_api
tty: true
build: .
volumes:
- ./:/var/www
environment:
- PHP_IDE_CONFIG=serverName=CoroutineContextAPI The |
Yes, thank you! It's working |
环境 wsl2+docker
PHP 7.4.9 (cli) (built: Aug 6 2020 19:45:55) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Yasd v0.3.7, Our Copyright, by codinghuang
IDE: PHPSTORM
PHP ini 配置
[yasd]
yasd.debug_mode=remote
yasd.remote_host=host.docker.internal
yasd.remote_port=9000
进入目录执行调试
报了
Invalid address/ Address not supported: No error information
错误想请教一下,这个错误是指的是我哪个地方的地址配错了? 因为这个错误提示不是很明确,无法确定如何配置?
The text was updated successfully, but these errors were encountered: