首页 > 解决方案 > 如何设置 Xdebug 以远程调试 PHP Google App Engine 应用程序?

问题描述

我想使用 Xdebug 远程调试我的 PHP Google App Engine 应用程序。在 Visual Studio 中,我将 launch.json 设置为:

"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9090,
"pathMappings": {
  "/": "${workspaceRoot}/" // remote / local
  }

将本地 php.ini 设置为:

zend_extension="xdebug.so"
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_connect_back=1
xdebug.remote_port = 9090
xdebug.remote_log="/tmp/xdebug.log"

为 Chrome 扩展安装了 Xdebug 助手。

我在脚本中设置了一个断点并启动了调试。当我用浏览器访问脚本时,什么也没有发生。

标签: google-app-enginexdebug

解决方案


推荐阅读