gpt4 book ai didi

php - 如何在不使用 XAMPP 或 WAMP 服务器的情况下在 Visual Studio Code 上调试 PHP Laravel

转载 作者:行者123 更新时间:2023-12-04 00:03:20 25 4
gpt4 key购买 nike

我在 Laravel 5.7 中使用 PHP 7.3.1。

如何在不安装外部服务器的情况下逐步进行调试?
使用 Xdebug?

只需运行以下命令:

php artisan serve

然后我创建的所有解决方案都使用 WAMP。

最佳答案

根据您的 PHP 版本在 php.ini 文件中设置 xdebug 扩展。

在此处检查哪个版本的 xdebug 支持您的 PHP:https://xdebug.org/wizard.php

不要忘记更改您的 xdebug 扩展路径 zend_extension .

还将 xdebug 扩展添加到浏览器中。对于 mozila 点击 here.

[xdebug]
zend_extension = "C:\php\ext\php_xdebug-2.7.0-7.2-vc15.dll"
xdebug.remote_autostart = 1
;xdebug.profiler_append = 0
;xdebug.profiler_enable = 0
;xdebug.profiler_enable_trigger = 0
;xdebug.profiler_output_dir = "c:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
;xdebug.remote_handler = "dbgp"
;xdebug.remote_host = "127.0.0.1"
;xdebug.remote_log = "c:\xampp\tmp\xdebug.txt"
;xdebug.remote_port = 9000
;xdebug.trace_output_dir = "c:\xampp\tmp"
;36000 = 10h
;xdebug.remote_cookie_expire_time = 36000
;xdebug.trace_output_dir = "C:\xampp\tmp"

关于php - 如何在不使用 XAMPP 或 WAMP 服务器的情况下在 Visual Studio Code 上调试 PHP Laravel,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55379520/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com