PowerShell Pro Tools
Ironman SoftwareGitHub
  • About
  • System Requirements
  • PowerShell Tools Documentation
    • Visual Studio
      • Analysis
      • Debugging
        • Local Debugging
        • Remote Debugging
      • Format Document
      • Go to Definition
      • Packaging in Visual Studio
      • PowerShell 7 Support
      • PowerShell Interactive Window
      • Project System
        • Advanced
        • Debug
        • Build Events
      • Settings
        • General
        • .editorconfig
        • Analysis
        • Diagnostics
      • Tool Windows
      • Refactoring
      • Unit Test Adapter
      • User Interface Design
        • Windows Forms
  • PowerShell Pro Tools Documentation
    • Visual Studio Code
      • Automating Visual Studio Code
      • Code Conversion
      • Debugging
        • Run in New Terminal
        • One-Click Attach
      • Decompiler
      • Diagnostics
      • Enhanced Hover
      • Generating a UI from a function
      • Generate a Tool from a Function
      • Packaging in Visual Studio Code
      • Pin Session
      • PowerShell Explorer
      • Profiler
      • Sign On Save
      • RapidSense
      • Refactoring
      • Rename Symbols
      • Quick Scripts
      • Windows Forms Designer
    • Installers
    • Packaging
      • Package.psd1
      • PowerShell Packager
      • Package Hosts
      • Package as Service
      • Packaging on Linux
      • Packaging on Mac OS X
      • Continuous Integration
      • Anti-Virus
    • PowerShell Module
      • Global Hotkeys
      • Show-PSEditor
      • Show-PSScriptPad
      • Show-TUIDesigner
      • ConvertTo-CSharp
      • ConvertTo-PowerShell
      • Merge-Script
      • Install-PoshProToolsLicense
      • about_MergeScriptConfig
      • Show-WinFormDesigner
    • PowerShell Protect
      • Getting Started
      • Installation
      • Actions
      • Rules
      • Configuration
    • PSCommander
    • PSScriptPad
    • Installation and Licensing
      • Visual Studio Offline Installation
  • Changelog
    • PowerShell Tools for Visual Studio
    • PowerShell Pro Tools for Visual Studio Code
    • PowerShell Packager
    • PSScriptPad
    • PowerShell Pro Tools Module
Powered by GitBook
On this page
  • AST Explorer
  • Custom Tree View
  • Host Process Explorer
  • History Explorer
  • Jobs Explorer
  • Modules Explorer
  • Provider Explorer
  • Insert Selected Item Paths into Scripts
  • View Item Properties
  • View Child Items
  • Reflection Explorer
  • Session Explorer
  • Variable Explorer
  • Insert Variables into Scripts
  1. PowerShell Pro Tools Documentation
  2. Visual Studio Code

PowerShell Explorer

PreviousPin SessionNextProfiler

Last updated 4 years ago

The PowerShell Explorer allows you to view the AST, Modules and Providers in your PowerShell Environment.

AST Explorer

You can explore the AST of the current PowerShell file by using the AST node in the PowerShell Explorer. Open a PS1 or PSM1 file and click the refresh button. The AST node will show which file the AST is currently showing. You can then click the nodes within the AST. Click the Select AST button to highlight the text in the editor that relates to that AST node.

If you want to clear the AST node selection, click the Clear Selection button.

Custom Tree View

The following example creates a tree view named test that creates nested tree items. When each item is clicked, it will display a VS Code message.

Register-VSCodeTreeView -Label 'Test' -LoadChildren {
    1..10 | % { New-VSCodeTreeItem -Label "Test$_" -Icon 'archive' -HasChildren } 
} -Icon 'account' -InvokeChild {
    Show-VSCodeMessage -Message $args[0].Path
}

This example creates a tree view of GitHub repositories and opens then when clicked.

Register-VSCodeTreeView -Label 'GitHub' -LoadChildren {
    New-VSCodeTreeItem -Label 'PowerShell Universal' -Description 'https://github.com/ironmansoftware/powershell-universal' -Icon 'github-inverted'
    New-VSCodeTreeItem -Label 'Issues' -Description 'https://github.com/ironmansoftware/issues' -Icon 'github-inverted'
    New-VSCodeTreeItem -Label 'PowerShell' -Description 'https://github.com/powershell/powershell' -Icon 'github-inverted'
} -Icon 'github' -InvokeChild {
    Start-Process $args[0].Description
}

Host Process Explorer

History Explorer

View the history from PSReadline and insert it into the PowerShell Integrated terminal

Jobs Explorer

The Jobs explorer displays the status of jobs within your PowerShell session. You can stop, receive, debug and remove jobs.

Modules Explorer

The Module Explorer node provides the ability to view modules within your PowerShell environment. It will list all the modules and their versions directly in the tree view. If there is an updated version of a module, the update icon will be available and a description on the node will state the updated version that is available on the gallery. You can click the update button to update that module.

Provider Explorer

You can use the PowerShell Provider Explorer in the PowerShell Explorer window to traverse providers in your environment.

Insert Selected Item Paths into Scripts

You can insert selected item paths into scripts using the Insert Path command.

View Item Properties

You can view the properties of a container or item by using the View Item Properties command.

View Child Items

You can view child items in a grid by using the View Items command on containers.

Reflection Explorer

The reflection explorer allows you to view assemblies, types, and members of those types within the side panel.

Session Explorer

The session explorer allows you to view active PSSessions in your environment. You can connect, disconnect and remove sessions from the session explorer.

Variable Explorer

The Variable Explorer allows you to see variables defined in your session without being in the debugger. You can expand and view their properties. Clicking the refresh button will refresh the variable list.

Insert Variables into Scripts

You can insert selected variables into scripts using the Insert Variable button.

Selecting nested properties will insert the path to the property into the script.

The custom tree view allows you to define your own tree views with custom items. Items can have children and support invocation which can call any cmdlet you'd like. You can also integrate with the .

The host process explorer lets you view processes running PowerShell on your machine. You can click the Attach button to use the feature.

VS Code cmdlets
One-Click Attach
Viewing the PowerShell Explorer Window
Selecting an AST Node
Clear the AST Selection
Module Explorer in VS Code
Insert Provider Path
Variable Explorer