Enable-RunspaceDebug
SYNOPSIS
Enables debugging on runspaces where any breakpoint is preserved until a debugger is attached.
SYNTAX
RunspaceNameParameterSet (Default)
Enable-RunspaceDebug [-BreakAll] [[-RunspaceName] <String[]>] [<CommonParameters>]
RunspaceParameterSet
Enable-RunspaceDebug [-BreakAll] [-Runspace] <Runspace[]> [<CommonParameters>]
RunspaceIdParameterSet
Enable-RunspaceDebug [-BreakAll] [-RunspaceId] <Int32[]> [<CommonParameters>]
RunspaceInstanceIdParameterSet
Enable-RunspaceDebug [-RunspaceInstanceId] <Guid[]> [<CommonParameters>]
ProcessNameParameterSet
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: System.String[]
Parameter Sets: ProcessNameParameterSet
Aliases:
Required: False
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: System.Management.Automation.SwitchParameter
Parameter Sets: RunspaceNameParameterSet, RunspaceParameterSet, RunspaceIdParameterSet
Aliases:
Required: False
Position: 1
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-ProcessName
The name of the process that hosts the PowerShell runspace.
Type: System.String
Parameter Sets: ProcessNameParameterSet
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Runspace
One or more Runspace objects to be disabled.
Type: System.Management.Automation.Runspaces.Runspace[]
Parameter Sets: RunspaceParameterSet
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
-RunspaceId
One or more Runspace Id numbers to be disabled.
Type: System.Int32[]
Parameter Sets: RunspaceIdParameterSet
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-RunspaceInstanceId
One or more Runspace GUIDs to be disabled.
Type: System.Guid[]
Parameter Sets: RunspaceInstanceIdParameterSet
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-RunspaceName
One or more Runspace names to be disabled.
Type: System.String[]
Parameter Sets: RunspaceNameParameterSet
Aliases:
Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.