.

Fangrui Song 2018-09-28 09:15:06 -07:00
parent 2d77df0424
commit c6570d91cf

@ -24,7 +24,7 @@ sudo sysdig -As999 --unbuffered -p '%evt.type %proc.name %evt.buffer' "proc.exe
To debug individual LSP requests, you can attach your debugger after ccls has done indexing. However,
for many other issues, such as project file loading (`project.cc`) and C/C++ parsing and indexing `indexer.cc`, you need to set an early breakpoint to be able to trace the code.
It is recommended to use [[LanguageClient-neovim|Neovim]] for debugging (even if you use Emacs or VSCode) because it can be started with simple shell command.
It is recommended to use [[LanguageClient-neovim]] for debugging (even if you use Emacs or VSCode) because it can be started with simple shell command.
```vim
# vimrc
@ -32,7 +32,7 @@ nn ,al :LanguageClientStart<cr>
```
```zsh
rm -r /tmp/ccls && CQUERY_TRACEME=1 nvim a.cc +'normal ,al'
rm -r /tmp/ccls && CCLS_TRACEME=1 nvim a.cc +'normal ,al'
```
The Neovim buffer will hang there because `CCLS_TRACEME=1` causes the `ccls` process to SIGTSTP itself. In another shell, `gdb -p $(pgrep -fn debug/ccls)`