Home > Development Tools > VSCode > body text

What to do if vscode PHP cannot be debugged

藏色散人
Release: 2020-03-31 09:19:17
Original
8052 people have browsed it

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"
Copy after login

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
         }
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template