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 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么