I have installed VS Code and the PHP debugger.
I am using xampp.
I tried running the code (2) ways (listen and launch).
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