visual studio code PHP debugging not working

前端 未结 6 802
清歌不尽
清歌不尽 2021-02-02 13:04

I have installed VS Code and the PHP debugger.

I am using xampp.

I tried running the code (2) ways (listen and launch).

6条回答
  •  南笙
    南笙 (楼主)
    2021-02-02 13:24

    For anyone looking answer today, for me helped changing in php.ini section [XDebug] to this:

    xdebug.mode = debug
    xdebug.start_with_request = yes
    zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
    xdebug.stopOnEntry = true
    xdebug.profiler_enable = off
    xdebug.profiler_enable_trigger = Off
    xdebug.profiler_output_name = cachegrind.out.%t.%p
    xdebug.output_dir ="c:\xampp\tmp"
    xdebug.show_local_vars=0
    xdebug.remote_handler = "dbgp"
    xdebug.client_host = "127.0.0.1"
    xdebug.log = "C:\xampp\tmp\xdebug.txt"
    xdebug.client_port = 9000
    xdebug.remote_cookie_expire_time = 36000
    

    I used the settings from post of @Eluny, but with some newer version of the XDebug the properties names changed. On documentation page you can find info about changes

提交回复
热议问题