From ea41776be15d3296dddbb138a00b3c43f1e8d0d0 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sun, 6 Oct 2019 19:03:54 -0700 Subject: [PATCH] Debugging --- Debugging.md | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Debugging.md b/Debugging.md index 81d7583..5c41208 100644 --- a/Debugging.md +++ b/Debugging.md @@ -24,6 +24,15 @@ You can find stderr output in: `*message*` buffer if `(setq lsp-log-io t)` * 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 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 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 ### Diagnose whether requests are handled correctly