{"id":21420,"date":"2024-11-19T17:57:34","date_gmt":"2024-11-19T09:57:34","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21420\/"},"modified":"2024-11-19T17:57:34","modified_gmt":"2024-11-19T09:57:34","slug":"vscode%e8%be%93%e5%87%ba%e4%b9%b1%e7%a0%81%e6%80%8e%e4%b9%88%e8%a7%a3%e5%86%b3","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21420\/","title":{"rendered":"vscode\u8f93\u51fa\u4e71\u7801\u600e\u4e48\u89e3\u51b3"},"content":{"rendered":"<blockquote><p>\n  \u5f53\u5728 vs code \u4e2d\u9047\u5230\u8f93\u51fa\u4e71\u7801\u95ee\u9898\u65f6\uff0c\u53ef\u4ee5\u91c7\u53d6\u4ee5\u4e0b\u6b65\u9aa4\u89e3\u51b3\uff1a\u8bbe\u7f6e\u5b57\u7b26\u96c6\u7f16\u7801\u4e3a &#8220;utf8&#8221; \u6216 &#8220;gbk&#8221;\u3002\u66f4\u6539\u7ec8\u7aef\u4eff\u771f\u5668\u4e3a &#8220;powershell.exe&#8221; \u6216 &#8220;cmd.exe&#8221;\u3002\u68c0\u67e5\u7cfb\u7edf\u8bed\u8a00\u8bbe\u7f6e\u4e0e\u6587\u4ef6\u7f16\u7801\u5339\u914d\u3002\u66f4\u65b0 vs code\u3002\u7981\u7528\u4e0d\u5fc5\u8981\u7684\u6269\u5c55\u3002\u91cd\u7f6e vs code \u8bbe\u7f6e\uff08\u4f1a\u6e05\u9664\u6240\u6709\u81ea\u5b9a\u4e49\u8bbe\u7f6e\uff09\u3002\u4f7f\u7528\u5176\u4ed6\u4ee3\u7801\u7f16\u8f91\u5668\u786e\u8ba4\u95ee\u9898\u662f\u5426\u4e0e vs code \u76f8\u5173\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/27\/2024052716003659756.jpg\" class=\"aligncenter\" title=\"vscode\u8f93\u51fa\u4e71\u7801\u600e\u4e48\u89e3\u51b3\u63d2\u56fe\" alt=\"vscode\u8f93\u51fa\u4e71\u7801\u600e\u4e48\u89e3\u51b3\u63d2\u56fe\" \/><\/p>\n<p><strong>VS Code \u8f93\u51fa\u4e71\u7801\u89e3\u51b3\u65b9\u6848<\/strong><\/p>\n<p>\u5f53\u5728 VS Code \u4e2d\u9047\u5230\u8f93\u51fa\u4e71\u7801\u7684\u95ee\u9898\u65f6\uff0c\u53ef\u4ee5\u91c7\u53d6\u4ee5\u4e0b\u65b9\u6cd5\u89e3\u51b3\uff1a<\/p>\n<p><strong>1. \u8bbe\u7f6e\u5b57\u7b26\u96c6\u7f16\u7801<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00 VS Code \u8bbe\u7f6e\uff08File &gt; Preferences &gt; Settings\uff09\u3002<\/li>\n<li>\u5728\u641c\u7d22\u680f\u4e2d\u8f93\u5165 &#8220;terminal.integrated.encoding&#8221;\u3002<\/li>\n<li>\u627e\u5230\u8be5\u8bbe\u7f6e\u5e76\u5c06\u5176\u503c\u66f4\u6539\u4e3a &#8220;utf8&#8221; \u6216 &#8220;GBK&#8221;\uff08\u9002\u7528\u4e8e\u4e2d\u6587\u73af\u5883\uff09\u3002<\/li>\n<\/ul>\n<p><strong>2. \u66f4\u6539\u7ec8\u7aef\u4eff\u771f\u5668<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00 VS Code \u8bbe\u7f6e\uff08File &gt; Preferences &gt; Settings\uff09\u3002<\/li>\n<li>\u641c\u7d22 &#8220;terminal.integrated.shell&#8221;\u3002<\/li>\n<li>\u5c1d\u8bd5\u5207\u6362\u5230\u5176\u4ed6\u7ec8\u7aef\u4eff\u771f\u5668\uff0c\u4f8b\u5982 &#8220;powershell.exe&#8221; \u6216 &#8220;cmd.exe&#8221;\u3002<\/li>\n<\/ul>\n<p><strong>3. \u68c0\u67e5\u7cfb\u7edf\u8bed\u8a00\u8bbe\u7f6e<\/strong><\/p>\n<ul>\n<li>\u786e\u4fdd\u7cfb\u7edf\u8bed\u8a00\u548c\u533a\u57df\u8bbe\u7f6e\u4e0e\u7f16\u8f91\u7684\u6587\u4ef6\u7f16\u7801\u76f8\u5339\u914d\u3002\u53ef\u5728 Windows \u8bbe\u7f6e\uff08Control Panel &gt; Clock and Region &gt; Region\uff09\u6216 macOS \u7cfb\u7edf\u504f\u597d\u8bbe\u7f6e\uff08System Preferences &gt; Language &amp; Region\uff09\u4e2d\u8fdb\u884c\u68c0\u67e5\u3002<\/li>\n<\/ul>\n<p><strong>4. \u66f4\u65b0 VS Code<\/strong><\/p>\n<ul>\n<li>\u68c0\u67e5\u662f\u5426\u6709 VS Code \u66f4\u65b0\u53ef\u7528\u3002\u8fc7\u65f6\u7684\u7248\u672c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u5b57\u7b26\u7f16\u7801\u95ee\u9898\u3002<\/li>\n<\/ul>\n<p><strong>5. \u7981\u7528\u6269\u5c55<\/strong><\/p>\n<ul>\n<li>\u67d0\u4e9b\u6269\u5c55\u53ef\u80fd\u4f1a\u4e0e VS Code \u7684\u5b57\u7b26\u7f16\u7801\u8bbe\u7f6e\u4ea7\u751f\u51b2\u7a81\u3002\u5c1d\u8bd5\u7981\u7528\u4e0d\u9700\u8981\u7684\u6269\u5c55\u4ee5\u89e3\u51b3\u95ee\u9898\u3002<\/li>\n<\/ul>\n<p><strong>6. \u91cd\u7f6e VS Code \u8bbe\u7f6e<\/strong><\/p>\n<ul>\n<li>\u5982\u679c\u5176\u4ed6\u89e3\u51b3\u65b9\u6848\u4e0d\u8d77\u4f5c\u7528\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u91cd\u7f6e VS Code \u8bbe\u7f6e\u3002\u8f6c\u5230 File &gt; Preferences &gt; Settings &gt; Reset Settings\u3002\u8bf7\u6ce8\u610f\uff0c\u8fd9\u5c06\u6e05\u9664\u6240\u6709\u81ea\u5b9a\u4e49\u8bbe\u7f6e\u3002<\/li>\n<\/ul>\n<p><strong>7. \u4f7f\u7528\u5176\u4ed6\u7f16\u8f91\u5668<\/strong><\/p>\n<ul>\n<li>\u5982\u679c\u4e0a\u8ff0\u89e3\u51b3\u65b9\u6848\u90fd\u65e0\u6cd5\u89e3\u51b3\u95ee\u9898\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4f7f\u7528\u5176\u4ed6\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u4f8b\u5982 Notepad++ \u6216 Atom\uff0c\u770b\u770b\u662f\u5426\u4ecd\u7136\u51fa\u73b0\u4e71\u7801\u95ee\u9898\u3002\u8fd9\u6709\u52a9\u4e8e\u786e\u5b9a\u95ee\u9898\u662f\u5426\u4e0e VS Code \u76f8\u5173\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u8f93\u51fa\u4e71\u7801\u600e\u4e48\u89e3\u51b3\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5f53\u5728 vs code \u4e2d\u9047\u5230\u8f93\u51fa\u4e71\u7801\u95ee\u9898\u65f6\uff0c\u53ef\u4ee5\u91c7\u53d6\u4ee5\u4e0b\u6b65\u9aa4\u89e3\u51b3\uff1a\u8bbe\u7f6e\u5b57\u7b26\u96c6\u7f16\u7801\u4e3a &#8220;utf8&#8221; \u6216 &#8220;gbk&#8221;\u3002\u66f4\u6539\u7ec8\u7aef\u4eff\u771f\u5668\u4e3a &#8220;powershell.exe&#8221; \u6216 &#8220;cmd.exe&#8221;\u3002\u68c0\u67e5\u7cfb\u7edf\u8bed\u8a00\u8bbe\u7f6e\u4e0e\u6587\u4ef6\u7f16\u7801\u5339\u914d\u3002\u66f4\u65b0 vs code\u3002\u7981\u7528\u4e0d\u5fc5\u8981\u7684\u6269\u5c55\u3002\u91cd\u7f6e vs code \u8bbe\u7f6e\uff08\u4f1a\u6e05\u9664\u6240\u6709\u81ea\u5b9a\u4e49\u8bbe\u7f6e\uff09\u3002\u4f7f\u7528\u5176\u4ed6\u4ee3\u7801\u7f16\u8f91\u5668\u786e\u8ba4\u95ee\u9898\u662f\u5426\u4e0e vs code \u76f8\u5173\u3002 VS Code \u8f93\u51fa\u4e71\u7801\u89e3\u51b3\u65b9\u6848 \u5f53\u5728 VS Code \u4e2d\u9047\u5230\u8f93\u51fa\u4e71\u7801\u7684\u95ee\u9898\u65f6\uff0c\u53ef\u4ee5\u91c7\u53d6\u4ee5\u4e0b\u65b9\u6cd5\u89e3\u51b3\uff1a 1. \u8bbe\u7f6e\u5b57\u7b26\u96c6\u7f16\u7801 \u6253\u5f00 VS Code \u8bbe\u7f6e\uff08File &gt; Preferences &gt; Settings\uff09\u3002 \u5728\u641c\u7d22\u680f\u4e2d\u8f93\u5165 &#8220;terminal.integrated.encoding&#8221;\u3002 \u627e\u5230\u8be5\u8bbe\u7f6e\u5e76\u5c06\u5176\u503c\u66f4\u6539\u4e3a &#8220;utf8&#8221; \u6216 &#8220;GBK&#8221;\uff08\u9002\u7528\u4e8e\u4e2d\u6587\u73af\u5883\uff09\u3002 2. \u66f4\u6539\u7ec8\u7aef\u4eff\u771f\u5668 \u6253\u5f00 VS Code \u8bbe\u7f6e\uff08File &gt; Preferences &gt; Settings\uff09\u3002 \u641c\u7d22 &#8220;terminal.integrated.shell&#8221;\u3002 \u5c1d\u8bd5\u5207\u6362\u5230\u5176\u4ed6\u7ec8\u7aef\u4eff\u771f\u5668\uff0c\u4f8b\u5982 &#8220;powershell.exe&#8221; [&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-21420","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21420","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=21420"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21420\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}