diff --git a/docs/en/community/developer-guide/be-vscode-dev.md b/docs/en/community/developer-guide/be-vscode-dev.md index f6875c6b99..9b036b7188 100644 --- a/docs/en/community/developer-guide/be-vscode-dev.md +++ b/docs/en/community/developer-guide/be-vscode-dev.md @@ -91,7 +91,7 @@ Note: This compilation has the following instructions: If nothing happens, the compilation should be successful, and the final deployment file will be output to the /home/workspace/doris/output/ directory. If you still encounter other problems, you can refer to the doris installation document http://doris.apache.org. -## Deployment and debugging +## Deployment and debugging(GDB) 1. Authorize be compilation result files @@ -280,3 +280,17 @@ An example of a complete launch.json is as follows: ![](/images/image-20210618091006146.png) +## Debugging(LLDB) + +lldb's attach mode is fast than gdb,and the usage is similar to gdb. we should install plugin `CodeLLDB`, then add config to launch: +```json +{ + "name": "CodeLLDB attach", + "type": "lldb", + "request": "attach", + "program": "${workspaceFolder}/output/be/lib/doris_be", + "pid":"${command:pickMyProcess}" +} +``` + +It should be noted that this method requires the system `glibc` version to be `2.18+`. you can refer [Get VSCode CodeLLDB plugin work on CentOS 7](https://gist.github.com/JaySon-Huang/63dcc6c011feb5bd6deb1ef0cf1a9b96) to make plugin work。 \ No newline at end of file diff --git a/docs/zh-CN/community/developer-guide/be-vscode-dev.md b/docs/zh-CN/community/developer-guide/be-vscode-dev.md index bd2134f5f1..ecebb2ea01 100644 --- a/docs/zh-CN/community/developer-guide/be-vscode-dev.md +++ b/docs/zh-CN/community/developer-guide/be-vscode-dev.md @@ -90,7 +90,7 @@ cd /home/workspace/doris 如果不出意外,应该会编译成功,最终的部署文件将产出到 /home/workspace/doris/output/ 目录下。如果还遇到其他问题,可以参照 doris 的安装文档 http://doris.apache.org。 -## 部署调试 +## 部署调试(GDB) 1. 给 be 编译结果文件授权 @@ -278,3 +278,17 @@ ps -ef | grep palo* 下面就可以开始你的 Doris DEBUG 之旅了 ![](/images/image-20210618091006146.png) + +## 调试(LLDB) + +lldb的attach比gdb更快,使用方式和gdb类似。vscode需要安装的插件改为`CodeLLDB`,然后在launch中加入如下配置: +```json +{ + "name": "CodeLLDB attach", + "type": "lldb", + "request": "attach", + "program": "${workspaceFolder}/output/be/lib/doris_be", + "pid":"${command:pickMyProcess}" +} +``` +需要注意的是,此方式要求系统`glibc`版本为`2.18+`。如果没有则可以参考 [如何使CodeLLDB在CentOS7下工作](https://gist.github.com/JaySon-Huang/63dcc6c011feb5bd6deb1ef0cf1a9b96) 安装高版本glibc并将其链接到插件。 \ No newline at end of file