1. 生成Makefile后,修改objs/Makefile 将-O改成-g3 2.修改nginx.conf,加上这两句daemon off;master_process off; 3. gdb nginx