Enable-Runspace Debug

Enables debugging on runspaces where any breakpoint is preserved until a debugger is attached.

Syntax

Enable-RunspaceDebug
      [-BreakAll]
      [[-RunspaceName] <String[]>]
      [<CommonParameters>]
Enable-RunspaceDebug
      [-BreakAll]
      [-Runspace] <Runspace[]>
      [<CommonParameters>]
Enable-RunspaceDebug
      [-BreakAll]
      [-RunspaceId] <Int32[]>
      [<CommonParameters>]
Enable-RunspaceDebug
      [-RunspaceInstanceId] <Guid[]>
      [<CommonParameters>]
Enable-RunspaceDebug
      [[-ProcessName] <String>]
      [[-AppDomainName] <String[]>]
      [<CommonParameters>]

Description

The Enable-RunspaceDebug cmdlet enables debugging on runspaces where any breakpoint is preserved until a debugger is attached.

Examples

1: Enable the default runspace debugger

Enable-RunspaceDebug
Get-RunspaceDebug

Id Name                 Enabled    BreakAll
 -- ----                 -------    --------
  1 Runspace1            True       False

Parameters

-AppDomainName

The name of the application domain that hosts the PowerShell runspace.

Type: String [ ]
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-BreakAll

Causes any running command or script in the Runspace to stop in step mode, regardless of whether a debugger is currently attached. The script or command will remain stopped until a debugger is attached to debug the current stop point.

Type: SwitchParameter
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProcessName

The name of the process that hosts the PowerShell runspace.

Type: String
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Runspace

One or more Runspace objects to be disabled.

Type: Runspace [ ]
Position: 0
Default value: None
Accept pipeline input: True
Accept wildcard characters: False

-RunspaceId

One or more Runspace Id numbers to be disabled.

Type: Int32 [ ]
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RunspaceInstanceId

One or more Runspace GUIDs to be disabled.

Type: Guid [ ]
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RunspaceName

One or more Runspace names to be disabled.

Type: String [ ]
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False