Using the PowerShell Integrated Console in VS Code

VS Code is my absolute favorite editor. It has been my GoTo IDE for Chef cookbook development for some time. I was hooked when I tried the PowerShell Extension as my default terminal (ctrl + `) and saw my profile stuff (err – PSReadLine) all loaded up:

terminal_profile_awesome

Then to try out the 0.10.0 release. Wow, completely blown away! We now have a fully integrated console to run and debug PowerShell scripts. Many thanks to  David Wilson and Keith Hill for this awesome stuff.

Let’s take a look at the integrated console.

interactive_console

Just like PowerShell ISE, I can highlight a hash table and the shortcut for “Run Selection” (F8) and jump down to the console to check the variable values. This is really useful for stepping thru some code or building out new code.

All of the commands I’ve tried so far seem to work nicely. This will for sure replace PowerShell ISE for me.

$settings = @{
  hashkey = 'value'
}

(0..100) | 
  Get-Random -Count 10 | 
    %{ Write-Output "Hello, this is $_ reporting..." }

Advertisements

One comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s