dongzexi5125 2019-02-26 11:46
浏览 406

Docker Compose - XDebug - VScode调试设置

I have a problem in debugging PHP with VSCode.

Dockerfile EXPOSE port 80

The page I want to debug is really simple:

home.php

<?php

$name = 'AAA';
echo $name; <--- here is the breakpoint

php.ini

xdebug.default_enable = 1
xdebug.remote_autostart = 1
xdebug.remote_connect_back = 1
xdebug.remote_enable = 1
xdebug.remote_port = 80
xdebug.idekey = VSCODE

launch.json (XDebug configuration)

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Listen for XDebug",
      "type": "php",
      "request": "launch",
      "port": 9000
    }
  ]
}

Debug console doesn't show any error, but it's not stopped at breakpoint once I load the home-page.

  • 写回答

1条回答 默认 最新

  • dph19153 2019-02-27 14:18
    关注

    Your remote_port directive is wrong.

    That is meant to be the port your debugger will be listening to. Typically, is 9000.

    You can leave it unset and that value will be used (which matches with the configuration you seem to be using on Visual Studio Code.

    评论

报告相同问题?

悬赏问题

  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题