{"id":21301,"date":"2024-11-19T12:32:01","date_gmt":"2024-11-19T04:32:01","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21301\/"},"modified":"2024-11-19T12:32:01","modified_gmt":"2024-11-19T04:32:01","slug":"vscode%e7%8e%af%e5%a2%83%e5%8f%98%e9%87%8f%e6%80%8e%e4%b9%88%e9%85%8d%e7%bd%ae","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21301\/","title":{"rendered":"vscode\u73af\u5883\u53d8\u91cf\u600e\u4e48\u914d\u7f6e"},"content":{"rendered":"<blockquote><p>\n  \u5728 vscode \u4e2d\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u5305\u542b\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u6253\u5f00\u8bbe\u7f6e\u5e76\u641c\u7d22\u201cenv\u201d\u3002\u5728\u201cterminal: integrated\u201d\u90e8\u5206\u4e0b\uff0c\u7f16\u8f91\u201cenv\u201d\u8bbe\u7f6e\u3002\u6dfb\u52a0\u3001\u7f16\u8f91\u6216\u5220\u9664\u73af\u5883\u53d8\u91cf\u3002\u4fdd\u5b58\u8bbe\u7f6e\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/15\/2024051507331925835.jpg\" class=\"aligncenter\" title=\"vscode\u73af\u5883\u53d8\u91cf\u600e\u4e48\u914d\u7f6e\u63d2\u56fe\" alt=\"vscode\u73af\u5883\u53d8\u91cf\u600e\u4e48\u914d\u7f6e\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5728 VSCode \u4e2d\u914d\u7f6e\u73af\u5883\u53d8\u91cf<\/strong><\/p>\n<p>\u5728 VSCode \u4e2d\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n<p><strong>1. \u6253\u5f00\u7528\u6237\u6216\u5de5\u4f5c\u533a\u8bbe\u7f6e<\/strong><\/p>\n<ul>\n<li>Windows\uff1a\u6309 Ctrl + ,\uff08\u9017\u53f7\uff09<\/li>\n<li>macOS\uff1a\u6309 Cmd + ,\uff08\u9017\u53f7\uff09<\/li>\n<li>Linux\uff1a\u6309 Ctrl + ,\uff08\u9017\u53f7\uff09<\/li>\n<\/ul>\n<p><strong>2. \u5728\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201cenv\u201d<\/strong><\/p>\n<ul>\n<li>\u5728\u201c\u641c\u7d22\u8bbe\u7f6e\u201d\u680f\u4e2d\uff0c\u8f93\u5165\u201cenv\u201d\u4ee5\u67e5\u627e\u4e0e\u73af\u5883\u53d8\u91cf\u76f8\u5173\u7684\u8bbe\u7f6e\u3002<\/li>\n<\/ul>\n<p><strong>3. \u627e\u5230\u201cTerminal: Integrated\u201d\u90e8\u5206<\/strong><\/p>\n<ul>\n<li>\u5728\u641c\u7d22\u7ed3\u679c\u4e2d\uff0c\u627e\u5230\u201cTerminal: Integrated\u201d\u90e8\u5206\u3002<\/li>\n<\/ul>\n<p><strong>4. \u7f16\u8f91\u201cenv\u201d\u8bbe\u7f6e<\/strong><\/p>\n<ul>\n<li>\u5728\u201cenv\u201d\u8bbe\u7f6e\u4e2d\uff0c\u53ef\u4ee5\u6dfb\u52a0\u3001\u7f16\u8f91\u6216\u5220\u9664\u73af\u5883\u53d8\u91cf\u3002<\/li>\n<li>\u8981\u6dfb\u52a0\u65b0\u53d8\u91cf\uff0c\u8bf7\u521b\u5efa\u4e00\u4e2a\u65b0\u952e\u5e76\u8f93\u5165\u53d8\u91cf\u540d\u79f0\u548c\u503c\u3002<\/li>\n<li>\u8981\u7f16\u8f91\u73b0\u6709\u53d8\u91cf\uff0c\u8bf7\u53cc\u51fb\u8be5\u884c\u5e76\u4fee\u6539\u503c\u3002<\/li>\n<li>\u8981\u5220\u9664\u53d8\u91cf\uff0c\u8bf7\u53f3\u952e\u5355\u51fb\u8be5\u884c\u5e76\u9009\u62e9\u201c\u5220\u9664\u201d\u3002<\/li>\n<\/ul>\n<p><strong>5. \u4fdd\u5b58\u8bbe\u7f6e<\/strong><\/p>\n<ul>\n<li>\u5b8c\u6210\u5bf9\u73af\u5883\u53d8\u91cf\u7684\u7f16\u8f91\u540e\uff0c\u6309 Ctrl + S\uff08Windows\/Linux\uff09\u6216 Cmd + S\uff08macOS\uff09\u4fdd\u5b58\u8bbe\u7f6e\u3002<\/li>\n<\/ul>\n<p><strong>\u4e3e\u4f8b\uff1a<\/strong><\/p>\n<p>\u5047\u8bbe\u6211\u4eec\u8981\u5728 VSCode \u4e2d\u914d\u7f6e PATH \u73af\u5883\u53d8\u91cf\u6765\u5305\u542b\u4e00\u4e2a\u540d\u4e3a\u201cmy_scripts\u201d\u7684\u65b0\u76ee\u5f55\u3002\u6211\u4eec\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\uff1a<\/p>\n<ol>\n<li>\u6253\u5f00\u7528\u6237\u6216\u5de5\u4f5c\u533a\u8bbe\u7f6e\u3002<\/li>\n<li>\u8f93\u5165\u201cenv\u201d\u5e76\u627e\u5230\u201cTerminal: Integrated\u201d\u90e8\u5206\u3002<\/li>\n<li>\u5728\u201cenv\u201d\u8bbe\u7f6e\u4e2d\uff0c\u6dfb\u52a0\u4e00\u4e2a\u65b0\u952e\u540d\u4e3a\u201cPATH\u201d\uff0c\u503c\u8bbe\u7f6e\u4e3a\u201c$PATH:\/my_scripts\u201d\u3002<\/li>\n<li>\u4fdd\u5b58\u8bbe\u7f6e\u3002<\/li>\n<\/ol>\n<p>\u4e4b\u540e\uff0c\u5728 VSCode \u7ec8\u7aef\u4e2d\uff0c\u6211\u4eec\u5c06\u80fd\u591f\u901a\u8fc7\u952e\u5165\u201cmy_scripts\/script_name\u201d\u6765\u8bbf\u95ee\u4f4d\u4e8e\u201cmy_scripts\u201d\u76ee\u5f55\u4e2d\u7684\u811a\u672c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u73af\u5883\u53d8\u91cf\u600e\u4e48\u914d\u7f6e\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>\u5728 vscode \u4e2d\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u5305\u542b\u4ee5\u4e0b\u6b65\u9aa4\uff1a\u6253\u5f00\u8bbe\u7f6e\u5e76\u641c\u7d22\u201cenv\u201d\u3002\u5728\u201cterminal: integrated\u201d\u90e8\u5206\u4e0b\uff0c\u7f16\u8f91\u201cenv\u201d\u8bbe\u7f6e\u3002\u6dfb\u52a0\u3001\u7f16\u8f91\u6216\u5220\u9664\u73af\u5883\u53d8\u91cf\u3002\u4fdd\u5b58\u8bbe\u7f6e\u3002 \u5728 VSCode \u4e2d\u914d\u7f6e\u73af\u5883\u53d8\u91cf \u5728 VSCode \u4e2d\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u975e\u5e38\u7b80\u5355\uff0c\u53ea\u9700\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a 1. \u6253\u5f00\u7528\u6237\u6216\u5de5\u4f5c\u533a\u8bbe\u7f6e Windows\uff1a\u6309 Ctrl + ,\uff08\u9017\u53f7\uff09 macOS\uff1a\u6309 Cmd + ,\uff08\u9017\u53f7\uff09 Linux\uff1a\u6309 Ctrl + ,\uff08\u9017\u53f7\uff09 2. \u5728\u641c\u7d22\u680f\u4e2d\u8f93\u5165\u201cenv\u201d \u5728\u201c\u641c\u7d22\u8bbe\u7f6e\u201d\u680f\u4e2d\uff0c\u8f93\u5165\u201cenv\u201d\u4ee5\u67e5\u627e\u4e0e\u73af\u5883\u53d8\u91cf\u76f8\u5173\u7684\u8bbe\u7f6e\u3002 3. \u627e\u5230\u201cTerminal: Integrated\u201d\u90e8\u5206 \u5728\u641c\u7d22\u7ed3\u679c\u4e2d\uff0c\u627e\u5230\u201cTerminal: Integrated\u201d\u90e8\u5206\u3002 4. \u7f16\u8f91\u201cenv\u201d\u8bbe\u7f6e \u5728\u201cenv\u201d\u8bbe\u7f6e\u4e2d\uff0c\u53ef\u4ee5\u6dfb\u52a0\u3001\u7f16\u8f91\u6216\u5220\u9664\u73af\u5883\u53d8\u91cf\u3002 \u8981\u6dfb\u52a0\u65b0\u53d8\u91cf\uff0c\u8bf7\u521b\u5efa\u4e00\u4e2a\u65b0\u952e\u5e76\u8f93\u5165\u53d8\u91cf\u540d\u79f0\u548c\u503c\u3002 \u8981\u7f16\u8f91\u73b0\u6709\u53d8\u91cf\uff0c\u8bf7\u53cc\u51fb\u8be5\u884c\u5e76\u4fee\u6539\u503c\u3002 \u8981\u5220\u9664\u53d8\u91cf\uff0c\u8bf7\u53f3\u952e\u5355\u51fb\u8be5\u884c\u5e76\u9009\u62e9\u201c\u5220\u9664\u201d\u3002 5. \u4fdd\u5b58\u8bbe\u7f6e \u5b8c\u6210\u5bf9\u73af\u5883\u53d8\u91cf\u7684\u7f16\u8f91\u540e\uff0c\u6309 Ctrl + S\uff08Windows\/Linux\uff09\u6216 Cmd + S\uff08macOS\uff09\u4fdd\u5b58\u8bbe\u7f6e\u3002 \u4e3e\u4f8b\uff1a \u5047\u8bbe\u6211\u4eec\u8981\u5728 VSCode \u4e2d\u914d\u7f6e PATH \u73af\u5883\u53d8\u91cf\u6765\u5305\u542b\u4e00\u4e2a\u540d\u4e3a\u201cmy_scripts\u201d\u7684\u65b0\u76ee\u5f55\u3002\u6211\u4eec\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8fdb\u884c\u64cd\u4f5c\uff1a \u6253\u5f00\u7528\u6237\u6216\u5de5\u4f5c\u533a\u8bbe\u7f6e\u3002 \u8f93\u5165\u201cenv\u201d\u5e76\u627e\u5230\u201cTerminal: [&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-21301","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21301","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=21301"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21301\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21301"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}