Debugging

Fangrui Song 2019-10-06 19:03:54 -07:00
parent 9e0a418cae
commit ea41776be1

@ -24,6 +24,15 @@ You can find stderr output in:
`*message*` buffer if `(setq lsp-log-io t)` `*message*` buffer if `(setq lsp-log-io t)`
* VSCode: TODO * VSCode: TODO
### Indexer issues
`export CCLS_CRASH_RECOVERY=0` disables clang crash recovery. In case of
clangIndex issues, you will not see `clang crashed` in the log file but get a
process crash. And if you attach a debugger before it crashes, you can get the
stack trace.
`gdb --args /path/to/ccls -index=/path/to/project`
### Dump LSP requests/responses ### Dump LSP requests/responses
On Linux: On Linux:
@ -73,13 +82,6 @@ Use `CCLS_TRACEME=s` to `raise(SIGSTOP)`, if `SIGTSTP` does not work.
resumes (with a `c` command) if you want ccls to continue running after resumes (with a `c` command) if you want ccls to continue running after
detaching. detaching.
### Indexer issues
`export CCLS_CRASH_RECOVERY=0` disables clang crash recovery. In case of
clangIndex issues, you will not see `clang crashed` in the log file but get a
process crash. And if you attach a debugger before it crashes, you can get the
stack trace.
## Developing ## Developing
### Diagnose whether requests are handled correctly ### Diagnose whether requests are handled correctly