In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
What this article shares with you is about how to debug vscode php. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
1. Vsc plug-in
Install PHP Debug
Plug-in PHP Extension Pack2. Not now-- skip the vs code setting
...
...
"php.validate.executablePath": "D:/BtSoft/WebSoft/php/7.1/php.exe"
}}
3. Configure xdebug
Many large software, {phproot} / ext/ already have xdebug.dll
1. Manual
Create a test.php, create a statement phpinfo ();, and paste the resulting information into the XDebug installation wizard page of the XDebug official website. This page will analyze your PHP environment.
Download XDebug.dll
Copy to {phproot} / ext/
two。 One button
One-click installation
Pagoda panel, in the setting of a certain version of php, install extended XDebug
-
In {phproot} / php.ini
[XDebug]
Zend_extension = "D:\ BtSoft\ WebSoft\ php\ 7.1\ ext\ php_xdebug-2.9.1-7.1-vc14-nts.dll"
Xdebug.auto_trace=on
Xdebug.collect_vars = on
Xdebug.collect_params=on
Xdebug.collect_return=on
Xdebug.remote_enable = on
Xdebug.remote_handler = dbgp
Xdebug.remote_host = localhost
# here is the vscode receiving port sent by xdebug to vscode (needed in vscode configuration). The default is 9000. If there is a conflict, it will be changed to another port.
Xdebug.remote_port = 9000
Xdebug.remote_autostart=on
# this is the configuration for xdebug debugging in phpstorm, not used in vscode
Xdebug.idekey = phpstorm
# xdebug3
[XDebug]
Zend_extension=
Xdebug.mode=debug
Xdebug.start_with_request=yes
Xdebug.client_port=9000
Turn off debug port 9000 firewall
Restart php
4. You must open your php project directory before you can set up debug
Click on the gear, select php-- "Select listen for xdebug"
.vscode\ launch.json
Port set to 9000
5. Start debugging at F5. Browsers access debuggable web pages
The above is how to debug vscode php. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.