Skip to content

Instantly share code, notes, and snippets.

@hteen
Created June 8, 2018 08:33
Show Gist options
  • Select an option

  • Save hteen/d184129123cce7fa9f69a26aafe0e4e6 to your computer and use it in GitHub Desktop.

Select an option

Save hteen/d184129123cce7fa9f69a26aafe0e4e6 to your computer and use it in GitHub Desktop.
VScode使用docker配置xdebug, 并用frp做端口转发

VScode使用docker配置xdebug, 并用frp做端口转发

记录关键配置项

# 增加端口映射
[range:xdebug]
type = tcp
local_ip = 127.0.0.1
local_port = 9001
remote_port = 9001
{
"version": "0.2.0",
"configurations": [
{
"name": "XDebug",
"type": "php",
"request": "launch",
"pathMappings": {
"/data/www/zhapp/hushua": "${workspaceRoot}"
},
"port": 9001,
"log": true
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9001
}
]
}
[xdebug]
xdebug.remote_enable = 1
xdebug.remote_connect_back = 0
xdebug.remote_autostart = 1
# frp服务器IP, 用域名也可以
xdebug.remote_host = tunnel.frp.com
xdebug.remote_port = 9001
xdebug.remote_log = /tmp/xdebug.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment