Skip to content

Instantly share code, notes, and snippets.

@huanghantao
Created January 16, 2020 06:37
Show Gist options
  • Save huanghantao/4f1640689b129449a75c3c921612249e to your computer and use it in GitHub Desktop.
Save huanghantao/4f1640689b129449a75c3c921612249e to your computer and use it in GitHub Desktop.
调试PHP代码以及Swoole源码
{
// 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": "debug swoole",
"type": "cppdbg",
"request": "launch",
"program": "/usr/bin/php",
"args": ["${file}"],
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "为 gdb 启用整齐打印",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "调试子进程",
"text": "-gdb-set follow-fork-mode child",
"ignoreFailures": true
}
]
},
{
"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
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment