You are here: > PowerShell > PowerShell 1.0 > Set-PSdebug
ActiveXperts Network Monitor 2015 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.


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


-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.

       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)

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

       Turn off all debugging features.

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

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