美文网首页
如何用root用户去使用Xcode的Debug

如何用root用户去使用Xcode的Debug

作者: JHx_ | 来源:发表于2019-03-20 17:38 被阅读0次

最近在学习unix网络编程,需要用到 RAW Socket,但是在xcode下直接debug会出现问题
如创建原始套接字:

int sockfd=Socket(sasend->sa_family, SOCK_RAW,IPPROTO_ICMP);

则会报一下错误

 Operation not permitted

解决方案为:


屏幕快照 2019-03-20 下午5.37.51.png

然后选择RUN中 DEBUG Process AS ROOT

相关文章

网友评论

      本文标题:如何用root用户去使用Xcode的Debug

      本文链接:https://www.haomeiwen.com/subject/udutvqtx.html