在Debian下调试Compton可参考以下方法:
ps -e | grep compton
确认是否运行,未运行则用compton &
启动。journalctl -u compton.service
查看系统日志。compton --log-level=debug > compton.log 2>&1 &
。--debug
参数:compton --debug
。COMPTON_DEBUG=1
并指定日志文件路径。strace
跟踪系统调用:sudo strace -p $(pgrep compton)
。gdb
进行断点调试:先安装gdb
,再运行sudo gdb -p $(pgrep compton)
。~/.config/compton.conf
,用compton --config /path/to/conf --check
验证语法。sudo apt update && sudo apt reinstall compton
。参考来源: