A collection of debugging tools for helping to develop modern PowerShell applications.
For example: objects color highlighting, various code metrics and performance benchmarks.
PS> Install-Module Debug
The Module is using:
- ColoredText - for highlighting.
- Parser for the syntax analysis.
Projects using Debug
:
- Highlights
Format-List
. - Highlights
Format-Table
. - Highlights
Format-Custom
. - Highlights
Get-Member
. - Fully adjustable.
- Tab completion in ISE and Console.
- Lots of syntactic sugar.
- Numerous helper classes for code
analysis and debugging porpuses IN DEVELOPMENT
In order to get the most out of color highlighted modules, and enjoy their full potential,
it is highly recommended to use the ConEmu console with the Oceans16 theme!
Also, check out the other numerous themes over there, maybe you'll find one you like even better!
The debug
function wraps around the PowerShell
formatting Cmdlets
and highlights their output with multiple colors.
It prints, objects, collections, hashtables and any other
data structures in the nice, human-readable form!
Debug-Object
or just debug
:
Argument | Default | Description |
---|---|---|
-Object |
Mandatory | Object to Highlight. |
-View |
List |
Output format List , Members , Method , Property , Tree , Table . |
-Depth |
1 |
The depth of the Tree View . |
-TableStyle |
Rows |
Table View output style Rows , Columns |
This could be helpful while working in the console, to autocomplete the available local variables.
The Table View is fully functional, though still in development and change-prone with a high probability!
Right now, it does not mimic the exact output of the Format-Table
Cmdlet
, rather than using some inner technique to prepare the object for highlighting.
debug $hashTable Table
debug (Get-Process) Table
debug (Get-Process) -View Table
Get-Process | debug -View Table
Get-Module | debug -View Table -TableStyle Rows
debug (Get-InstalledModule) Table -TableStyle Columns
Get-Date | debug
$host | debug
$host | debug -View List
debug $host
debug $host List
debug $host 1
debug $host Tree
$host | debug -View Tree
$host | debug -Depth 2
debug $host Members
debug $host -View Members
$host | debug -View Members
debug $host Method
debug $host -View Method
$host | debug -View Method
debug $host Property
debug $host -View Property
$host | debug -View Property