Vscode cannot debug


After a day’s toss, the debug extension of vscode can finally run normally

It’s all dry

Open the PHP extension debugging tutorial according to the online vscode, but do not run the breakpoint according to the ideal state step by step. If you encounter this situation, you may encounter the same problem as me.

  1. First, check whether your port is consistent with the configuration
  2. Secondly, check whether your vscode extension is installed correctly

    The downloaded extension needs to match the following three elements of local PHP (which can be viewed through the phpinfo() function):

    1)PHP Version


    3)PHP Extension Build:TS?NTS?
  3. Is it completed according to the normal online process
  4. See if the configuration file is missing
    zend_extension = "D:\Work\XAMPP\php\ext\php_xdebug.dll"
    xdebug.remote_enable = 1
    xdebug.remote_autostart = 1

    Check whether your php.ini file Xdebug configuration file is missing. I am missing the last configuration. After adding it, restart the service and run perfectly

    If you have other problems, leave a message to me

This work adoptsCC agreement, reprint must indicate the author and the link to this article