douan9541 2019-02-22 06:08
浏览 98

Xdebug客户端不会遇到断点

I try to configure Xdebug Client for Sublime Text 3 on Windows 10 (with PHP Version 7.3.0 and 2.7.0RC2 Xdebug version).

I read issues for days because the panels context were always blank, but I solved it adding "super_globals": false in Xdebug.sublime-settings. Now the Xdebug Context show:

enter image description here

The problem is the breakpoint never hits. never show me the Steps options (into, over). Even, don't show the little yellow arrow on left side.

I believe that it's related to path_mapping configure, but this really confuse me. I dont understand why I need configure path_mapping if I work only on localhost on xampp.

php.ini:

[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug-2.7.0RC2-7.3-vc15.dll"
xdebug.remote_enable = 1
xdebug.remote_host = 127.0.0.1
xdebug.report_port = 9000
xdebug.remote_handler = dbgp
xdebug.remote_mode = req
xdebug.remote_connect_back = 0
xdebug.idekey = sublime.xdebug
xdebug.trace_output_dir = "C:\xampp\tmp"
xdebug.remote_log = "C:\xampp\php\tmp\xdebug.log"
  • 写回答

1条回答 默认 最新

  • duan6161 2019-02-22 10:14
    关注

    You might need to add xdebug.remote_autostart = 1. Per the XDebug documentation:

    xdebug.remote_autostart
    Type: boolean, Default value: 0
    Normally you need to use a specific HTTP GET/POST variable to start remote debugging (see Remote Debugging). When this setting is set to 1, Xdebug will always attempt to start a remote debugging session and try to connect to a client, even if the GET/POST/COOKIE variable was not present.

    See: XDEBUG EXTENSION FOR PHP | DOCUMENTATION

    Of course, restart your server after adding.

    EDIT: See also Derick's answer on this StackOverflow page about using a log file to troubleshoot, if the above doesn't work.

    评论

报告相同问题?

悬赏问题

  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站
  • ¥50 成都蓉城足球俱乐部小程序抢票
  • ¥15 yolov7训练自己的数据集
  • ¥15 esp8266与51单片机连接问题(标签-单片机|关键词-串口)(相关搜索:51单片机|单片机|测试代码)
  • ¥15 电力市场出清matlab yalmip kkt 双层优化问题
  • ¥30 ros小车路径规划实现不了,如何解决?(操作系统-ubuntu)