{"id":733,"date":"2021-03-04T11:17:47","date_gmt":"2021-03-04T05:47:47","guid":{"rendered":"https:\/\/openapex.org\/spaces\/software\/?p=733"},"modified":"2022-01-25T14:38:49","modified_gmt":"2022-01-25T09:08:49","slug":"launch-visual-studio-code-from-command-line","status":"publish","type":"post","link":"https:\/\/mutesoft.com\/spaces\/software\/launch-visual-studio-code-from-command-line.html","title":{"rendered":"Launch Visual Studio Code from Command Line"},"content":{"rendered":"\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\">Visual Studio Code<\/a> is an increasingly popular tool for developing software applications. It is comparable to <a rel=\"noreferrer noopener\" href=\"https:\/\/atom.io\/\" target=\"_blank\">Atom<\/a>, <a rel=\"noreferrer noopener\" href=\"https:\/\/www.sublimetext.com\/\" target=\"_blank\">Sublime Text<\/a> etc.<\/p>\n\n\n\n<p>To launch any tool from the command prompt, the path of the tool executable has to be present in <code>PATH<\/code> environmental variable. This is either done automatically at the time of installation of the tool or added later manually. Visual Studio Code made the manual addition step easier. Instead of dealing with paths and manual change of environmental variables, Visual Studio Code lets you add the executable path to <code>PATH<\/code> environmental variable right from the tool.<\/p>\n\n\n\n<p><strong>Step 1:<\/strong> Open the <code>Command Palette<\/code> from View menu<\/p>\n\n\n\n<div class=\"wp-block-image is-style-default\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/openapex.org\/spaces\/software\/wp-content\/uploads\/sites\/7\/2021\/03\/Screenshot-2021-03-04-at-10.56.29-AM-1024x616.png\" alt=\"\" class=\"wp-image-735\" width=\"768\" height=\"462\" srcset=\"https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2021\/03\/Screenshot-2021-03-04-at-10.56.29-AM-1024x616.png 1024w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2021\/03\/Screenshot-2021-03-04-at-10.56.29-AM-300x181.png 300w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2021\/03\/Screenshot-2021-03-04-at-10.56.29-AM-768x462.png 768w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2021\/03\/Screenshot-2021-03-04-at-10.56.29-AM-1536x925.png 1536w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2021\/03\/Screenshot-2021-03-04-at-10.56.29-AM.png 1638w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<p><strong>Step 2:<\/strong> Choose the option <code>Shell Command: Install code command in PATH<\/code> from the list of options<\/p>\n\n\n\n<div class=\"wp-block-image is-style-default\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/openapex.org\/spaces\/software\/wp-content\/uploads\/sites\/7\/2021\/03\/vcs-install-code-in-path-1024x601.png\" alt=\"\" class=\"wp-image-736\" width=\"768\" height=\"451\" srcset=\"https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2021\/03\/vcs-install-code-in-path-1024x601.png 1024w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2021\/03\/vcs-install-code-in-path-300x176.png 300w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2021\/03\/vcs-install-code-in-path-768x451.png 768w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2021\/03\/vcs-install-code-in-path-1536x902.png 1536w, https:\/\/mutesoft.com\/spaces\/software\/wp-content\/uploads\/sites\/7\/2021\/03\/vcs-install-code-in-path.png 1638w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<p><strong>Step 3<\/strong>: Now open any file in Visual Studio code from command line or a script by typing <code>code<\/code> command.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"atomic\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># code &lt;fileName>\ncode ~\/.zshrc<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Visual Studio Code is an increasingly popular tool for developing software applications. It is comparable to Atom, Sublime Text etc. To launch any tool from the command prompt, the path of the tool executable has to be present in PATH<\/p>\n","protected":false},"author":2,"featured_media":735,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"none","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","_vp_format_video_url":"","_vp_image_focal_point":[],"footnotes":""},"categories":[32],"tags":[41,36,40],"class_list":["post-733","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tools","tag-command-line","tag-tools","tag-visual-studio-code"],"_links":{"self":[{"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/posts\/733","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/comments?post=733"}],"version-history":[{"count":5,"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/posts\/733\/revisions"}],"predecessor-version":[{"id":923,"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/posts\/733\/revisions\/923"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/media\/735"}],"wp:attachment":[{"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/media?parent=733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/categories?post=733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mutesoft.com\/spaces\/software\/wp-json\/wp\/v2\/tags?post=733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}