{"id":49108,"date":"2024-12-02T12:16:13","date_gmt":"2024-12-02T04:16:13","guid":{"rendered":"https:\/\/fwq.ai\/blog\/49108\/"},"modified":"2024-12-02T12:16:13","modified_gmt":"2024-12-02T04:16:13","slug":"%e6%b2%a1%e6%9c%89%e5%9b%ba%e5%ae%9a-ip-%e5%a6%82%e4%bd%95%e5%9c%a8-phpstorm-%e4%b8%ad%e8%bf%9b%e8%a1%8c-nginx-xdebug-%e8%bf%9c%e7%a8%8b%e8%b0%83%e8%af%95%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/49108\/","title":{"rendered":"\u6ca1\u6709\u56fa\u5b9a IP \u5982\u4f55\u5728 PhpStorm \u4e2d\u8fdb\u884c Nginx xdebug \u8fdc\u7a0b\u8c03\u8bd5\uff1f"},"content":{"rendered":"<p><b><\/b> <\/p>\n<h1>\u6ca1\u6709\u56fa\u5b9a IP \u5982\u4f55\u5728 PhpStorm \u4e2d\u8fdb\u884c Nginx xdebug \u8fdc\u7a0b\u8c03\u8bd5\uff1f<\/h1>\n<p>IT\u884c\u4e1a\u76f8\u5bf9\u4e8e\u4e00\u822c\u4f20\u7edf\u884c\u4e1a\uff0c\u53d1\u5c55\u66f4\u65b0\u901f\u5ea6\u66f4\u5feb\uff0c\u4e00\u65e6\u505c\u6b62\u4e86\u5b66\u4e60\uff0c\u5f88\u5feb\u5c31\u4f1a\u88ab\u884c\u4e1a\u6240\u6dd8\u6c70\u3002\u6240\u4ee5\u6211\u4eec\u9700\u8981\u8e0f\u8e0f\u5b9e\u5b9e\u7684\u4e0d\u65ad\u5b66\u4e60\uff0c\u7cbe\u8fdb\u81ea\u5df1\u7684\u6280\u672f\uff0c\u5c24\u5176\u662f\u521d\u5b66\u8005\u3002\u4eca\u5929\u7c73\u4e91\u7ed9\u5927\u5bb6\u6574\u7406\u4e86\u300a\u6ca1\u6709\u56fa\u5b9a IP \u5982\u4f55\u5728 PhpStorm \u4e2d\u8fdb\u884c Nginx xdebug \u8fdc\u7a0b\u8c03\u8bd5\uff1f\u300b\uff0c\u804a\u804a\uff0c\u6211\u4eec\u4e00\u8d77\u6765\u770b\u770b\u5427\uff01<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241110\/173120584667301ad61ec81.jpg\" class=\"aligncenter\" title=\"\u6ca1\u6709\u56fa\u5b9a IP \u5982\u4f55\u5728 PhpStorm \u4e2d\u8fdb\u884c Nginx xdebug \u8fdc\u7a0b\u8c03\u8bd5\uff1f\u63d2\u56fe\" alt=\"\u6ca1\u6709\u56fa\u5b9a IP \u5982\u4f55\u5728 PhpStorm \u4e2d\u8fdb\u884c Nginx xdebug \u8fdc\u7a0b\u8c03\u8bd5\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5728\u6ca1\u6709\u56fa\u5b9a ip \u7684\u60c5\u51b5\u4e0b\uff0c\u5982\u4f55\u5728 phpstorm \u4e2d\u8fdb\u884c nginx xdebug \u8fdc\u7a0b\u8c03\u8bd5<\/strong><\/p>\n<p>\u5728\u5916\u7f51 nginx \u670d\u52a1\u5668\u548c phpstorm \u5f00\u53d1\u73af\u5883\u5206\u522b\u4f4d\u4e8e\u4e0d\u540c\u7f51\u7edc\u7684\u60c5\u51b5\u4e0b\uff0c\u8fdb\u884c\u8fdc\u7a0b\u8c03\u8bd5\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u56f0\u96be\u3002\u5982\u679c\u6ca1\u6709\u56fa\u5b9a ip\uff0c\u6211\u4eec\u65e0\u6cd5\u5728\u8def\u7531\u5668\u4e0a\u8fdb\u884c\u7aef\u53e3\u6620\u5c04\u4ee5\u5c06\u8c03\u8bd5\u4fe1\u606f\u8fd4\u56de\u5230\u672c\u5730\u673a\u5668\u3002<\/p>\n<p>\u4e00\u79cd\u89e3\u51b3\u65b9\u6848\u662f\u4f7f\u7528 gbdpproxy\u3002gbdpproxy \u662f\u4e00\u4e2a\u57fa\u4e8e gearman \u7684\u8c03\u8bd5\u4ee3\u7406\uff0c\u53ef\u4ee5\u5728\u6ca1\u6709\u56fa\u5b9a ip \u7684\u60c5\u51b5\u4e0b\uff0c\u5728\u4e0d\u540c\u7684\u7f51\u7edc\u4e4b\u95f4\u8fdb\u884c\u8c03\u8bd5\u3002<\/p>\n<p>\u9996\u5148\uff0c\u5728 nginx \u670d\u52a1\u5668\u4e0a\u5b89\u88c5 gbdpproxy\uff0c\u5e76\u914d\u7f6e php-fpm \u76d1\u542c gbdpproxy \u76d1\u542c\u7684\u7aef\u53e3\u3002\u7136\u540e\uff0c\u5728 phpstorm \u4e2d\u914d\u7f6e xdebug \u4f7f\u7528 gbdpproxy \u4f5c\u4e3a\u8c03\u8bd5\u4ee3\u7406\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u914d\u7f6e gbdpproxy \u7684\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\n<p>\u5728 nginx \u670d\u52a1\u5668\u4e0a\u5b89\u88c5 gbdpproxy\uff1a<\/p>\n<pre>apt-get install gbdpproxy<\/pre>\n<\/li>\n<li>\n<p>\u7f16\u8f91 gbdpproxy \u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<pre>\/etc\/gbdpproxy.conf<\/pre>\n<p>\u5e76\u5c06\u4ee5\u4e0b\u884c\u6dfb\u52a0\u5230\u6587\u4ef6\u672b\u5c3e\uff1a<\/p>\n<pre>listen = 127.0.0.1:9000<\/pre>\n<\/li>\n<li>\n<p>\u91cd\u542f gbdpproxy\uff1a<\/p>\n<pre>service gbdpproxy restart<\/pre>\n<\/li>\n<\/ol>\n<p>\u7136\u540e\uff0c\u5728 phpstorm \u4e2d\u914d\u7f6e xdebug \u4f7f\u7528 gbdpproxy\uff1a<\/p>\n<ol>\n<li>\u6253\u5f00 <strong>phpstorm | preferences | languages &amp; frameworks | php | debug<\/strong>\u3002<\/li>\n<li>\u5728 <strong>debugger<\/strong> \u90e8\u5206\uff0c\u9009\u62e9 <strong>xdebug<\/strong>\u3002<\/li>\n<li>\n<p>\u5728 <strong>xdebug<\/strong> \u90e8\u5206\uff0c\u9009\u4e2d\u4ee5\u4e0b\u9009\u9879\uff1a<\/p>\n<ul>\n<li><strong>use path mapping<\/strong><\/li>\n<li><strong>ide key<\/strong>\uff1a\u8f93\u5165\u4e00\u4e2a\u552f\u4e00\u7684\u5bc6\u94a5\uff08\u4f8b\u5982\uff0c\u201cmy-debug-key\u201d\uff09\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u5728 <strong>remote<\/strong> \u90e8\u5206\uff0c\u8f93\u5165\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<ul>\n<li><strong>host<\/strong>\uff1anginx \u670d\u52a1\u5668\u7684 ip \u5730\u5740\u6216\u57df\u540d<\/li>\n<li><strong>port<\/strong>\uff1agbdpproxy \u76d1\u542c\u7684\u7aef\u53e3\uff08\u4f8b\u5982\uff0c9000\uff09<\/li>\n<li><strong>ide key<\/strong>\uff1a\u4e0e phpstorm \u4e2d\u914d\u7f6e\u7684\u5bc6\u94a5\u76f8\u540c<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>\u914d\u7f6e\u5b8c\u6210\u540e\uff0c\u5c31\u53ef\u4ee5\u5728 phpstorm \u4e2d\u5f00\u59cb\u8fdb\u884c\u8fdc\u7a0b\u8c03\u8bd5\u4e86\u3002<\/p>\n<p>\u597d\u4e86\uff0c\u672c\u6587\u5230\u6b64\u7ed3\u675f\uff0c\u5e26\u5927\u5bb6\u4e86\u89e3\u4e86\u300a\u6ca1\u6709\u56fa\u5b9a IP \u5982\u4f55\u5728 PhpStorm \u4e2d\u8fdb\u884c Nginx xdebug \u8fdc\u7a0b\u8c03\u8bd5\uff1f\u300b\uff0c\u5e0c\u671b\u672c\u6587\u5bf9\u4f60\u6709\u6240\u5e2e\u52a9\uff01\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\uff0c\u7ed9\u5927\u5bb6\u5206\u4eab\u66f4\u591a\u6587\u7ae0\u77e5\u8bc6\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6ca1\u6709\u56fa\u5b9a IP \u5982\u4f55\u5728 PhpStorm \u4e2d\u8fdb\u884c Nginx xdebug \u8fdc\u7a0b\u8c03\u8bd5\uff1f IT\u884c\u4e1a\u76f8\u5bf9\u4e8e\u4e00\u822c\u4f20\u7edf\u884c\u4e1a\uff0c\u53d1\u5c55\u66f4\u65b0\u901f\u5ea6\u66f4\u5feb\uff0c\u4e00\u65e6\u505c\u6b62\u4e86\u5b66\u4e60\uff0c\u5f88\u5feb\u5c31\u4f1a\u88ab\u884c\u4e1a\u6240\u6dd8\u6c70\u3002\u6240\u4ee5\u6211\u4eec\u9700\u8981\u8e0f\u8e0f\u5b9e\u5b9e\u7684\u4e0d\u65ad\u5b66\u4e60\uff0c\u7cbe\u8fdb\u81ea\u5df1\u7684\u6280\u672f\uff0c\u5c24\u5176\u662f\u521d\u5b66\u8005\u3002\u4eca\u5929\u7c73\u4e91\u7ed9\u5927\u5bb6\u6574\u7406\u4e86\u300a\u6ca1\u6709\u56fa\u5b9a IP \u5982\u4f55\u5728 PhpStorm \u4e2d\u8fdb\u884c Nginx xdebug \u8fdc\u7a0b\u8c03\u8bd5\uff1f\u300b\uff0c\u804a\u804a\uff0c\u6211\u4eec\u4e00\u8d77\u6765\u770b\u770b\u5427\uff01 \u5728\u6ca1\u6709\u56fa\u5b9a ip \u7684\u60c5\u51b5\u4e0b\uff0c\u5982\u4f55\u5728 phpstorm \u4e2d\u8fdb\u884c nginx xdebug \u8fdc\u7a0b\u8c03\u8bd5 \u5728\u5916\u7f51 nginx \u670d\u52a1\u5668\u548c phpstorm \u5f00\u53d1\u73af\u5883\u5206\u522b\u4f4d\u4e8e\u4e0d\u540c\u7f51\u7edc\u7684\u60c5\u51b5\u4e0b\uff0c\u8fdb\u884c\u8fdc\u7a0b\u8c03\u8bd5\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u56f0\u96be\u3002\u5982\u679c\u6ca1\u6709\u56fa\u5b9a ip\uff0c\u6211\u4eec\u65e0\u6cd5\u5728\u8def\u7531\u5668\u4e0a\u8fdb\u884c\u7aef\u53e3\u6620\u5c04\u4ee5\u5c06\u8c03\u8bd5\u4fe1\u606f\u8fd4\u56de\u5230\u672c\u5730\u673a\u5668\u3002 \u4e00\u79cd\u89e3\u51b3\u65b9\u6848\u662f\u4f7f\u7528 gbdpproxy\u3002gbdpproxy \u662f\u4e00\u4e2a\u57fa\u4e8e gearman \u7684\u8c03\u8bd5\u4ee3\u7406\uff0c\u53ef\u4ee5\u5728\u6ca1\u6709\u56fa\u5b9a ip \u7684\u60c5\u51b5\u4e0b\uff0c\u5728\u4e0d\u540c\u7684\u7f51\u7edc\u4e4b\u95f4\u8fdb\u884c\u8c03\u8bd5\u3002 \u9996\u5148\uff0c\u5728 nginx \u670d\u52a1\u5668\u4e0a\u5b89\u88c5 gbdpproxy\uff0c\u5e76\u914d\u7f6e php-fpm \u76d1\u542c gbdpproxy \u76d1\u542c\u7684\u7aef\u53e3\u3002\u7136\u540e\uff0c\u5728 phpstorm \u4e2d\u914d\u7f6e xdebug \u4f7f\u7528 gbdpproxy \u4f5c\u4e3a\u8c03\u8bd5\u4ee3\u7406\u3002 \u4ee5\u4e0b\u662f\u914d\u7f6e gbdpproxy \u7684\u6b65\u9aa4\uff1a \u5728 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-49108","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/49108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=49108"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/49108\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=49108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=49108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=49108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}