发现用着用着golang突然就不能debug了,然后思考也没有修改啥配置。后面发现是因为Switchhost的时候,切到有的host时,没有127.0.0.1 localhost 然后再 etc/hosts 文件里面添加 127.0.0.1 localhost 就好了