{"id":17765,"date":"2015-11-16T09:16:58","date_gmt":"2015-11-16T17:16:58","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/powershell\/?p=17765"},"modified":"2019-06-05T13:10:05","modified_gmt":"2019-06-05T21:10:05","slug":"announcing-powershell-language-support-for-visual-studio-code-and-more","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/powershell\/announcing-powershell-language-support-for-visual-studio-code-and-more\/","title":{"rendered":"Announcing PowerShell language support for Visual Studio Code and more!"},"content":{"rendered":"<p><span style=\"font-size: 12px;\">Today I am very happy to announce Developer Preview releases of two new projects that I hope will take your PowerShell development experience to the next level.<\/span><\/p>\n<h2>Write and debug PowerShell scripts in Visual Studio Code!<\/h2>\n<p>The first release is a new extension for <a title=\"Visual Studio Code\" href=\"https:\/\/code.visualstudio.com\/\">Visual Studio Code<\/a> which provides improved PowerShell language support including IntelliSense, code navigation, real-time script analysis, and local script debugging. &nbsp;Previous releases of Visual Studio Code have provided basic PowerShell syntax highlighting support and code snippets. &nbsp;This summer I started working with a PowerShell team intern,&nbsp;<strong>Kayla Davis<\/strong>, to bring PowerShell to parity with the in-box C# and TypeScript support. &nbsp;This new extension takes the feature set much further:<\/p>\n<p><span style=\"color: #993300;\"><strong>[The following images are animated GIFs, click to play!]<\/strong><\/span><\/p>\n<h3>IntelliSense and signature help for parameter sets<\/h3>\n<p>&nbsp;<a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/5025.IntelliSense.gif\" original-url=\"http:\/\/blogs.msdn.com\/cfs-file.ashx\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/5025.IntelliSense.gif\"><img decoding=\"async\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/5025.IntelliSense.gif\" original-url=\"http:\/\/blogs.msdn.com\/resized-image.ashx\/__size\/400x0\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/5025.IntelliSense.gif\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Code navigations like &#8220;Go to Definition&#8221; and &#8220;Find References&#8221;<\/h3>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/6837.Definition.gif\" original-url=\"http:\/\/blogs.msdn.com\/cfs-file.ashx\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/6837.Definition.gif\"><img decoding=\"async\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/6837.Definition.gif\" original-url=\"http:\/\/blogs.msdn.com\/resized-image.ashx\/__size\/400x0\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/6837.Definition.gif\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&#8230;even across dot-sourced files!<\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/0804.References.gif\" original-url=\"http:\/\/blogs.msdn.com\/cfs-file.ashx\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/0804.References.gif\"><img decoding=\"async\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/0804.References.gif\" original-url=\"http:\/\/blogs.msdn.com\/resized-image.ashx\/__size\/400x0\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/0804.References.gif\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Viewing the list of symbols in the current script file or project path<\/h3>\n<p>This feature is our first community contribution by <strong>PowerShell MVP Keith Hill<\/strong>! &nbsp;I am really excited to be able to ship this extension with a community contribution already in the box.<\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/1830.Symbols.gif\" original-url=\"http:\/\/blogs.msdn.com\/cfs-file.ashx\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/1830.Symbols.gif\"><img decoding=\"async\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/1830.Symbols.gif\" original-url=\"http:\/\/blogs.msdn.com\/resized-image.ashx\/__size\/400x0\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/1830.Symbols.gif\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Real-time script analysis using PowerShell Script Analyzer<\/h3>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/5187.ScriptAnalyzer.gif\" original-url=\"http:\/\/blogs.msdn.com\/cfs-file.ashx\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/5187.ScriptAnalyzer.gif\"><img decoding=\"async\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/5187.ScriptAnalyzer.gif\" original-url=\"http:\/\/blogs.msdn.com\/resized-image.ashx\/__size\/400x0\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/5187.ScriptAnalyzer.gif\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p><strong><br \/><\/strong><\/p>\n<h3>Local script debugging<\/h3>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/5850.Debugging1.gif\" original-url=\"http:\/\/blogs.msdn.com\/cfs-file.ashx\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/5850.Debugging1.gif\"><img decoding=\"async\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/5850.Debugging1.gif\" original-url=\"http:\/\/blogs.msdn.com\/resized-image.ashx\/__size\/400x0\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/5850.Debugging1.gif\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>You can even set variables to be watched!<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/4405.Debugging2.gif\" original-url=\"http:\/\/blogs.msdn.com\/cfs-file.ashx\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/4405.Debugging2.gif\"><img decoding=\"async\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/4405.Debugging2.gif\" original-url=\"http:\/\/blogs.msdn.com\/resized-image.ashx\/__size\/400x0\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/4405.Debugging2.gif\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p><strong><br \/><\/strong><\/p>\n<h3>Basic interactive script console<\/h3>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/8838.Debugging3.gif\" original-url=\"http:\/\/blogs.msdn.com\/cfs-file.ashx\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/8838.Debugging3.gif\"><img decoding=\"async\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/8838.Debugging3.gif\" original-url=\"http:\/\/blogs.msdn.com\/resized-image.ashx\/__size\/400x0\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/8838.Debugging3.gif\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p><strong><br \/><\/strong><\/p>\n<h3>&#8230;and this is only the beginning!<\/h3>\n<p>In the near future we intend to add even more great features:<\/p>\n<ul>\n<li>Better support for advanced language features like workflows, classes, and DSC configurations<\/li>\n<li>Remote debugging support<\/li>\n<li>Improved interactive console support<\/li>\n<li>Quick fixes for common syntax rules<\/li>\n<li>PowerShell Gallery integration for finding and installing PowerShell modules from within the editor (a contribution by <strong>PowerShell MVP Doug Finke<\/strong>)<\/li>\n<li>Support for PowerShell v3 and v4<\/li>\n<\/ul>\n<div>We would love to hear your feedback about this extension and would love even more to have you contribute to the code! &nbsp;Check out the <a title=\"vscode-powershell GitHub repository\" href=\"https:\/\/github.com\/PowerShell\/vscode-powershell\">vscode-powershell GitHub repository<\/a> for more details.<\/div>\n<h3>Installing the extension<\/h3>\n<p>To install this extension, make sure you have the latest Visual Studio Code update installed (version 0.10.1, just released today!). &nbsp;You will also need to have <strong>PowerShell 5<\/strong>&nbsp;either by using Windows 10 or by installing <a title=\"Windows Management Framework 5.0 Production Preview\" href=\"http:\/\/www.microsoft.com\/en-us\/download\/details.aspx?id=48729\">Windows Management Framework 5.0 Production Preview<\/a>. &nbsp;While running Visual Studio Code, open the command palette by pressing Ctrl+Shift+P and then type &#8220;Extension&#8221; then select &#8220;Install Extensions&#8221;. &nbsp;Once the extensions list loads, type PowerShell and press Enter. &nbsp;That&#8217;s it! &nbsp;Restart Visual Studio Code and open folder containing PowerShell script files to get started. &nbsp;<\/p>\n<p>&nbsp;<a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/0647.Install.gif\" original-url=\"http:\/\/blogs.msdn.com\/cfs-file.ashx\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/0647.Install.gif\"><img decoding=\"async\" src=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Blogs.Components.WeblogFiles\/00\/00\/00\/63\/74\/0647.Install.gif\" original-url=\"http:\/\/blogs.msdn.com\/resized-image.ashx\/__size\/400x0\/__key\/communityserver-blogs-components-weblogfiles\/00-00-00-63-74\/0647.Install.gif\" alt=\"\" border=\"0\" \/><\/a><\/p>\n<p>If you don&#8217;t have a folder of PowerShell script files (shame on you!) &nbsp;I&#8217;ve included one with the extension and some instructions on features to try out. &nbsp;Open this file path in VS Code and look at the README.md file:<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-family: 'courier new', courier;\">c:\\Users\\&lt;yourusername&gt;\\.vscode\\extensions\\ms-vscode.PowerShell\\examples<\/span><\/p>\n<p>&nbsp;<\/p>\n<h2>Enabling PowerShell development support in any editor<\/h2>\n<p>The second release is a new project called <strong>PowerShell Editor Services<\/strong><strong>.<\/strong>&nbsp; This project provides a new common platform for enabling rich PowerShell development support in any editor. &nbsp;It is composed of two parts: a <strong>.NET library<\/strong>&nbsp;which provides core PowerShell language intelligence and debugging features and a <strong>hostable process with JSON API<\/strong>&nbsp;for integration into editors that are written on a development platform other than .NET. &nbsp;The goal of this project is to enable other code editors like <strong>Sublime Text, Atom, Emacs, Vim<\/strong>&nbsp;and others to have the same level of PowerShell development support as Visual Studio Code, customized to the strengths of each editor. &nbsp;All of the features that you see in the Visual Studio Code extension are provided by this project! &nbsp;I&#8217;ll be publishing packages to NuGet in the next couple of days so keep an eye out for that.<\/p>\n<p>These APIs should be considered very new, unstable, and <strong>likely to change<\/strong> as we learn more about usage scenarios and feature set. &nbsp;We will be working with the PowerShell community to get things stabilized and documented to 1.0 release quality in 2016.<\/p>\n<p>We are actively looking for contributors to this project, especially to help with integrations with the editors that you care about. &nbsp;Please check out the <a title=\"PowerShellEditorServices GitHub repository\" href=\"http:\/\/github.com\/PowerShell\/PowerShellEditorServices\">PowerShellEditorServices GitHub repository<\/a> for more details.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>One last thing<\/strong>: Fans of PowerShell ISE, stay tuned for another great announcement next month!<\/p>\n<p>&nbsp;<\/p>\n<p>David Wilson <a title=\"@daviwil\" href=\"https:\/\/twitter.com\/daviwil\">@daviwil<\/a><br \/>Software Engineer<br \/>Windows PowerShell Team<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I am very happy to announce Developer Preview releases of two new projects that I hope will take your PowerShell development experience to the next level. Write and debug PowerShell scripts in Visual Studio Code! The first release is a new extension for Visual Studio Code which provides improved PowerShell language support including IntelliSense, [&hellip;]<\/p>\n","protected":false},"author":600,"featured_media":13641,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-17765","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-powershell"],"acf":[],"blog_post_summary":"<p>Today I am very happy to announce Developer Preview releases of two new projects that I hope will take your PowerShell development experience to the next level. Write and debug PowerShell scripts in Visual Studio Code! The first release is a new extension for Visual Studio Code which provides improved PowerShell language support including IntelliSense, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/17765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/users\/600"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/comments?post=17765"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/posts\/17765\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media\/13641"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/media?parent=17765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/categories?post=17765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/powershell\/wp-json\/wp\/v2\/tags?post=17765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}