Debugging: add strace tip for shell script wrapper

Fangrui Song 2020-07-03 22:03:30 -07:00
parent fe5b7506b3
commit ee1c46e44c

@ -45,6 +45,13 @@ sudo sysdig -As999 --unbuffered -p '%evt.type %proc.name %evt.buffer' "proc.exe
strace -s999 -e read,write -fp $(pgrep -fn ccls) strace -s999 -e read,write -fp $(pgrep -fn ccls)
``` ```
To intercept early requests/responses, you can use a [shell script wrapper](Install#shell-script-wrapper)
```sh
#!/bin/sh
exec strace -s999 -e read,write -o /tmp/strace.log -f path/to/ccls "$@"
```
### Stopping at the start to debug early issues ### Stopping at the start to debug early issues
To debug individual LSP requests, you can attach your debugger after ccls has To debug individual LSP requests, you can attach your debugger after ccls has