[英]Xdebug PHP 7.1 PhpStorm remote server with Docker. How?
Local:
- OS: MacOS
- IDE: PhpStorm
- Debug Port: 10000
- DBGp Proxy Host: 127.0.0.1
- DBGp Proxy Port: 10000
Remote server:
- OS: Ubuntu
- Run project via docker and expose 10000 port
Docker container:
- XDEBUG_CONFIG: "default_enable=1 remote_host=172.30.0.1 remote_enable=1 profiler_enable_trigger=0 remote_port=10000"
Xdebug 不起作用:(
X調試日志:
Log opened at 2018-11-27 09:05:03
I: Connecting to configured address/port: 172.30.0.1:10000.
W: Creating socket for '172.30.0.1:10000', poll success, but error: Operation now in progress (29).
E: Could not connect to client. :-(
Log closed at 2018-11-27 09:05:03
我想連接到遠程服務器進行調試。 我對創建端口轉發到 docker 容器不感興趣。
我究竟做錯了什么?
我嘗試將 xdebug 與從遠程 docker 托管的服務器到本地計算機的 ssh 隧道端口轉發一起使用,但沒有成功。
但它使用ngrok 工作。 你應該:
ngrok
;ngrok tcp 9000
;ngrok
的信息設置xdebug.remote_port
和xdebug.remote_host
。如果不知何故知道如何通過 ssh 隧道做同樣的事情,請分享它。
9000 - 它的 xdebug 客戶端的端口,9000 - PHP Storm 中的默認值,對於這個主題應該是 10000。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.