Search code examples
phpvisual-studio-codewampxdebugvscode-debugger

I configured everything, but VSCode debugger is not working, why?


VSCode debugger is not working. I installed everything, and my configuration is :

  • Windows 10 Pro
  • WampServer 3.2.9 (working well, with a green icon)
  • PHP 8.1.11 (I use this one, but I have other PHP versions installed on WampServer)
  • Apache 2.4.41
  • MariaDB 10.4.10
  • Xdebug 3.1.5

VSCode debugger was working well before I updated WampServer (from 3.2.0 to 3.2.9) and I added new updates regarding to that. I just followed the wamserver.aviatechno.net instructions, like updating PHP, Apache, MariaDB, MySQL.

So I followed some others communities instructions, for example go to the https://xdebug.org/wizard and use phpinfo() function to display all my local server configurations, then copy and paste it on Xdebug's wizard page, and then follow the instruction that given by Xdebug website response. But it didn't work.

I added xdebug_remote_enable = 1 and xdebug_autostart = 1 lines in php.ini file, and I updated the environment variable PATH to add the executable PHP path on Windows advanced system, but nothing happens.

So what can be the issue guys ?


Solution

  • I just checked this link [xdebug.org/docs/upgrade_guide], and I deleted xdebug_remote_enable=1 and zend_extension=xdebug lines that I added manually to php.ini files (of apache and php8), and I updated (added) a new code line at the end of those files, which is xdebug.mode=debug.