我目前正在使用XDebug使用VS Code调试PHP。
使用CLI运行代码时,代码可以正常工作。但是当使用localhost时,总是存在超时错误。
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"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
}
]
}
我可以弄清楚调试时的唯一区别是,像$ _SERVER这样的超全局变量是不同的,这对我来说很有意义。
我将标准配置用于vs代码:
SELECT release_year
FROM films
GROUP BY release_year
HAVING COUNT(title) > 200;