【发布时间】:2018-07-05 17:26:21
【问题描述】:
我安装了 XAMPP。 我还在 Visual Studio Code 中安装了 PHP intelliSence 和 PHP 调试。 我在 .../php/ext/ 中设置了 php_xdebug.dll。
虽然我在我的 php 文件上设置了一些断点,但它不起作用...
你能告诉我如何在 vs 代码中调试 php 吗?
launch.json
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9010,
"pathMappings": {
"${C:/xampp/tdocs}": "${workspaceRoot}"
}
}
PHP.ini
[XDebug]
zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
xdebug.profiler_append = 0
xdebug.profiler_enable = 1
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_autostart = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "127.0.0.1"
xdebug.remote_port = 9010
xdebug.auto_trace = 1
xdebug.trace_output_dir = "C:\xampp\trace"
xdebug.idekey = "phpstorm"
【问题讨论】:
标签: php debugging visual-studio-code xampp xdebug