Home  >  Article  >  Development Tools  >  What to do if vscode PHP cannot be debugged

What to do if vscode PHP cannot be debugged

藏色散人
藏色散人Original
2020-03-31 09:19:177983browse

What to do if vscode PHP cannot be debugged

vscode What should I do if PHP cannot be debugged? How to debug php with vscode

xdebug debugging vscode

Download xdebug.dll extension library

php.ini configuration

 [XDebug]
 xdebug.remote_enable = 1
 xdebug.remote_autostart = 1
 zend_extension="D:\phpstudy-2018\PHPTutorial\php\php-5.5.38\ext\php_xdebug.dll"

vscode Install the plug-in php debug, php xdebug

      add configuration:
           {
              "name": "Listen for XDebug",
              "type": "php",
              "request": "launch",
              "port": 9000
          },
          {
              "name": "Launch currently open script",
             "type": "php",
             "request": "launch",
             "program": "${file}",
           "cwd": "${fileDirname}",
             "port": 9000
         }

There are two options when debugging: select "Listen for XDebug" to mark yourself to open the browser and enter the URL -Enter breakpoint.

Select "Launch currently open script" to mark the current file for debugging.

Recommended learning: vscode tutorial

The above is the detailed content of What to do if vscode PHP cannot be debugged. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn