在开发中,我在Windows 10下使用Xampp上的本地Drupal 7安装,我使用Visual作为IDE,并希望用它调试我的PHP代码。我试着把它设置好,但没能完全发挥作用。这是我的配置:
php.ini添加:
[XDebug]
zend_extension = "c:\xampp\php\ext\php_xdebug-2.9.6-7.3-vc15-x86_64.dll"
xdebug.remote_autostart = 1
xdebug.profiler_append = 0
xdebug.profiler_enable = 0
xdebug.profiler_enable_trigger = 1
xdebug.profiler_output_dir = "c:\xampp\tmp"
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"
xdebug.remote_cookie_expire_time = 36000VS代码启动配置:
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"runtimeExecutable": "c:\\xampp\\php\\php.exe",
"pathMappings": {
"c:\\xampp\\htdocs": "${workspaceFolder}"
},
"xdebugSettings": {
"show_hidden": 1
}
}
]
}然后在Chrome中打开我的Drupal站点,并在XDebug浏览器扩展中进行调试。这些突破不会作为“未绑定”而被停用,但是调试器也不会停止其中的任何一个。
我遗漏了什么?
发布于 2020-08-11 16:48:23
在VS代码启动配置中,我必须从以下内容更改pathMappings:
"c:\\xampp\\htdocs": "${workspaceFolder}"关于这一点:
"c:\\xampp\\htdocs\\sites\\all": "${workspaceFolder}"https://drupal.stackexchange.com/questions/295918
复制相似问题