You are here:

WindowsManagement.com > PowerShell > PowerShell 1.0 > Set-PSdebug
ActiveXperts Network Monitor 2019 proactively manages network servers, devices, databases and more.

Set-PSdebug - PowerShell 1.0

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.

Set-PSdebug


Description
Back up your Hyper-V VMs Easy & Fast. 100% built for Hyper-V. Free for 2 VMs, forever.

Usage


Options
-trace int
       Set the trace level:
          0 - Off
          1 - trace script lines as they are executed
          2 - trace script lines, variable assignments, function calls and scripts.

   -step 
       Turn on script stepping. Before each line is run, powershell will prompt
       to stop, continue or enter a new interpreter level to inspect the state
       of the script. (Step automatically sets Trace =1)

   -strict 
       Throw an exception if a variable is referenced before being assigned a value.

   -off 
       Turn off all debugging features.

   CommonParameters:
       -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutVariable.

Example(s)
Set the trace level to 2:

PS C:\>set-psdebug -trace 2;

Turns stepping on:

PS C:\>set-psdebug -step

Turn off all debugging features:

PS C:\>set-psdebug -off