• vscode+php+xdebug won't stop at breakpoint 断点不起作用


    not stopping on breakpoints

    breakpoint not working

    原因:

    1) php.ini xdebug 端口不配置的情况下,默认是 9000,如果vscode里面改为了其他端口,php.ini里面也要改为同样的端口。

    如:

      a) vscode launch.json

    "configurations": [
            {
                "name": "Listen for XDebug",
                "type": "php",
                "request": "launch",
                "port": 9179,
                "stopOnEntry":true,
                "log": true
            },
            {
                "name": "Launch currently open script",
                "type": "php",
                "request": "launch",
                "program": "${file}",
                "cwd": "${fileDirname}",
                "port": 9179,
                "stopOnEntry": false,
                "log":true
            }
    

     php.ini 需要这么设置

    [XDebug]
    xdebug.profiler_append = 0
    xdebug.profiler_enable = 1
    xdebug.profiler_enable_trigger = 0
    xdebug.profiler_output_dir ="D:BtSoftWebSoft	empxdebug"
    xdebug.trace_output_dir ="D:BtSoftWebSoft	empxdebug"
    xdebug.profiler_output_name = "cache.out.%t-%s"
    xdebug.remote_enable = 1
    xdebug.remote_handler = "dbgp"
    xdebug.remote_host = "127.0.0.1"
    xdebug.remote_autostart = 1
    xdebug.remote_autorestart=1
    xdebug.remote_connect_back=1
    xdebug.remote_port=9179
    xdebug.remote_log = "D:BtSoftWebSoft	empxdebugdebug.log"
    zend_extension=php_xdebug.dll
    

    否则断点不起作用

  • 相关阅读:
    FCC学习笔记(二)
    FCC学习笔记(一)
    jQuery(三)
    jQuery(二)
    jQuery(一)
    JavaScript(九)
    JavaScript(八)
    2-1回归算法
    14-章小结
    13-模型训练及测试
  • 原文地址:https://www.cnblogs.com/tyonly/p/vscode_xdebug_breakpoint_not_working.html
Copyright © 2020-2023  润新知