{"id":20974,"date":"2024-11-19T10:27:49","date_gmt":"2024-11-19T02:27:49","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20974\/"},"modified":"2024-11-19T10:27:49","modified_gmt":"2024-11-19T02:27:49","slug":"webstorm%e6%80%8e%e4%b9%88%e8%bf%90%e8%a1%8cjs","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20974\/","title":{"rendered":"webstorm\u600e\u4e48\u8fd0\u884cjs"},"content":{"rendered":"<blockquote><p>\n  \u5728 webstorm \u4e2d\u8fd0\u884c javascript \u6709\u4e24\u79cd\u65b9\u6cd5\uff1a1. \u5728\u63a7\u5236\u53f0\u4e2d\u8fd0\u884c\uff1b2. \u4f7f\u7528\u201crun\/debug configuration\u201d\u3002\u8be6\u7ec6\u6b65\u9aa4\uff1a1. \u63a7\u5236\u53f0\u65b9\u6cd5\uff1a\u521b\u5efa\u4e00\u4e2a javascript \u6587\u4ef6\u5e76\u8f93\u5165\u4ee3\u7801\uff0c\u6309\u5feb\u6377\u952e\u8fd0\u884c\uff1b2. \u201crun\/debug configuration\u201d\u65b9\u6cd5\uff1a\u53f3\u952e\u5355\u51fb javascript \u6587\u4ef6\uff0c\u9009\u62e9\u201crun\/debug configurations\u201d\uff0c\u5728\u201cnode.js\u201d\u4e0b\u521b\u5efa\u65b0\u914d\u7f6e\u5e76\u8f93\u5165\u6587\u4ef6\u8def\u5f84\uff0c\u70b9\u51fb\u201c\u8fd0\u884c\u201d\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/08\/2024040813062261945.jpg\" class=\"aligncenter\" title=\"webstorm\u600e\u4e48\u8fd0\u884cjs\u63d2\u56fe\" alt=\"webstorm\u600e\u4e48\u8fd0\u884cjs\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 WebStorm \u4e2d\u8fd0\u884c JavaScript<\/strong><\/p>\n<p>\u5728 WebStorm \u4e2d\u8fd0\u884c JavaScript \u4e3b\u8981\u6709\u4e24\u79cd\u65b9\u6cd5\uff1a<\/p>\n<p><strong>1. \u5728\u63a7\u5236\u53f0\u4e2d\u8fd0\u884c<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00 WebStorm \u5e76\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 JavaScript \u6587\u4ef6\uff08*.js\uff09\u3002<\/li>\n<li>\u8f93\u5165\u60a8\u7684\u4ee3\u7801\u3002<\/li>\n<li>\u4ece\u83dc\u5355\u4e2d\u9009\u62e9\u201c\u8fd0\u884c\u201d &gt; \u201c\u5728\u63a7\u5236\u53f0\u4e2d\u8fd0\u884c\u201d\uff08Ctrl + Shift + F10\uff0cMac \u4e3a Cmd + Shift + F10\uff09\u3002<\/li>\n<\/ul>\n<p><strong>2. \u4f7f\u7528\u201cRun\/Debug Configuration\u201d<\/strong><\/p>\n<ul>\n<li>\u53f3\u952e\u5355\u51fb\u9879\u76ee\u4e2d\u7684 JavaScript \u6587\u4ef6\u6216\u6587\u4ef6\u5939\u3002<\/li>\n<li>\u9009\u62e9\u201cRun\/Debug Configurations\u201d\u3002<\/li>\n<li>\u5728\u201cNode.js\u201d\u90e8\u5206\u4e0b\uff0c\u70b9\u51fb\u201c+\u201d\u6309\u94ae\u4ee5\u521b\u5efa\u65b0\u914d\u7f6e\u3002<\/li>\n<li>\u5728\u201cScript path\u201d\u5b57\u6bb5\u4e2d\u8f93\u5165 JavaScript \u6587\u4ef6\u7684\u8def\u5f84\u3002<\/li>\n<li>\u70b9\u51fb\u201c\u8fd0\u884c\u201d\u3002<\/li>\n<\/ul>\n<p><strong>\u8be6\u7ec6\u6b65\u9aa4\uff1a<\/strong><\/p>\n<p><strong>1. \u63a7\u5236\u53f0\u65b9\u6cd5\uff1a<\/strong><\/p>\n<ul>\n<li>\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a test.js \u7684\u65b0\u6587\u4ef6\u3002<\/li>\n<li>\u8f93\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/li>\n<\/ul>\n<pre>console.log(\"Hello, World!\");<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<ul>\n<li>\u6309 Ctrl + Shift + F10\uff08Mac \u4e3a Cmd + Shift + F10\uff09\u8fd0\u884c\u811a\u672c\u3002<\/li>\n<li>\u63a7\u5236\u53f0\u5c06\u8f93\u51fa\uff1a<\/li>\n<\/ul>\n<pre>Hello, World!<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p><strong>2. \u201cRun\/Debug Configuration\u201d\u65b9\u6cd5\uff1a<\/strong><\/p>\n<ul>\n<li>\u53f3\u952e\u5355\u51fb test.js \u6587\u4ef6\u3002<\/li>\n<li>\u9009\u62e9\u201cRun\/Debug Configurations\u201d\u3002<\/li>\n<li>\u70b9\u51fb\u201c+\u201d\u6309\u94ae\uff0c\u9009\u62e9\u201cNode.js\u201d\u3002<\/li>\n<li>\u5728\u201cScript path\u201d\u5b57\u6bb5\u4e2d\u8f93\u5165 test.js \u7684\u8def\u5f84\u3002<\/li>\n<li>\u70b9\u51fb\u201c\u8fd0\u884c\u201d\u3002<\/li>\n<li>\u7a0b\u5e8f\u5c06\u8fd0\u884c\u5e76\u8f93\u51fa\u5230\u63a7\u5236\u53f0\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u8fd0\u884cjs\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 webstorm \u4e2d\u8fd0\u884c javascript \u6709\u4e24\u79cd\u65b9\u6cd5\uff1a1. \u5728\u63a7\u5236\u53f0\u4e2d\u8fd0\u884c\uff1b2. \u4f7f\u7528\u201crun\/debug configuration\u201d\u3002\u8be6\u7ec6\u6b65\u9aa4\uff1a1. \u63a7\u5236\u53f0\u65b9\u6cd5\uff1a\u521b\u5efa\u4e00\u4e2a javascript \u6587\u4ef6\u5e76\u8f93\u5165\u4ee3\u7801\uff0c\u6309\u5feb\u6377\u952e\u8fd0\u884c\uff1b2. \u201crun\/debug configuration\u201d\u65b9\u6cd5\uff1a\u53f3\u952e\u5355\u51fb javascript \u6587\u4ef6\uff0c\u9009\u62e9\u201crun\/debug configurations\u201d\uff0c\u5728\u201cnode.js\u201d\u4e0b\u521b\u5efa\u65b0\u914d\u7f6e\u5e76\u8f93\u5165\u6587\u4ef6\u8def\u5f84\uff0c\u70b9\u51fb\u201c\u8fd0\u884c\u201d\u3002 \u5982\u4f55\u5728 WebStorm \u4e2d\u8fd0\u884c JavaScript \u5728 WebStorm \u4e2d\u8fd0\u884c JavaScript \u4e3b\u8981\u6709\u4e24\u79cd\u65b9\u6cd5\uff1a 1. \u5728\u63a7\u5236\u53f0\u4e2d\u8fd0\u884c \u6253\u5f00 WebStorm \u5e76\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 JavaScript \u6587\u4ef6\uff08*.js\uff09\u3002 \u8f93\u5165\u60a8\u7684\u4ee3\u7801\u3002 \u4ece\u83dc\u5355\u4e2d\u9009\u62e9\u201c\u8fd0\u884c\u201d &gt; \u201c\u5728\u63a7\u5236\u53f0\u4e2d\u8fd0\u884c\u201d\uff08Ctrl + Shift + F10\uff0cMac \u4e3a Cmd + Shift + F10\uff09\u3002 2. \u4f7f\u7528\u201cRun\/Debug Configuration\u201d \u53f3\u952e\u5355\u51fb\u9879\u76ee\u4e2d\u7684 JavaScript \u6587\u4ef6\u6216\u6587\u4ef6\u5939\u3002 \u9009\u62e9\u201cRun\/Debug Configurations\u201d\u3002 \u5728\u201cNode.js\u201d\u90e8\u5206\u4e0b\uff0c\u70b9\u51fb\u201c+\u201d\u6309\u94ae\u4ee5\u521b\u5efa\u65b0\u914d\u7f6e\u3002 [&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-20974","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20974","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=20974"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20974\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}