In this blog post, we’ll continue from where we left earlier in the previous post on debugging PowerShell using Visual Studio code. You may be beginning to notice that the debugging features offered in Visual Studio code are far ahead in terms of usability.
Not only that, we can set line breakpoints (which can be specified by pressing F9 on code line in reference), we can also set conditional breakpoints, functional breakpoints and trace breakpoints.
A functional breakpoint can be defined as breakpoint which is invoked on calling of a particular function. You can set a function breakpoint to break into the debugger not only on a particular function invocation but also on an alias, a built-in command, or application invocation. Continue reading “Debugging PowerShell in Visual Studio Code – Part 02”
In one of the previous post, we discussed how to use visual studio code for PowerShell development. Writing scripts in Visual Studio code is now more or less at par with ISE (Integrated scripting environment) and in a few cases, is more useful. However, you do need to be able to make sure that whatever code you have written in PowerShell, should be able to run as intended. Also, if its not working as intended, you should be able to debug and see where you went wrong. In this blog post, we’ll discuss how to use Visual Studio code for debugging. These features are provided by the PowerShell extension, or, more accurately, by the PowerShell Editor Services module which comes with the PowerShell extension. PowerShell Editor services not only provides language services to the Extension (which in turns provide services to Visual Studio code) but also provides useful debugging features. Continue reading “Debugging PowerShell in Visual Studio Code – Part 01”
This post is continuation of series of PowerShell development using Visual Studio code. In this blog post, we’ll see how to customize Visual Studio code for PowerShell development. One of the great features of Visual Studio Code is the extent to which you can customize it. Each extension usually provides customizable settings, too. To begin to customize Visual Studio Code, select the Command Palette from the View menu, or press Ctrl+Shift+P (Cmd + P on the Mac), type user, and then select Preferences: Open User Settings. This will open two editor windows as shown in the following screenshot: Continue reading “Customize Visual Studio Code settings for PowerShell development”
It has been a long time since the PowerShell integrated scripting environment (ISE) shipped with Windows PowerShell 2.0 in 2009. Since then .NET has become open source and cross-platform in form of .NET Core. Since PowerShell is built on top of .NET, it was an important pre-requisite before making PowerShell cross platform. Also, PowerShell has become cross-platform as of today. It is also open-source like .NET core. You can find the same at GitHub as well. In fact, we did discuss the open-source PowerShell namely 6.0 installation in few of the earlier posts as well. Continue reading “Using Visual Studio Code for PowerShell Development”